diff --git a/.buckconfig b/.buckconfig index f8609996c946c..f7435c4c90e9f 100644 --- a/.buckconfig +++ b/.buckconfig @@ -1,23 +1,9 @@ [repositories] -root = . -prelude = prelude -shim = shim +gh_facebook_fboss = . +shim_DISABLED = shim [repository_aliases] -config = prelude -ovr_config = prelude -toolchains = shim -fbcode = shim -fbcode_macros = shim -fbsource = shim -buck = shim -bazel_skylib = shim - -[external_cells] -prelude = bundled - -[parser] -target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default +root = gh_facebook_fboss [buildfile] name=BUCK diff --git a/.buckconfig.d/common.buckconfig b/.buckconfig.d/common.buckconfig new file mode 100644 index 0000000000000..076a7ca03af40 --- /dev/null +++ b/.buckconfig.d/common.buckconfig @@ -0,0 +1,20 @@ +[cells] +prelude = prelude +none = none + +[cell_aliases] +config = prelude +ovr_config = prelude +bazel_skylib = gh_facebook_buck2_shims_meta +buck = gh_facebook_buck2_shims_meta +fbcode = gh_facebook_buck2_shims_meta +fbcode_macros = gh_facebook_buck2_shims_meta +fbsource = gh_facebook_buck2_shims_meta +shim = gh_facebook_buck2_shims_meta +toolchains = gh_facebook_buck2_shims_meta + +[external_cells] +prelude = bundled + +[parser] +target_platform_detector_spec = target:root//...->prelude//platforms:default target:shim//...->prelude//platforms:default diff --git a/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig new file mode 100644 index 0000000000000..51665d718950a --- /dev/null +++ b/.buckconfig.d/external_cells/facebook/buck2-shims-meta/external_cell.buckconfig @@ -0,0 +1,9 @@ +[cells] +gh_facebook_buck2_shims_meta = gh_facebook_buck2_shims_meta + +[external_cells] +gh_facebook_buck2_shims_meta = git + +[external_cell_gh_facebook_buck2_shims_meta] +git_origin = https://github.com/facebook/buck2-shims-meta.git +commit_hash = 461a1b10af7eb8af2f6d0eb0129009d60048e6de diff --git a/.github/workflows/platform-services.yml b/.github/workflows/platform-services.yml index 8a84ef7d1eddb..ed2f1c145eee3 100644 --- a/.github/workflows/platform-services.yml +++ b/.github/workflows/platform-services.yml @@ -5,10 +5,15 @@ on: pull_request: # Allow manually triggering the workflow workflow_dispatch: - # Also schedule the workflow to run hourly automatically + # Also schedule the workflow to run every 3 hours during day only # ShipIt job will sync hourly around HH:21, so schedule the run with 15 minute offset schedule: - - cron: '36 * * * *' + # Run daily at 1:36AM UTC = 6:36PM PDT + # Run daily at 1:36PM UTC = 6:36AM PDT + # Run daily at 4:36PM UTC = 9:36AM PDT + # Run daily at 7:36PM UTC = 12:36PM PDT + # Run daily at 10:36PM UTC = 3:36PM PDT + - cron: '36 1,13,16,19,22 * * *' jobs: Platform-Services-Build: runs-on: 32-core-ubuntu diff --git a/.github/workflows/qsfp-build.yml b/.github/workflows/qsfp-build.yml index 16a5208abc35c..b1509447211f8 100644 --- a/.github/workflows/qsfp-build.yml +++ b/.github/workflows/qsfp-build.yml @@ -4,10 +4,15 @@ on: pull_request: # Allow manually triggering the workflow workflow_dispatch: - # Also schedule the workflow to run hourly automatically + # Also schedule the workflow to run every 3 hours during day only # ShipIt job will sync hourly around HH:21, so schedule the run with 15 minute offset schedule: - - cron: '36 * * * *' + # Run daily at 1:36AM UTC = 6:36PM PDT + # Run daily at 1:36PM UTC = 6:36AM PDT + # Run daily at 4:36PM UTC = 9:36AM PDT + # Run daily at 7:36PM UTC = 12:36PM PDT + # Run daily at 10:36PM UTC = 3:36PM PDT + - cron: '36 1,13,16,19,22 * * *' jobs: Qsfp-Service-Build-Hourly: runs-on: 32-core-ubuntu diff --git a/CMakeLists.txt b/CMakeLists.txt index 8497da08a0868..61909288ef5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.8) +include(functions.cmake) + option(WITH_ASAN "Turn ON address sanitizer build options" OFF) if ($ENV{WITH_ASAN}) message(STATUS "ENV WITH_ASAN is set") @@ -70,6 +72,14 @@ if ($ENV{SAI_BRCM_IMPL}) set (SAI_BRCM_IMPL ON) endif() +option(CHENAB_SAI_SDK "Build SAI api with CHENAB-SAI extensions" OFF) +if ($ENV{CHENAB_SAI_SDK}) + message(STATUS "ENV CHENAB_SAI_SDK is set") + set (CHENAB_SAI_SDK ON) + link_directories(/var/FBOSS/sai_impl/lib) + link_directories(/var/FBOSS/sdk/usr/lib64) +endif() + option(BUILD_SAI_FAKE_LINK_TEST "Building of SAI Fake Link Test binaries" OFF) if ($ENV{BUILD_SAI_FAKE_LINK_TEST}) message(STATUS "ENV BUILD_SAI_FAKE_LINK_TEST is set") @@ -185,6 +195,11 @@ if (SAI_BRCM_IMPL) find_path(SAI_EXPERIMENTAL_INCLUDE_DIR NAMES saiswitchextensions.h) include_directories(${SAI_EXPERIMENTAL_INCLUDE_DIR}) message(STATUS, "Experimental dir: ${SAI_EXPERIMENTAL_INCLUDE_DIR}") +elseif(CHENAB_SAI_SDK) + # Chenab-TODO: set experimental directories appropriately + set(SAI_EXPERIMENTAL_INCLUDE_DIR "/var/FBOSS/sai_impl_output/include") + include_directories(${SAI_EXPERIMENTAL_INCLUDE_DIR}) + message(STATUS, "Experimental dir: ${SAI_EXPERIMENTAL_INCLUDE_DIR}") else() find_path(SAI_EXPERIMENTAL_INCLUDE_DIR NAMES @@ -525,6 +540,13 @@ add_fbthrift_cpp_library( json reflection ) +add_fbthrift_cpp_library( + link_test_production_features_cpp2 + fboss/agent/test/link_tests/link_test_production_features.thrift + OPTIONS + json + reflection +) add_fbthrift_cpp_library( i2c_controller_stats_cpp2 fboss/lib/i2c/i2c_controller_stats.thrift @@ -648,6 +670,7 @@ add_fbthrift_cpp_library( fboss_cpp2 switch_state_cpp2 network_address_cpp2 + mpls_cpp2 phy_cpp2 prbs_cpp2 OPTIONS diff --git a/buck2 b/buck2 index ae813b7f0d83a..d682ee0594550 100755 --- a/buck2 +++ b/buck2 @@ -4,62 +4,62 @@ "name": "buck2", "platforms": { "macos-aarch64": { - "size": 24192649, + "size": 24650797, "hash": "blake3", - "digest": "ada5e17e47e3751ceb767d342ae2cb87b1e8c8d909592a0a272af100e36087d9", + "digest": "c1d538cde7ac6ad0d8f12671420d09786622a97ae186ce4f8e676861910ae45b", "format": "zst", "path": "buck2-aarch64-apple-darwin", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-aarch64-apple-darwin.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-aarch64-apple-darwin.zst" } ] }, "linux-aarch64": { - "size": 26342488, + "size": 26956137, "hash": "blake3", - "digest": "c1b2a83f1730a98245c34e27562346f69e323d785ec0d0779707c2e99d6a455b", + "digest": "5bcb0ee9ed84799206d0cffd52e4b5ff4cacc9b1522d984f25e17c94414519c3", "format": "zst", "path": "buck2-aarch64-unknown-linux-musl", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-aarch64-unknown-linux-musl.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-aarch64-unknown-linux-musl.zst" } ] }, "macos-x86_64": { - "size": 25779123, + "size": 26405161, "hash": "blake3", - "digest": "900916c38b1c16a511ddccf62d649c9ce7a263f04aec586597f84658d922e67d", + "digest": "e388933ebd3bf8e2f9dcd20dbba33fe033319b1a07a67d92ef33e6c188512cb2", "format": "zst", "path": "buck2-x86_64-apple-darwin", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-x86_64-apple-darwin.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-apple-darwin.zst" } ] }, "windows-x86_64": { - "size": 21230675, + "size": 21795979, "hash": "blake3", - "digest": "4001f9995d0c5dd57848a5a3b704abb12c034a2c3dccc5bf1f10eab8a01a3f98", + "digest": "7712324d3e71e487b76860f42f9a0d0e8bc49e692c13ce5053aabe8f1a30be8d", "format": "zst", "path": "buck2-x86_64-pc-windows-msvc.exe", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-x86_64-pc-windows-msvc.exe.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-pc-windows-msvc.exe.zst" } ] }, "linux-x86_64": { - "size": 27176398, + "size": 27977618, "hash": "blake3", - "digest": "608d882a5ad55f8170e68849211c7e22d7f42fbf9fd1605dc03c93f85cf4a907", + "digest": "6f611bbf77c9544831405e68607682523f20f22aa55df1c5a3461f9c3a0cfa03", "format": "zst", "path": "buck2-x86_64-unknown-linux-musl", "providers": [ { - "url": "https://github.com/facebook/buck2/releases/download/2024-10-01/buck2-x86_64-unknown-linux-musl.zst" + "url": "https://github.com/facebook/buck2/releases/download/2024-10-15/buck2-x86_64-unknown-linux-musl.zst" } ] } diff --git a/build/buck2/install_deps/install_deps.sh b/build/buck2/install_deps/install_deps.sh index 0692368d560fb..b715acc025c27 100755 --- a/build/buck2/install_deps/install_deps.sh +++ b/build/buck2/install_deps/install_deps.sh @@ -1,5 +1,5 @@ #!/bin/sh -# (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +# Copyright (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. if [ -z "$INSTALL_COMMAND" ]; then if [ -f /etc/os-release ]; then diff --git a/build/deps/github_hashes/facebook/fb303-rev.txt b/build/deps/github_hashes/facebook/fb303-rev.txt index cdaa3542700fe..8e015d90924ae 100644 --- a/build/deps/github_hashes/facebook/fb303-rev.txt +++ b/build/deps/github_hashes/facebook/fb303-rev.txt @@ -1 +1 @@ -Subproject commit c1f74beb3889d54a5c60ae7c033947e338e249ed +Subproject commit 416aa3d1ff335d0dea665989ade77dd9f2a2a99c diff --git a/build/deps/github_hashes/facebook/fbthrift-rev.txt b/build/deps/github_hashes/facebook/fbthrift-rev.txt index de336bbb69c8a..cbd71d447a7cb 100644 --- a/build/deps/github_hashes/facebook/fbthrift-rev.txt +++ b/build/deps/github_hashes/facebook/fbthrift-rev.txt @@ -1 +1 @@ -Subproject commit b6f6f91a4294b03100d2c4dd512eb269fa385b2d +Subproject commit 78e5b27861982706b85ff5c9009c68d360f042aa diff --git a/build/deps/github_hashes/facebook/folly-rev.txt b/build/deps/github_hashes/facebook/folly-rev.txt index ea01f90bfab8c..130acc11a3986 100644 --- a/build/deps/github_hashes/facebook/folly-rev.txt +++ b/build/deps/github_hashes/facebook/folly-rev.txt @@ -1 +1 @@ -Subproject commit 45ffb40f2beebb08b37df9b81b39193a6e2057a4 +Subproject commit b8b1850df06e286ab510dafc1ebe7ab91ecd4141 diff --git a/build/deps/github_hashes/facebook/wangle-rev.txt b/build/deps/github_hashes/facebook/wangle-rev.txt index 94078754bf60b..0bdab7884f4c5 100644 --- a/build/deps/github_hashes/facebook/wangle-rev.txt +++ b/build/deps/github_hashes/facebook/wangle-rev.txt @@ -1 +1 @@ -Subproject commit ae6297f4994fe0ba78f265589ac7e3c96d2215f8 +Subproject commit 1fc174e3de49c385f33b4fbb4a4e8e0798e15122 diff --git a/build/deps/github_hashes/facebookincubator/fizz-rev.txt b/build/deps/github_hashes/facebookincubator/fizz-rev.txt index d400a680a7432..39b94d8548efe 100644 --- a/build/deps/github_hashes/facebookincubator/fizz-rev.txt +++ b/build/deps/github_hashes/facebookincubator/fizz-rev.txt @@ -1 +1 @@ -Subproject commit c7976216bd64502f11b1b504da7a2e26d820ea8a +Subproject commit 787df81d7a579315e35b71500fc358582045c2a5 diff --git a/build/fbcode_builder/CMake/FindXxhash.cmake b/build/fbcode_builder/CMake/FindXxhash.cmake new file mode 100644 index 0000000000000..04760cbf78018 --- /dev/null +++ b/build/fbcode_builder/CMake/FindXxhash.cmake @@ -0,0 +1,40 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# 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. + +# +# - Try to find Facebook xxhash library +# This will define +# Xxhash_FOUND +# Xxhash_INCLUDE_DIR +# Xxhash_LIBRARY +# + +find_path(Xxhash_INCLUDE_DIR NAMES xxhash.h) + +find_library(Xxhash_LIBRARY_RELEASE NAMES xxhash) + +include(SelectLibraryConfigurations) +SELECT_LIBRARY_CONFIGURATIONS(Xxhash) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + Xxhash DEFAULT_MSG + Xxhash_LIBRARY Xxhash_INCLUDE_DIR +) + +if (Xxhash_FOUND) + message(STATUS "Found xxhash: ${Xxhash_LIBRARY}") +endif() + +mark_as_advanced(Xxhash_INCLUDE_DIR Xxhash_LIBRARY) diff --git a/build/fbcode_builder/getdeps.py b/build/fbcode_builder/getdeps.py index 8a42fcd43c7c9..01c6c1f68a828 100755 --- a/build/fbcode_builder/getdeps.py +++ b/build/fbcode_builder/getdeps.py @@ -923,6 +923,27 @@ def run_project_cmd(self, args, loader, manifest): self.create_builder(loader, manifest).debug(reconfigure=False) +@cmd( + "env", + "print the environment in a shell sourceable format", +) +class EnvCmd(ProjectCmdBase): + def setup_project_cmd_parser(self, parser): + parser.add_argument( + "--os-type", + help="Filter to just this OS type to run", + choices=["linux", "darwin", "windows"], + action="store", + dest="ostype", + default=None, + ) + + def run_project_cmd(self, args, loader, manifest): + if args.ostype: + loader.build_opts.host_type.ostype = args.ostype + self.create_builder(loader, manifest).printenv(reconfigure=False) + + @cmd("generate-github-actions", "generate a GitHub actions configuration") class GenerateGitHubActionsCmd(ProjectCmdBase): RUN_ON_ALL = """ [push, pull_request]""" @@ -959,6 +980,10 @@ def get_run_on(self, args): def write_job_for_platform(self, platform, args): # noqa: C901 build_opts = setup_build_options(args, platform) ctx_gen = build_opts.get_context_generator() + if args.enable_tests: + ctx_gen.set_value_for_project(args.project, "test", "on") + else: + ctx_gen.set_value_for_project(args.project, "test", "off") loader = ManifestLoader(build_opts, ctx_gen) self.process_project_dir_arguments(args, loader) manifest = loader.load_manifest(args.project) @@ -1081,7 +1106,10 @@ def write_job_for_platform(self, platform, args): # noqa: C901 free_up_disk = "" allow_sys_arg = "" - if run_tests: + if ( + build_opts.allow_system_packages + and build_opts.host_type.get_package_manager() + ): sudo_arg = "sudo " allow_sys_arg = " --allow-system-packages" if build_opts.host_type.get_package_manager() == "deb": @@ -1092,13 +1120,16 @@ def write_job_for_platform(self, platform, args): # noqa: C901 if build_opts.is_darwin(): # brew is installed as regular user sudo_arg = "" + tests_arg = "--no-tests " + if run_tests: + tests_arg = "" out.write( - f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive {manifest.name}\n" + f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps {tests_arg}--recursive {manifest.name}\n" ) if build_opts.is_linux() or build_opts.is_freebsd(): out.write(" - name: Install packaging system deps\n") out.write( - f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf\n" + f" run: {sudo_arg}python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps {tests_arg}--recursive patchelf\n" ) required_locales = manifest.get( "github.actions", "required_locales", ctx=manifest_ctx @@ -1176,7 +1207,7 @@ def write_job_for_platform(self, platform, args): # noqa: C901 no_deps_arg = "--no-deps " no_tests_arg = "" - if not args.enable_tests: + if not run_tests: no_tests_arg = "--no-tests " out.write( diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index 6ad9f2859a98d..65bca2692a882 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -15,6 +15,7 @@ import subprocess import sys import typing +from shlex import quote as shellquote from typing import Optional from .dyndeps import create_dyn_dep_munger @@ -157,6 +158,29 @@ def debug(self, reconfigure: bool) -> None: shell = ["powershell.exe"] if sys.platform == "win32" else ["/bin/sh", "-i"] self._run_cmd(shell, cwd=self.build_dir, env=env) + def printenv(self, reconfigure: bool) -> None: + """print the environment in a shell sourcable format""" + reconfigure = self._reconfigure(reconfigure) + self._apply_patchfile() + self._prepare(reconfigure=reconfigure) + env = self._compute_env(env=Env(src={})) + prefix = "export " + sep = ":" + expand = "$" + expandpost = "" + if self.build_opts.is_windows(): + prefix = "SET " + sep = ";" + expand = "%" + expandpost = "%" + for k, v in sorted(env.items()): + existing = os.environ.get(k, None) + if k.endswith("PATH") and existing: + v = shellquote(v) + sep + f"{expand}{k}{expandpost}" + else: + v = shellquote(v) + print("%s%s=%s" % (prefix, k, v)) + def build(self, reconfigure: bool) -> None: print("Building %s..." % self.manifest.name) reconfigure = self._reconfigure(reconfigure) @@ -225,14 +249,16 @@ def _build(self, reconfigure) -> None: system needs to regenerate its rules.""" pass - def _compute_env(self): + def _compute_env(self, env=None) -> Env: + if env is None: + env = self.env # CMAKE_PREFIX_PATH is only respected when passed through the # environment, so we construct an appropriate path to pass down return self.build_opts.compute_env_for_install_dirs( self.loader, self.dep_manifests, self.ctx, - env=self.env, + env=env, manifest=self.manifest, ) diff --git a/build/fbcode_builder/getdeps/buildopts.py b/build/fbcode_builder/getdeps/buildopts.py index b315c175b8abc..8a9c9a99ddea4 100644 --- a/build/fbcode_builder/getdeps/buildopts.py +++ b/build/fbcode_builder/getdeps/buildopts.py @@ -304,12 +304,14 @@ def compute_env_for_install_dirs( is_direct_dep = ( manifest is not None and m.name in manifest.get_dependencies(ctx) ) - self.add_prefix_to_env( - loader.get_project_install_dir(m), - env, - append=False, - is_direct_dep=is_direct_dep, - ) + d = loader.get_project_install_dir(m) + if os.path.exists(d): + self.add_prefix_to_env( + d, + env, + append=False, + is_direct_dep=is_direct_dep, + ) # Linux is always system openssl system_openssl = self.is_linux() diff --git a/build/fbcode_builder/getdeps/cargo.py b/build/fbcode_builder/getdeps/cargo.py index cae8bf54cac1b..0e0e0ddfe0b99 100644 --- a/build/fbcode_builder/getdeps/cargo.py +++ b/build/fbcode_builder/getdeps/cargo.py @@ -9,6 +9,7 @@ import os import re import shutil +import sys import typing from .builder import BuilderBase @@ -97,7 +98,7 @@ def _create_cargo_config(self): if os.path.isfile(cargo_config_file): with open(cargo_config_file, "r") as f: - print(f"Reading {cargo_config_file}") + print(f"Reading {cargo_config_file}", file=sys.stderr) cargo_content = f.read() else: cargo_content = "" @@ -142,7 +143,8 @@ def _create_cargo_config(self): if new_content != cargo_content: with open(cargo_config_file, "w") as f: print( - f"Writing cargo config for {self.manifest.name} to {cargo_config_file}" + f"Writing cargo config for {self.manifest.name} to {cargo_config_file}", + file=sys.stderr, ) f.write(new_content) @@ -270,7 +272,10 @@ def _patchup_workspace(self, dep_to_git) -> None: new_content += "\n".join(config) if new_content != manifest_content: with open(patch_cargo, "w") as f: - print(f"writing patch to {patch_cargo}") + print( + f"writing patch to {patch_cargo}", + file=sys.stderr, + ) f.write(new_content) def _resolve_config(self, dep_to_git) -> typing.Dict[str, typing.Dict[str, str]]: @@ -296,7 +301,8 @@ def _resolve_config(self, dep_to_git) -> typing.Dict[str, typing.Dict[str, str]] if c in crate_source_map and c not in crates_to_patch_path: crates_to_patch_path[c] = crate_source_map[c] print( - f"{self.manifest.name}: Patching crate {c} via virtual manifest in {self.workspace_dir()}" + f"{self.manifest.name}: Patching crate {c} via virtual manifest in {self.workspace_dir()}", + file=sys.stderr, ) if crates_to_patch_path: git_url_to_crates_and_paths[git_url] = crates_to_patch_path @@ -352,7 +358,8 @@ def _resolve_dep_to_git(self): subpath = subpath.replace("/", "\\") crate_path = os.path.join(dep_source_dir, subpath) print( - f"{self.manifest.name}: Mapped crate {crate} to dep {dep} dir {crate_path}" + f"{self.manifest.name}: Mapped crate {crate} to dep {dep} dir {crate_path}", + file=sys.stderr, ) crate_source_map[crate] = crate_path elif dep_cargo_conf: @@ -367,7 +374,8 @@ def _resolve_dep_to_git(self): crate = match.group(1) if crate: print( - f"{self.manifest.name}: Discovered crate {crate} in dep {dep} dir {crate_root}" + f"{self.manifest.name}: Discovered crate {crate} in dep {dep} dir {crate_root}", + file=sys.stderr, ) crate_source_map[crate] = crate_root @@ -414,7 +422,8 @@ def _resolve_dep_to_crates(self, build_source_dir, dep_to_git): for c in crates: if c not in existing_crates: print( - f"Patch {self.manifest.name} uses {dep_name} crate {crates}" + f"Patch {self.manifest.name} uses {dep_name} crate {crates}", + file=sys.stderr, ) existing_crates.add(c) dep_to_crates.setdefault(name, set()).update(existing_crates) diff --git a/build/fbcode_builder/getdeps/expr.py b/build/fbcode_builder/getdeps/expr.py index 0f51521d65816..3b3d2d13d8ebc 100644 --- a/build/fbcode_builder/getdeps/expr.py +++ b/build/fbcode_builder/getdeps/expr.py @@ -151,8 +151,10 @@ def top(self): def ident(self) -> str: ident = self.lex.get_token() + # pyre-fixme[6]: For 2nd argument expected `str` but got `Optional[str]`. if not re.match("[a-zA-Z]+", ident): raise Exception("expected identifier found %s" % ident) + # pyre-fixme[7]: Expected `str` but got `Optional[str]`. return ident def parse_not(self) -> NotExpr: diff --git a/build/fbcode_builder/getdeps/fetcher.py b/build/fbcode_builder/getdeps/fetcher.py index 30cff5b7d99b4..005b2494d6364 100644 --- a/build/fbcode_builder/getdeps/fetcher.py +++ b/build/fbcode_builder/getdeps/fetcher.py @@ -155,6 +155,9 @@ def hash(self) -> str: def get_src_dir(self): return self.path + def clean(self) -> None: + pass + class SystemPackageFetcher(object): def __init__(self, build_options, packages) -> None: diff --git a/build/fbcode_builder/getdeps/manifest.py b/build/fbcode_builder/getdeps/manifest.py index 6af5e3a74dc66..d02cfe83f217f 100644 --- a/build/fbcode_builder/getdeps/manifest.py +++ b/build/fbcode_builder/getdeps/manifest.py @@ -8,6 +8,7 @@ import configparser import io import os +import sys from typing import List from .builder import ( @@ -391,7 +392,10 @@ def _is_satisfied_by_preinstalled_environment(self, ctx): return False for key in envs: val = os.environ.get(key, None) - print(f"Testing ENV[{key}]: {repr(val)}") + print( + f"Testing ENV[{key}]: {repr(val)}", + file=sys.stderr, + ) if val is None: return False if len(val) == 0: diff --git a/build/fbcode_builder/getdeps/platform.py b/build/fbcode_builder/getdeps/platform.py index 1e021d99235a1..5e4acdc44e829 100644 --- a/build/fbcode_builder/getdeps/platform.py +++ b/build/fbcode_builder/getdeps/platform.py @@ -216,7 +216,6 @@ def __init__(self, ostype=None, distro=None, distrovers=None) -> None: ostype = "darwin" elif is_windows(): ostype = "windows" - # pyre-fixme[16]: Module `sys` has no attribute `getwindowsversion`. distrovers = str(sys.getwindowsversion().major) elif sys.platform.startswith("freebsd"): ostype = "freebsd" diff --git a/build/fbcode_builder/getdeps/py_wheel_builder.py b/build/fbcode_builder/getdeps/py_wheel_builder.py index 335d74afd1d31..7db5f2cb0127e 100644 --- a/build/fbcode_builder/getdeps/py_wheel_builder.py +++ b/build/fbcode_builder/getdeps/py_wheel_builder.py @@ -95,13 +95,14 @@ # something like the following pip3 command: # pip3 --isolated install --no-cache-dir --no-index --system \ # --target -# pyre-fixme[13] fields initialized in _build class PythonWheelBuilder(BuilderBase): """This Builder can take Python wheel archives and install them as python libraries that can be used by add_fb_python_library()/add_fb_python_executable() CMake rules. """ + # pyre-fixme[13]: Attribute `dist_info_dir` is never initialized. dist_info_dir: str + # pyre-fixme[13]: Attribute `template_format_dict` is never initialized. template_format_dict: Dict[str, str] def _build(self, reconfigure: bool) -> None: diff --git a/build/fbcode_builder/getdeps/runcmd.py b/build/fbcode_builder/getdeps/runcmd.py index e0b9d2b22fd56..c4a9326f9c2b9 100644 --- a/build/fbcode_builder/getdeps/runcmd.py +++ b/build/fbcode_builder/getdeps/runcmd.py @@ -10,16 +10,12 @@ import subprocess import sys +from shlex import quote as shellquote + from .envfuncs import Env from .platform import is_windows -try: - from shlex import quote as shellquote -except ImportError: - from pipes import quote as shellquote - - class RunCommandError(Exception): pass diff --git a/build/fbcode_builder/manifests/bz2 b/build/fbcode_builder/manifests/bz2 index af2f357d5dbe8..cfbea9c8fd1cc 100644 --- a/build/fbcode_builder/manifests/bz2 +++ b/build/fbcode_builder/manifests/bz2 @@ -3,12 +3,14 @@ name = bz2 [debs] libbz2-dev +bzip2 [homebrew] bzip2 [rpms] bzip2-devel +bzip2 [download] url = https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz diff --git a/build/fbcode_builder/manifests/eden b/build/fbcode_builder/manifests/eden index 168f460e9af7d..d7bc911612e39 100644 --- a/build/fbcode_builder/manifests/eden +++ b/build/fbcode_builder/manifests/eden @@ -55,6 +55,10 @@ python # TODO: teach getdeps to compile lmdb on Windows. lmdb +[dependencies.test=on] +# sapling CLI is needed to run the tests +sapling + [shipit.pathmap.fb=on] # for internal builds that use getdeps fbcode/fb303 = fb303 diff --git a/build/fbcode_builder/manifests/fbthrift b/build/fbcode_builder/manifests/fbthrift index 81fea9d64ec17..964b97cc028e7 100644 --- a/build/fbcode_builder/manifests/fbthrift +++ b/build/fbcode_builder/manifests/fbthrift @@ -26,6 +26,7 @@ libsodium wangle zstd mvfst +xxhash # Thrift also depends on openssl but since the latter requires a platform- # specific configuration we rely on the folly manifest to provide this # dependency to avoid duplication. diff --git a/build/fbcode_builder/manifests/python-click b/build/fbcode_builder/manifests/python-click index ea9a9d2d3dc38..cdf29c4d0c029 100644 --- a/build/fbcode_builder/manifests/python-click +++ b/build/fbcode_builder/manifests/python-click @@ -7,3 +7,9 @@ sha256 = dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc [build] builder = python-wheel + +[rpms] +python3-click + +[debs] +python3-click diff --git a/build/fbcode_builder/manifests/python-setuptools b/build/fbcode_builder/manifests/python-setuptools index 7ca2e1e498cb5..6e71b3b008fd5 100644 --- a/build/fbcode_builder/manifests/python-setuptools +++ b/build/fbcode_builder/manifests/python-setuptools @@ -7,3 +7,12 @@ sha256 = 02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56 [build] builder = python-wheel + +[rpms] +python3-setuptools + +[homebrew] +python-setuptools + +[debs] +python3-setuptools diff --git a/build/fbcode_builder/manifests/sapling b/build/fbcode_builder/manifests/sapling index bbbfe1e40f87f..cff882c67c87a 100644 --- a/build/fbcode_builder/manifests/sapling +++ b/build/fbcode_builder/manifests/sapling @@ -60,11 +60,12 @@ fb303 fbthrift rust-shed -[dependencies.test=on] +[dependencies.all(test=on,not(os=darwin))] hexdump [dependencies.not(os=windows)] python +python-setuptools # We use the system openssl on linux [dependencies.not(os=linux)] diff --git a/build/fbcode_builder/manifests/xxhash b/build/fbcode_builder/manifests/xxhash index 0af55726c12c1..b06002f667e17 100644 --- a/build/fbcode_builder/manifests/xxhash +++ b/build/fbcode_builder/manifests/xxhash @@ -1,5 +1,30 @@ [manifest] name = xxhash +[download] +url = https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.2.tar.gz +sha256 = baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4 + [rpms] xxhash-devel + +[debs] +libxxhash-dev +xxhash + +[homebrew] +xxhash + +[build.not(os=windows)] +builder = make +subdir = xxHash-0.8.2 + +[make.build_args] +all + +[make.install_args] +install + +[build.os=windows] +builder = cmake +subdir = xxHash-0.8.2/cmake_unofficial diff --git a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch index 3771f2fff340f..45ee266b0c39c 100644 --- a/build/fbcode_builder/patches/boost_comparator_operator_fix.patch +++ b/build/fbcode_builder/patches/boost_comparator_operator_fix.patch @@ -8,4 +8,4 @@ diff --git a/boost/serialization/strong_typedef.hpp b/boost/serialization/strong + bool operator==(const T& lhs) const {return t == lhs;} \ bool operator<(const D& rhs) const {return t < rhs.t;} \ }; - + diff --git a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch index 2ef115714919b..fee6755261fe5 100644 --- a/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch +++ b/build/fbcode_builder/patches/zlib_dont_build_more_than_needed.patch @@ -1,33 +1,34 @@ -diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt ---- ../zlib-1.3.1/CMakeLists.txt 2024-01-22 10:32:37.000000000 -0800 -+++ ./CMakeLists.txt 2024-01-23 13:14:09.870289968 -0800 -@@ -149,10 +149,8 @@ - set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) - endif(MINGW) - --add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) - target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) --add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) --target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) - set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) - set_target_properties(zlib PROPERTIES SOVERSION 1) - -@@ -169,7 +167,7 @@ - - if(UNIX) - # On unix-like platforms the library is almost always called libz -- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) -+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) - if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) - set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") - endif() -@@ -179,7 +177,7 @@ - endif() - - if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) -- install(TARGETS zlib zlibstatic -+ install(TARGETS zlib - RUNTIME DESTINATION "${INSTALL_BIN_DIR}" - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +diff -Naur ../zlib-1.3.1/CMakeLists.txt ./CMakeLists.txt +--- ../zlib-1.3.1/CMakeLists.txt 2024-01-22 10:32:37.000000000 -0800 ++++ ./CMakeLists.txt 2024-01-23 13:14:09.870289968 -0800 +@@ -149,10 +149,8 @@ + set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) + endif(MINGW) + +-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++add_library(zlib ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) + +@@ -169,7 +167,7 @@ + + if(UNIX) + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +@@ -179,7 +177,7 @@ + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) + \ No newline at end of file diff --git a/cmake/Agent.cmake b/cmake/Agent.cmake index fc012a5e067f2..597d810c8b502 100644 --- a/cmake/Agent.cmake +++ b/cmake/Agent.cmake @@ -118,9 +118,11 @@ add_library(utils ) target_link_libraries(utils + agent_dir_util asic_utils error ctrl_cpp2 + load_agent_config state switchid_scope_resolver Folly::folly @@ -206,6 +208,7 @@ add_library(core fboss/agent/NeighborUpdaterImpl.cpp fboss/agent/NeighborUpdaterNoopImpl.cpp fboss/agent/PortUpdateHandler.cpp + fboss/agent/RemoteNeighborUpdater.cpp fboss/agent/ResolvedNexthopMonitor.cpp fboss/agent/ResolvedNexthopProbe.cpp fboss/agent/ResolvedNexthopProbeScheduler.cpp @@ -482,6 +485,8 @@ target_link_libraries(hwagent-main split_agent_thrift_syncer Folly::folly agent_hw_test_thrift_handler + utils + test_utils ) add_library(restart_time_tracker @@ -688,3 +693,14 @@ target_link_libraries(hw_asic_table switch_asics utils ) + +add_library(test_utils + fboss/agent/TestUtils.cpp +) + +target_link_libraries(test_utils + agent_dir_util + load_agent_config + common_file_utils + Folly::folly +) diff --git a/cmake/AgentEnsembleSaiLinkTests.cmake b/cmake/AgentEnsembleSaiLinkTests.cmake index eecca31816ca9..e655d8d8c8929 100644 --- a/cmake/AgentEnsembleSaiLinkTests.cmake +++ b/cmake/AgentEnsembleSaiLinkTests.cmake @@ -8,6 +8,8 @@ function(BUILD_AGENT_ENSEMBLE_SAI_LINK_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/link_tests/SaiMonoLinkTest.cpp ) + add_sai_sdk_dependencies(sai_mono_link_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_mono_link_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive @@ -37,6 +39,8 @@ function(BUILD_AGENT_ENSEMBLE_SAI_LINK_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/link_tests/SaiMultiSwitchLinkTest.cpp ) + add_sai_sdk_dependencies(sai_multi_link_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_multi_link_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive diff --git a/cmake/AgentHwBenchmarks.cmake b/cmake/AgentHwBenchmarks.cmake index ef73c370f8c08..42ba5560999bf 100644 --- a/cmake/AgentHwBenchmarks.cmake +++ b/cmake/AgentHwBenchmarks.cmake @@ -426,3 +426,14 @@ target_link_libraries(hw_switch_reachability_change_speed Folly::folly Folly::follybenchmark ) + +add_library(hw_voq_sys_port_programming + fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp +) + +target_link_libraries(hw_voq_sys_port_programming + voq_test_utils + dsf_config_utils + Folly::folly + Folly::follybenchmark +) diff --git a/cmake/AgentHwSaiApi.cmake b/cmake/AgentHwSaiApi.cmake index 1238c54f3dd69..7d6fb897b770f 100644 --- a/cmake/AgentHwSaiApi.cmake +++ b/cmake/AgentHwSaiApi.cmake @@ -73,6 +73,7 @@ set(SAI_API_SRC fboss/agent/hw/sai/api/SystemPortApi.h fboss/agent/hw/sai/api/SystemPortApi.cpp fboss/agent/hw/sai/api/TamApi.h + fboss/agent/hw/sai/api/TamEventAgingGroupApi.h fboss/agent/hw/sai/api/Traits.h fboss/agent/hw/sai/api/TunnelApi.h fboss/agent/hw/sai/api/Types.h @@ -91,6 +92,7 @@ if (SAI_TAJO_IMPL) fboss/agent/hw/sai/api/tajo/DebugCounterApi.cpp fboss/agent/hw/sai/api/tajo/BufferApi.cpp fboss/agent/hw/sai/api/tajo/QueueApi.cpp + fboss/agent/hw/sai/api/tajo/MirrorApi.cpp ) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) @@ -104,11 +106,27 @@ elseif (SAI_BRCM_IMPL) fboss/agent/hw/sai/api/bcm/DebugCounterApi.cpp fboss/agent/hw/sai/api/bcm/BufferApi.cpp fboss/agent/hw/sai/api/bcm/QueueApi.cpp + fboss/agent/hw/sai/api/bcm/MirrorApi.cpp ) find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) include_directories(${SAI_IMPL_DIR}) message(STATUS "Found SAI_INCLUDE_DIR: ${SAI_INCLUDE_DIR}") +elseif (CHENAB_SAI_SDK) + list(APPEND SAI_API_SRC + fboss/agent/hw/sai/api/oss/PortApi.cpp + fboss/agent/hw/sai/api/oss/TamApi.cpp + fboss/agent/hw/sai/api/oss/SwitchApi.cpp + fboss/agent/hw/sai/api/oss/DebugCounterApi.cpp + fboss/agent/hw/sai/api/oss/BufferApi.cpp + fboss/agent/hw/sai/api/oss/QueueApi.cpp + fboss/agent/hw/sai/api/oss/MirrorApi.cpp + ) + + find_path(SAI_IMPL_DIR NAMES lib/libsai_impl.a) + include_directories(${SAI_IMPL_DIR}) + message(STATUS "Found SAI_INCLUDE_DIR: ${SAI_INCLUDE_DIR}") + else() list(APPEND SAI_API_SRC fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp diff --git a/cmake/AgentHwSaiBenchmarks.cmake b/cmake/AgentHwSaiBenchmarks.cmake index 083613688a753..e45f6b5677e02 100644 --- a/cmake/AgentHwSaiBenchmarks.cmake +++ b/cmake/AgentHwSaiBenchmarks.cmake @@ -471,15 +471,15 @@ function(BUILD_SAI_BENCHMARKS SAI_IMPL_NAME SAI_IMPL_ARG) ) add_executable(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} /dev/null) - + target_link_libraries(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} -Wl,--whole-archive hw_switch_reachability_change_speed mono_sai_agent_benchmarks_main ${SAI_IMPL_ARG} -Wl,--no-whole-archive - ) - + ) + set_target_properties(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} PROPERTIES COMPILE_FLAGS "-DSAI_VER_MAJOR=${SAI_VER_MAJOR} \ @@ -487,6 +487,23 @@ function(BUILD_SAI_BENCHMARKS SAI_IMPL_NAME SAI_IMPL_ARG) -DSAI_VER_RELEASE=${SAI_VER_RELEASE}" ) + add_executable(sai_voq_sys_port_programming-${SAI_IMPL_NAME} /dev/null) + + target_link_libraries(sai_voq_sys_port_programming-${SAI_IMPL_NAME} + -Wl,--whole-archive + hw_voq_sys_port_programming + mono_sai_agent_benchmarks_main + ${SAI_IMPL_ARG} + -Wl,--no-whole-archive + ) + + set_target_properties(sai_voq_sys_port_programming-${SAI_IMPL_NAME} + PROPERTIES COMPILE_FLAGS + "-DSAI_VER_MAJOR=${SAI_VER_MAJOR} \ + -DSAI_VER_MINOR=${SAI_VER_MINOR} \ + -DSAI_VER_RELEASE=${SAI_VER_RELEASE}" + ) + endfunction() if(BUILD_SAI_FAKE AND BUILD_SAI_FAKE_BENCHMARKS) diff --git a/cmake/AgentHwSaiHwTest.cmake b/cmake/AgentHwSaiHwTest.cmake index 19a4d2a06f91f..6069031efabf2 100644 --- a/cmake/AgentHwSaiHwTest.cmake +++ b/cmake/AgentHwSaiHwTest.cmake @@ -165,6 +165,7 @@ add_library(agent_hw_test_thrift_handler fboss/agent/hw/sai/hw_test/HwTestEcmpUtilsThriftHandler.cpp fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp fboss/agent/hw/sai/hw_test/HwTestVoqSwitchUtilsThriftHandler.cpp + fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp ) target_link_libraries(agent_hw_test_thrift_handler @@ -213,6 +214,8 @@ function(BUILD_SAI_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/hw/sai/hw_test/SaiQPHRollbackTests.cpp ) + add_sai_sdk_dependencies(sai_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive diff --git a/cmake/AgentHwSaiSwitch.cmake b/cmake/AgentHwSaiSwitch.cmake index 6dd84edd0bd5d..f0ca5a76e768a 100644 --- a/cmake/AgentHwSaiSwitch.cmake +++ b/cmake/AgentHwSaiSwitch.cmake @@ -64,9 +64,20 @@ elseif (SAI_BRCM_IMPL) fboss/agent/hw/sai/switch/npu/bcm/SaiTamManager.cpp fboss/agent/hw/sai/switch/npu/bcm/SaiPortManager.cpp fboss/agent/hw/sai/switch/npu/bcm/SaiQueueManager.cpp - fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp + fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp + fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp fboss/agent/hw/sai/switch/oss/SaiAclTableManager.cpp ) +elseif (CHENAB_SAI_SDK) +# Chenab-TODO: Use non-default files here + list(APPEND SAI_SWITCH_SRC + fboss/agent/hw/sai/switch/oss/SaiSwitch.cpp + fboss/agent/hw/sai/switch/oss/SaiTamManager.cpp + fboss/agent/hw/sai/switch/oss/SaiPortManager.cpp + fboss/agent/hw/sai/switch/oss/SaiAclTableManager.cpp + fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp + fboss/agent/hw/sai/switch/oss/SaiQueueManager.cpp + ) else() list(APPEND SAI_SWITCH_SRC fboss/agent/hw/sai/switch/oss/SaiSwitch.cpp diff --git a/cmake/AgentHwSaiTracer.cmake b/cmake/AgentHwSaiTracer.cmake index 6d7453038fb16..510d3d63c6785 100644 --- a/cmake/AgentHwSaiTracer.cmake +++ b/cmake/AgentHwSaiTracer.cmake @@ -32,6 +32,7 @@ add_library(sai_tracer fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp fboss/agent/hw/sai/tracer/SystemPortApiTracer.cpp fboss/agent/hw/sai/tracer/TamApiTracer.cpp + fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp fboss/agent/hw/sai/tracer/TunnelApiTracer.cpp fboss/agent/hw/sai/tracer/UdfApiTracer.cpp fboss/agent/hw/sai/tracer/Utils.cpp diff --git a/cmake/AgentHwSwitchAsics.cmake b/cmake/AgentHwSwitchAsics.cmake index 29bec67cc3894..d27d32b791614 100644 --- a/cmake/AgentHwSwitchAsics.cmake +++ b/cmake/AgentHwSwitchAsics.cmake @@ -23,6 +23,7 @@ add_library(switch_asics fboss/agent/hw/switch_asics/Jericho3Asic.cpp fboss/agent/hw/switch_asics/RamonAsic.cpp fboss/agent/hw/switch_asics/Ramon3Asic.cpp + fboss/agent/hw/switch_asics/ChenabAsic.cpp fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp ) diff --git a/cmake/AgentHwTest.cmake b/cmake/AgentHwTest.cmake index 7848215696a09..687bd2d5101ca 100644 --- a/cmake/AgentHwTest.cmake +++ b/cmake/AgentHwTest.cmake @@ -212,7 +212,6 @@ set(hw_switch_test_srcs fboss/agent/hw/test/HwVlanTests.cpp fboss/agent/hw/test/HwVerifyPfcConfigInHwTest.cpp fboss/agent/hw/test/HwAclStatTests.cpp - fboss/agent/hw/test/HwPortTests.cpp fboss/agent/hw/test/HwPortLedTests.cpp fboss/agent/hw/test/HwPortProfileTests.cpp fboss/agent/hw/test/HwPortStressTests.cpp @@ -230,7 +229,6 @@ set(hw_switch_test_srcs fboss/agent/hw/test/dataplane_tests/HwMPLSTests.cpp fboss/agent/hw/test/dataplane_tests/HwLoadBalancerTests.cpp fboss/agent/hw/test/dataplane_tests/HwTeFlowTrafficTests.cpp - fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp fboss/agent/hw/test/dataplane_tests/HwProdInvariantTests.cpp fboss/agent/hw/test/dataplane_tests/HwPacketSendTests.cpp diff --git a/cmake/AgentPlatformsCommon.cmake b/cmake/AgentPlatformsCommon.cmake index f8eb62d1b6784..2967bf8bc71ae 100644 --- a/cmake/AgentPlatformsCommon.cmake +++ b/cmake/AgentPlatformsCommon.cmake @@ -44,6 +44,7 @@ target_link_libraries(platform_mapping_utils meru400bia_platform_mapping meru800bia_platform_mapping meru800bfa_platform_mapping + yangra_platform_mapping janga800bic_platform_mapping tahan800bc_platform_mapping ${RE2} diff --git a/cmake/AgentPlatformsCommonYangra.cmake b/cmake/AgentPlatformsCommonYangra.cmake new file mode 100644 index 0000000000000..749346afd9346 --- /dev/null +++ b/cmake/AgentPlatformsCommonYangra.cmake @@ -0,0 +1,12 @@ +# CMake to build libraries and binaries in fboss/agent/platforms/common/yangra + +# In general, libraries and binaries in fboss/foo/bar are built by +# cmake/FooBar.cmake + +add_library(yangra_platform_mapping + fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp +) + +target_link_libraries(yangra_platform_mapping + platform_mapping +) diff --git a/cmake/AgentPlatformsSai.cmake b/cmake/AgentPlatformsSai.cmake index d9c2959c60c9e..1ab50a7901036 100644 --- a/cmake/AgentPlatformsSai.cmake +++ b/cmake/AgentPlatformsSai.cmake @@ -39,6 +39,7 @@ add_library(sai_platform fboss/agent/platforms/sai/SaiBcmMontblancPlatformPort.cpp fboss/agent/platforms/sai/SaiTahan800bcPlatform.cpp fboss/agent/platforms/sai/SaiTahan800bcPlatformPort.cpp + fboss/agent/platforms/sai/SaiYangraPlatform.cpp fboss/agent/platforms/sai/oss/SaiBcmMinipackPlatform.cpp fboss/agent/platforms/sai/oss/SaiTajoPlatform.cpp @@ -63,6 +64,7 @@ add_library(sai_platform fboss/agent/platforms/sai/oss/SaiMeru400bfuPlatformPort.cpp fboss/agent/platforms/sai/oss/SaiMeru800bfaPlatformPort.cpp fboss/agent/platforms/sai/oss/SaiMorgan800ccPlatformPort.cpp + fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp ) target_link_libraries(sai_platform @@ -94,6 +96,7 @@ target_link_libraries(sai_platform meru400bfu_platform_mapping meru800bia_platform_mapping meru800bfa_platform_mapping + yangra_platform_mapping montblanc_platform_mapping janga800bic_platform_mapping tahan800bc_platform_mapping @@ -115,6 +118,8 @@ function(BUILD_SAI_WEDGE_AGENT SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/platforms/sai/wedge_agent.cpp ) + add_sai_sdk_dependencies(wedge_agent-${SAI_IMPL_NAME}) + target_link_libraries(wedge_agent-${SAI_IMPL_NAME} -Wl,--whole-archive main @@ -144,6 +149,8 @@ function(BUILD_SAI_WEDGE_AGENT SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/platforms/sai/oss/WedgeHwAgent.cpp ) + add_sai_sdk_dependencies(fboss_hw_agent-${SAI_IMPL_NAME}) + target_link_libraries(fboss_hw_agent-${SAI_IMPL_NAME} -Wl,--whole-archive hwagent-main diff --git a/cmake/AgentSaiLinkTests.cmake b/cmake/AgentSaiLinkTests.cmake index f5c0854b9b16b..792aa09109eb1 100644 --- a/cmake/AgentSaiLinkTests.cmake +++ b/cmake/AgentSaiLinkTests.cmake @@ -9,6 +9,8 @@ function(BUILD_SAI_LINK_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/link_tests/SaiLinkTest.cpp ) + add_sai_sdk_dependencies(sai_link_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_link_test-${SAI_IMPL_NAME} # --whole-archive is needed for gtest to find these tests -Wl,--whole-archive diff --git a/cmake/AgentState.cmake b/cmake/AgentState.cmake index a4fa9a272e471..372be074f7c3a 100644 --- a/cmake/AgentState.cmake +++ b/cmake/AgentState.cmake @@ -17,6 +17,7 @@ add_library(nodebase ) target_link_libraries(nodebase + switch_config_cpp2 fboss_error fboss_types Folly::folly diff --git a/cmake/AgentTest.cmake b/cmake/AgentTest.cmake index 76d6140d3e332..cba8a64aa2633 100644 --- a/cmake/AgentTest.cmake +++ b/cmake/AgentTest.cmake @@ -110,6 +110,7 @@ target_link_libraries(agent_ensemble_test_lib qsfp_service_client fboss_config_utils agent_ensemble + agent_features qos_test_utils ${GTEST} ${LIBGMOCK_LIBRARIES} diff --git a/cmake/AgentTestAgentHwTests.cmake b/cmake/AgentTestAgentHwTests.cmake index 46dac0a62d857..6ba78b67b1341 100644 --- a/cmake/AgentTestAgentHwTests.cmake +++ b/cmake/AgentTestAgentHwTests.cmake @@ -29,10 +29,12 @@ add_library(agent_hw_test_src fboss/agent/test/agent_hw_tests/AgentQueuePerHostL2Tests.cpp fboss/agent/test/agent_hw_tests/AgentQueuePerHostTests.cpp fboss/agent/test/agent_hw_tests/AgentQueuePerHostRouteTests.cpp + fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp fboss/agent/test/agent_hw_tests/AgentVoqSwitchInterruptsTests.cpp fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp fboss/agent/test/agent_hw_tests/AgentPortBandWidthTests.cpp + fboss/agent/test/agent_hw_tests/AgentPortTests.cpp fboss/agent/test/agent_hw_tests/AgentPrbsTests.cpp fboss/agent/test/agent_hw_tests/AgentAclCounterTests.cpp fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp @@ -65,6 +67,7 @@ target_link_libraries(agent_hw_test_src packet packet_snooper queue_per_host_test_utils + multi_port_traffic_test_utils trap_packet_utils core hw_asic_table @@ -78,6 +81,7 @@ target_link_libraries(agent_hw_test_src trunk_utils traffic_policy_utils olympic_qos_utils + pfc_test_utils qos_test_utils queue_test_utils invariant_test_utils @@ -131,6 +135,8 @@ function(BUILD_SAI_AGENT_HW_TEST SAI_IMPL_NAME SAI_IMPL_ARG) fboss/agent/test/agent_hw_tests/SaiAgentHwTest.cpp ) + add_sai_sdk_dependencies(sai_agent_hw_test-${SAI_IMPL_NAME}) + target_link_libraries(sai_agent_hw_test-${SAI_IMPL_NAME} -Wl,--whole-archive agent_hw_test_src diff --git a/cmake/AgentTestLinkTests.cmake b/cmake/AgentTestLinkTests.cmake index a976c48775e34..91ae7a3b2d638 100644 --- a/cmake/AgentTestLinkTests.cmake +++ b/cmake/AgentTestLinkTests.cmake @@ -28,6 +28,7 @@ target_link_libraries(link_tests packet packet_snooper pkt_test_utils + link_test_production_features_cpp2 ${GTEST} ${LIBGMOCK_LIBRARIES} ) @@ -64,6 +65,7 @@ target_link_libraries(agent_ensemble_link_tests packet packet_snooper trunk_utils + link_test_production_features_cpp2 ${GTEST} ${LIBGMOCK_LIBRARIES} ) diff --git a/cmake/AgentTestUtils.cmake b/cmake/AgentTestUtils.cmake index b71fa301af85c..20f3c3ed03812 100644 --- a/cmake/AgentTestUtils.cmake +++ b/cmake/AgentTestUtils.cmake @@ -352,6 +352,17 @@ target_link_libraries(route_test_utils route_distribution_gen ) +add_library(pfc_test_utils + fboss/agent/test/utils/PfcTestUtils.cpp +) + +target_link_libraries(pfc_test_utils + acl_test_utils + hardware_stats_cpp2 + switch_config_cpp2 + utils +) + add_library(queue_test_utils fboss/agent/test/utils/QueueTestUtils.cpp ) @@ -400,3 +411,13 @@ target_link_libraries(voq_test_utils ecmp_helper test_ensemble_if ) + +add_library(multi_port_traffic_test_utils + fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp +) + +target_link_libraries(multi_port_traffic_test_utils + qos_test_utils + state + ecmp_helper +) diff --git a/cmake/LibThriftServiceClient.cmake b/cmake/LibThriftServiceClient.cmake index 4e8c4a6849246..9181ed7aff113 100644 --- a/cmake/LibThriftServiceClient.cmake +++ b/cmake/LibThriftServiceClient.cmake @@ -5,6 +5,7 @@ add_library(thrift_service_client fboss/lib/thrift_service_client/ThriftServiceClient.cpp + fboss/lib/thrift_service_client/ConnectionOptions.cpp fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp ) diff --git a/cmake/PlatformDataCorralService.cmake b/cmake/PlatformDataCorralService.cmake index 75d263c2ec3c9..fb9a22fe8757a 100644 --- a/cmake/PlatformDataCorralService.cmake +++ b/cmake/PlatformDataCorralService.cmake @@ -43,6 +43,7 @@ target_link_libraries(data_corral_service_lib Folly::folly fb303::fb303 FBThrift::thriftcpp2 + platform_manager_utils ) add_executable(data_corral_service diff --git a/cmake/PlatformFbdevd.cmake b/cmake/PlatformFbdevd.cmake deleted file mode 100644 index b170401f39102..0000000000000 --- a/cmake/PlatformFbdevd.cmake +++ /dev/null @@ -1,63 +0,0 @@ -# Make to build libraries and binaries in fboss/platform/fbdevd - -# In general, libraries and binaries in fboss/foo/bar are built by -# cmake/FooBar.cmake - -add_fbthrift_cpp_library( - fbdevd_cpp2 - fboss/platform/fbdevd/if/fbdevd.thrift - SERVICES - FbdevManager - OPTIONS - json - reflection - DEPENDS - gpio_cpp2 - i2c_cpp2 -) - -add_fbthrift_cpp_library( - gpio_cpp2 - fboss/platform/fbdevd/if/gpio.thrift - OPTIONS - json - reflection -) - -add_fbthrift_cpp_library( - i2c_cpp2 - fboss/platform/fbdevd/if/i2c.thrift - OPTIONS - json - reflection -) - - -add_library(fbdevd_lib - fboss/platform/fbdevd/FbdevdImpl.cpp - fboss/platform/fbdevd/FruManager.cpp - fboss/platform/fbdevd/I2cController.cpp -) - -target_link_libraries(fbdevd_lib - log_thrift_call - common_file_utils - platform_utils - platform_config_lib - fbdevd_cpp2 - gpio_cpp2 - i2c_cpp2 - Folly::folly - FBThrift::thriftcpp2 -) - -add_executable(fbdevd - fboss/platform/fbdevd/Main.cpp -) - -target_link_libraries(fbdevd - fbdevd_lib - fb303::fb303 -) - -install(TARGETS fbdevd) diff --git a/cmake/PlatformSensorService.cmake b/cmake/PlatformSensorService.cmake index 36f768cacc987..ce9579948f842 100644 --- a/cmake/PlatformSensorService.cmake +++ b/cmake/PlatformSensorService.cmake @@ -26,12 +26,15 @@ add_fbthrift_cpp_library( add_library(sensor_service_utils fboss/platform/sensor_service/Utils.cpp + fboss/platform/sensor_service/ConfigValidator.cpp fboss/platform/sensor_service/PmUnitInfoFetcher.cpp fboss/platform/sensor_service/oss/PmClientFactory.cpp ) target_link_libraries(sensor_service_utils sensor_config_cpp2 + platform_config_lib + platform_name_lib platform_manager_service_cpp2 platform_manager_config_cpp2 ${RE2} @@ -45,6 +48,7 @@ add_library(sensor_service_lib fboss/platform/sensor_service/SensorServiceThriftHandler.cpp fboss/platform/sensor_service/oss/FsdbSyncer.cpp fboss/platform/sensor_service/PmUnitInfoFetcher.cpp + fboss/platform/sensor_service/ConfigValidator.cpp ) target_link_libraries(sensor_service_lib diff --git a/cmake/fsdb/FsdbClient.cmake b/cmake/fsdb/FsdbClient.cmake index 8acefababfceb..d394906014b42 100644 --- a/cmake/fsdb/FsdbClient.cmake +++ b/cmake/fsdb/FsdbClient.cmake @@ -8,16 +8,6 @@ include_directories( ${GTEST_INCLUDE_DIRS} ) -add_library(fsdb_client - fboss/fsdb/client/Client.cpp -) - -target_link_libraries(fsdb_client - fsdb_cpp2 - Folly::folly - thrift_service_client -) - add_library(fsdb_stream_client fboss/fsdb/client/FsdbStreamClient.cpp ) @@ -29,7 +19,7 @@ set(fsdb_stream_client_libs common_thrift_utils fsdb_oper_cpp2 fsdb_cpp2 - fsdb_client + thrift_service_client ) target_link_libraries(fsdb_stream_client ${fsdb_stream_client_libs}) diff --git a/cmake/fsdb/FsdbIf.cmake b/cmake/fsdb/FsdbIf.cmake index b9b01b38dec7d..5b4de5ead52ad 100644 --- a/cmake/fsdb/FsdbIf.cmake +++ b/cmake/fsdb/FsdbIf.cmake @@ -67,9 +67,11 @@ add_library(thriftpath_lib ) target_link_libraries(thriftpath_lib + switch_config_cpp2 fsdb_oper_cpp2 FBThrift::thriftcpp2 Folly::folly + ${RE2} ) add_library(fsdb_model_thriftpath_cpp2 diff --git a/fboss/BUILD_MODE.bzl b/fboss/BUILD_MODE.bzl deleted file mode 100644 index 7fce6b122c461..0000000000000 --- a/fboss/BUILD_MODE.bzl +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright (c) 2004-present, Facebook, Inc. - -load("@fbcode_macros//build_defs:create_build_mode.bzl", "create_build_mode") - -_extra_asan_options = { - "detect_leaks": "1", -} - -_lsan_suppressions = [ - # Suppress leaks in third-party BRCM libraries for now. - # TODO: work with BRCM to fix these leaks in their code. - "bcm_switch_event_register", - "_bcm_attach", - "soc_attach", - "soc_do_init", - "soc_misc_init", - "sal_appl_init", - # field_group_sync gets called during warm boot exit - # Practically this leak is not a big deal since we are - # going to exit the process anyways - "_field_group_sync", - # CSP CS9371557 tracks this leak with Broadcom - "bcm_trunk_member_add", - "bcm_trunk_member_delete", - # CSP CS9690891 tracks this leak with Broadcom - "bcm_mpls_tunnel_initiator_set", - # CS9737327 - "_brcm_sai_switch_flex_counter_init", - # CS10319636 - "syncdbUtilSchemaCreate", - # On exit, bcm sdk code asks rx thread - # to stop and waits 0.5s for thread to - # stop. If it does not, exit continues - # anyways. This then causes memory allocated - # in rx_start to be leaked causing test - # failures - "_bcm_common_rx_start", - # CS00010980235 - "_brcm_sai_add_port_to_default_vlan", - "_brcm_sai_vlan_init", - "_brcm_sai_list_init_end", - "la_acl_delegate", - # CS00011422528 - "sai_driver_shell", - # CS00011825929 - "_bcm_esw_stat_flex_update_ingress_flex_info", - # CS00012268611 - "_bcm_esw_stat_group_mode_id_config_create", - # TODO Remove the below as part of T143911621 - # Disable asan warning till DLB warmboot support implemented - "bcm_th2_l3_egress_dlb_attr_set", - "CRYPTO_zalloc", - # Suppress EDK init memleaks until BRCM fixes the leak - # CSP CS00012369114 - "devicemgr_open", - "devicemgr_alloc_resources", - "sharedheap_open", - "rpc_open", -] - -_tsan_suppressions = [ - # Benign lock-order-inversion warning. Rib is constructed from HwSwitch::init - # while holding the HwSwitch lock. During construction we acquire the rib lock. - # During state updates we hold the RIB lock and acquire HwSwitch lock. TSAN - # now (rightly) complains about lock order inversion. However this inversion - # is benign since the first lock sequence is during init where no state updates - # are allowed - "deadlock:fboss::RoutingInformationBase::fromFollyDynamic", - - # libnss_flare.so is dynamically linked (and isn't built with tsan), - # so it doesn't seem that the in-code suppressions work for it. - # This causes us to have TSAN failures, even when the offending line is - # supposed to have a TSAN suppression: https://fburl.com/code/jye4t32e - "race:libnss_flare.so", -] -_extra_warnings = [ - "-Winconsistent-missing-override", - "-Wsuggest-override", -] - -_extra_cflags = [ - "-fno-stack-protector", -] - -_extra_cxxflags = [ - "-fno-stack-protector", -] - -_mode = create_build_mode( - asan_options = _extra_asan_options, - lsan_suppressions = _lsan_suppressions, - tsan_suppressions = _tsan_suppressions, - gcc_flags = _extra_warnings, - clang_flags = _extra_warnings, - c_flags = _extra_cflags, - cxx_flags = _extra_cxxflags, -) - -_modes = { - "dbg": _mode, - "dbgo": _mode, - "dev": _mode, - "opt": _mode, -} - -def get_modes(): - """ Return modes for this hierarchy """ - return _modes diff --git a/fboss/THIRD-PARTY-VERSIONS.bzl b/fboss/THIRD-PARTY-VERSIONS.bzl deleted file mode 100644 index a0de55001c0c6..0000000000000 --- a/fboss/THIRD-PARTY-VERSIONS.bzl +++ /dev/null @@ -1,69 +0,0 @@ -# -# The fboss project interacts with three third-party libraries -# (broadcom-xgs-robo, bf and opennsl). -# We build against multiple versions of each library, in various combinations. -# See https://fb.quip.com/aaiqAo5OAkia for a complete explanation. -# - -load("//fboss/build:sdk.bzl", "get_buildable_sdks") -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -# mapping from sdk_name -> extra version to append to versions map -EXTRA_VERSION_DEPS = { - "broadcom-plp-barchetta2": { - "5.2": { - "broadcom-plp-epdm": "4.1.2", - }, - }, - "broadcom-plp-millenio": { - "5.5": { - "broadcom-plp-epdm": "4.1.2", - }, - }, -} - -def to_versions(sdk): - if sdk.name == "fake": - return None - versions = {sdk.sdk_name: sdk.major_version} - versions.update(EXTRA_VERSION_DEPS.get(sdk.sdk_name, {}).get(sdk.major_version, {})) - return versions - -def to_impl_suffix(sdk): - if sdk.name == "fake": - return "-{}".format(sdk.name) - if sdk.name == "native_bcm": - # historically our native bcm targets just have the major_version in the name - return "-{}".format(sdk.major_version) - else: - return "-{}-{}".format( - sdk.name, - sdk.major_version, - ) - -BCM_SDKS = get_buildable_sdks(product_lines = [ProductLine.BCM_NATIVE_SDK]) -SAI_FAKE_IMPLS = get_buildable_sdks(product_lines = [ProductLine.FAKE_SDK]) -SAI_BRCM_HW_IMPLS = get_buildable_sdks(product_lines = [ProductLine.SAI_SDK_BCM]) -SAI_BRCM_SIM_IMPLS = get_buildable_sdks(product_lines = [ProductLine.SAI_SDK_BCM], is_sim = True) -SAI_BRCM_DNX_SIM_IMPLS = get_buildable_sdks(product_lines = [ProductLine.BCM_DSF_SDK], is_sim = True) -SAI_BRCM_DNX_IMPLS = get_buildable_sdks(product_lines = [ProductLine.BCM_DSF_SDK]) -SAI_BRCM_IMPLS = SAI_BRCM_HW_IMPLS + SAI_BRCM_SIM_IMPLS + SAI_BRCM_DNX_IMPLS + SAI_BRCM_DNX_SIM_IMPLS -SAI_LEABA_IMPLS = get_buildable_sdks(product_lines = [ProductLine.LEABA]) - -# NOTE: Before deleting any of these, we must verify that they are not -# referenced in configerator/source/neteng/fboss/fbpkg/qsfp_service.cinc as our -# conveyor attempts to build qsfp_service binaries against each SDK referenced -# in that config -SAI_CREDO_IMPLS = get_buildable_sdks(product_lines = [ProductLine.CREDO_SAI_SDK]) - -SAI_PHY_IMPLS = SAI_CREDO_IMPLS -SAI_VENDOR_IMPLS = SAI_BRCM_IMPLS + SAI_LEABA_IMPLS + SAI_CREDO_IMPLS - -SAI_IMPLS = SAI_VENDOR_IMPLS + SAI_FAKE_IMPLS - -# Certain native SDKs have version dependencies. For example, for version 5.2 -# of the barchetta2 driver, we need to use version 4.1.2+ of the epdm library, -# otherwise we'll have header mismatches. -# NOTE: Similar to the SAI comment above, any version referenced in -# qsfp_service.cinc must be present here -NATIVE_IMPLS = get_buildable_sdks(product_lines = [ProductLine.MILLENIO_SDK, ProductLine.BARCHETTA2_SDK]) diff --git a/fboss/agent/AgentDirectoryUtil.cpp b/fboss/agent/AgentDirectoryUtil.cpp index f3afb05172032..41e5e81a0573d 100644 --- a/fboss/agent/AgentDirectoryUtil.cpp +++ b/fboss/agent/AgentDirectoryUtil.cpp @@ -287,4 +287,8 @@ std::string AgentDirectoryUtil::getTestHwAgentConfigFile( return folly::to( agentEnsembleConfigDir(), "hw_agent_test_", switchIndex, ".conf"); } + +std::string AgentDirectoryUtil::getAgentBootHistoryLogFile() const { + return "/var/facebook/logs/fboss/wedge_agent_boot_history.log"; +} } // namespace facebook::fboss diff --git a/fboss/agent/AgentDirectoryUtil.h b/fboss/agent/AgentDirectoryUtil.h index 266373ccfd5a4..7fe2e637565bf 100644 --- a/fboss/agent/AgentDirectoryUtil.h +++ b/fboss/agent/AgentDirectoryUtil.h @@ -189,6 +189,8 @@ class AgentDirectoryUtil { std::string getTestHwAgentConfigFile(int switchIndex) const; + std::string getAgentBootHistoryLogFile() const; + private: const std::string volatileStateDir_; const std::string persistentStateDir_; diff --git a/fboss/agent/AgentFeatures.cpp b/fboss/agent/AgentFeatures.cpp index 63e4ec6e47726..652ac6bcc3065 100644 --- a/fboss/agent/AgentFeatures.cpp +++ b/fboss/agent/AgentFeatures.cpp @@ -76,6 +76,16 @@ DEFINE_int32( 1, "Number of threads to use for DSF remote stream pool"); +DEFINE_int32( + dsf_session_conn_timeout_ms, + 4000, + "Socket connection timeout for DSF session"); + +DEFINE_int32( + dsf_session_recv_timeout_ms, + 12000, + "Socket pkt receive timeout for DSF session"); + DEFINE_bool( set_classid_for_my_subnet_and_ip_routes, false, @@ -130,7 +140,27 @@ DEFINE_bool( false, "Flag to indicate whether SwSwitch will crash if any hw switch connection is lost. This will be used in tests to ensure all hw agent running."); +// TODO: Need fix for the feature on single link configuration (CS00012375262) DEFINE_bool( - enable_balanced_intput_mode, - true, + enable_balanced_input_mode, + false, "Enable balanced input mode on fabric devices"); + +DEFINE_int32( + hw_agent_connection_timeout_ms, + 0, + "Time to wait for HwSwitch to connect before SwSwitch exits. " + "By default, SwSwitch waits forever and hence default value is 0."); + +DEFINE_bool( + qgroup_guarantee_enable, + false, + "Enable setting of unicast and multicast queue guaranteed buffer sizes"); + +DEFINE_bool(skip_buffer_reservation, false, "Enable skip reservation"); + +// TODO(zecheng): Remove this once firmware support is ready +DEFINE_bool( + conditional_entropy_cpu_seed_test_only, + false, + "Enable test-only feature for CPU updating conditional entropy seed"); diff --git a/fboss/agent/AgentFeatures.h b/fboss/agent/AgentFeatures.h index 3117718c676b0..6537cc0bbbf62 100644 --- a/fboss/agent/AgentFeatures.h +++ b/fboss/agent/AgentFeatures.h @@ -46,6 +46,8 @@ DECLARE_int32(dsf_num_fsdb_stream_threads); DECLARE_bool(dsf_subscribe_patch); DECLARE_int32(dsf_subscriber_reconnect_thread_heartbeat_ms); DECLARE_int32(dsf_subscriber_stream_thread_heartbeat_ms); +DECLARE_int32(dsf_session_conn_timeout_ms); +DECLARE_int32(dsf_session_recv_timeout_ms); DECLARE_bool(set_classid_for_my_subnet_and_ip_routes); DECLARE_int32(stat_publish_interval_ms); @@ -58,4 +60,9 @@ DECLARE_bool(disable_looped_fabric_ports); DECLARE_bool(detect_wrong_fabric_connections); DECLARE_bool(dsf_edsw_platform_mapping); DECLARE_bool(exit_for_any_hw_disconnect); -DECLARE_bool(enable_balanced_intput_mode); +DECLARE_bool(enable_balanced_input_mode); +DECLARE_int32(hw_agent_connection_timeout_ms); +DECLARE_bool(qgroup_guarantee_enable); +DECLARE_bool(skip_buffer_reservation); +// TODO(zecheng): Remove this once firmware support is ready +DECLARE_bool(conditional_entropy_cpu_seed_test_only); diff --git a/fboss/agent/AgentNetWhoAmI.h b/fboss/agent/AgentNetWhoAmI.h index f913c6f39c6b8..9abf3920a2e65 100644 --- a/fboss/agent/AgentNetWhoAmI.h +++ b/fboss/agent/AgentNetWhoAmI.h @@ -18,6 +18,7 @@ class AgentNetWhoAmI { virtual bool isBcmVoqPlatform() const; virtual bool isCiscoMorgan800ccPlatform() const; virtual bool isFdsw() const; + virtual bool isSdsw() const; virtual bool isNotDrainable() const; virtual bool hasRoutingProtocol() const; virtual bool hasBgpRoutingProtocol() const; diff --git a/fboss/agent/ApplyThriftConfig.cpp b/fboss/agent/ApplyThriftConfig.cpp index 606d6f70f50b5..b07732774d917 100644 --- a/fboss/agent/ApplyThriftConfig.cpp +++ b/fboss/agent/ApplyThriftConfig.cpp @@ -21,7 +21,8 @@ #include "fboss/agent/AclNexthopHandler.h" #include "fboss/agent/AgentFeatures.h" -#include "fboss/agent/AsicUtils.h" + +#include "fboss/agent/DsfStateUpdaterUtil.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/HwAsicTable.h" #include "fboss/agent/LacpTypes.h" @@ -409,6 +410,9 @@ class ThriftConfigApplier { VlanOrIntfT* vlanOrIntf, const CfgVlanOrIntfT* config); std::shared_ptr updateInterfaces(); + std::shared_ptr updateRemoteInterfaces( + const std::shared_ptr& interfaces); + shared_ptr createInterface( const cfg::Interface* config, const Interface::Addresses& addrs); @@ -641,6 +645,7 @@ shared_ptr ThriftConfigApplier::run() { if (newIntfs) { new_->resetIntfs(toMultiSwitchMap( std::move(newIntfs), *cfg_, scopeResolver_)); + new_->resetRemoteIntfs(updateRemoteInterfaces(new_->getInterfaces())); changed = true; } } @@ -803,7 +808,7 @@ shared_ptr ThriftConfigApplier::run() { { // Update reachability group setting for input balanced auto localFabricSwitchIds = getLocalFabricSwitchIds(); - if (FLAGS_enable_balanced_intput_mode && !localFabricSwitchIds.empty()) { + if (FLAGS_enable_balanced_input_mode && !localFabricSwitchIds.empty()) { processReachabilityGroup(localFabricSwitchIds); } } @@ -931,9 +936,12 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { auto switchIdToSwitchIndex = computeSwitchIdToSwitchIndex(new_->getDsfNodes()); - auto getRecyclePortId = [](const std::shared_ptr& node) { - CHECK(node->getSystemPortRange().has_value()); - return *node->getSystemPortRange()->minimum() + 1; + auto getInbandSysPortId = [](const std::shared_ptr& node) { + CHECK(node->getInbandPortId().has_value()); + CHECK(node->getGlobalSystemPortOffset().has_value()); + // TODO factor in multi npu nodes where portId range maybe + // different + return *node->getGlobalSystemPortOffset() + *node->getInbandPortId(); }; auto getRecyclePortName = @@ -948,6 +956,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { case cfg::AsicType::ASIC_TYPE_JERICHO3: asicCore = 441; break; + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_TRIDENT2: case cfg::AsicType::ASIC_TYPE_TOMAHAWK: case cfg::AsicType::ASIC_TYPE_TOMAHAWK3: @@ -989,18 +998,20 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { CHECK(isInterfaceNode(node)) << " Only expect to be called for Interface nodes"; auto mac = node->getMac() ? *node->getMac() : folly::MacAddress(); + CHECK(!node->getSystemPortRanges().systemPortRanges()->empty()); return HwAsic::makeAsic( node->getAsicType(), cfg::SwitchType::VOQ, static_cast(node->getSwitchId()), 0, /* dummy switchIndex*/ - node->getSystemPortRange(), + // TODO - get rid of system port range in HwAsic + *node->getSystemPortRanges().systemPortRanges()->begin(), mac, std::nullopt); }; auto processLoopbacks = [&](const std::shared_ptr& node, const HwAsic* dsfNodeAsic) { - auto recyclePortId = getRecyclePortId(node); + auto recyclePortId = getInbandSysPortId(node); InterfaceID intfID(recyclePortId); auto intfs = isLocal(node) ? new_->getInterfaces()->modify(&new_) : new_->getRemoteInterfaces()->modify(&new_); @@ -1060,7 +1071,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { // via local config. So only process need to process loopback IPs here. return; } - auto recyclePortId = getRecyclePortId(node); + auto recyclePortId = getInbandSysPortId(node); auto sysPort = std::make_shared( SystemPortID(recyclePortId), std::make_optional(RemoteSystemPortType::STATIC_ENTRY)); @@ -1108,7 +1119,7 @@ void ThriftConfigApplier::processUpdatedDsfNodes() { return; } if (!isLocal(node)) { - auto recyclePortId = getRecyclePortId(node); + auto recyclePortId = getInbandSysPortId(node); auto sysPorts = new_->getRemoteSystemPorts()->modify(&new_); sysPorts->removeNode(SystemPortID(recyclePortId)); auto intfs = new_->getRemoteInterfaces()->modify(&new_); @@ -1175,7 +1186,11 @@ void ThriftConfigApplier::processReachabilityGroup( }; bool parallelVoqLinks = haveParallelLinksToInterfaceNodes( - cfg_, localFabricSwitchIds, switchNameToSwitchIds, scopeResolver_); + cfg_, + localFabricSwitchIds, + switchNameToSwitchIds, + scopeResolver_, + platformMapping_); if (!isSingleStageCluster || parallelVoqLinks) { auto newPortMap = new_->getPorts()->modify(&new_); @@ -1305,6 +1320,20 @@ std::shared_ptr ThriftConfigApplier::updateDsfNodes() { bool changed = false; for (const auto& idAndNode : *newNodes) { auto newNode = idAndNode.second; + if (newNode->isInterfaceNode()) { + if (!newNode->getLocalSystemPortOffset().has_value() || + !newNode->getGlobalSystemPortOffset().has_value()) { + throw FbossError( + "Local/Global system port offsets must be set for interface nodes"); + } + if (newNode->getSystemPortRanges().systemPortRanges()->empty()) { + throw FbossError( + "System port range must be non-empty for interface nodes"); + } + if (!newNode->getInbandPortId().has_value()) { + throw FbossError("Inband port ID must be set for interface nodes"); + } + } auto origNode = origNodes->getNodeIf(newNode->getID()); if (!origNode || *origNode != *newNode) { changed |= true; @@ -1358,8 +1387,13 @@ void ThriftConfigApplier::processInterfaceForPortForVoqSwitches( auto switchInfoItr = cfg_->switchSettings()->switchIdToSwitchInfo()->find(switchId); CHECK(switchInfoItr != cfg_->switchSettings()->switchIdToSwitchInfo()->end()); + const auto& switchInfo = switchInfoItr->second; CHECK(dsfNodeItr->second.systemPortRange().has_value()); - CHECK(switchInfoItr->second.portIdRange().has_value()); + CHECK(switchInfo.portIdRange().has_value()); + CHECK(!switchInfo.systemPortRanges()->systemPortRanges()->empty()); + CHECK(switchInfo.localSystemPortOffset().has_value()); + CHECK(switchInfo.globalSystemPortOffset().has_value()); + CHECK(switchInfo.inbandPortId().has_value()); auto systemPortRange = dsfNodeItr->second.systemPortRange(); auto portIdRange = switchInfoItr->second.portIdRange(); CHECK(systemPortRange); @@ -1569,6 +1603,7 @@ shared_ptr ThriftConfigApplier::updateSystemPorts( } auto sysPort = std::make_shared(getSystemPortID( port.second->getID(), + port.second->getScope(), switchSettings->getSwitchIdToSwitchInfo(), switchId)); sysPort->setSwitchId(SwitchID(switchId)); @@ -1808,6 +1843,23 @@ std::shared_ptr ThriftConfigApplier::createPortPg( pgCfg->setResumeOffsetBytes(*resumeOffsetBytes); } pgCfg->setBufferPoolName(*cfg->bufferPoolName()); + if (const auto maxSharedXoffThresholdBytes = + cfg->maxSharedXoffThresholdBytes()) { + pgCfg->setMaxSharedXoffThresholdBytes(*maxSharedXoffThresholdBytes); + } + if (const auto minSharedXoffThresholdBytes = + cfg->minSharedXoffThresholdBytes()) { + pgCfg->setMinSharedXoffThresholdBytes(*minSharedXoffThresholdBytes); + } + if (const auto maxSramXoffThresholdBytes = cfg->maxSramXoffThresholdBytes()) { + pgCfg->setMaxSramXoffThresholdBytes(*maxSramXoffThresholdBytes); + } + if (const auto minSramXoffThresholdBytes = cfg->minSramXoffThresholdBytes()) { + pgCfg->setMinSramXoffThresholdBytes(*minSramXoffThresholdBytes); + } + if (const auto sramResumeOffsetBytes = cfg->sramResumeOffsetBytes()) { + pgCfg->setSramResumeOffsetBytes(*sramResumeOffsetBytes); + } return pgCfg; } @@ -2387,7 +2439,9 @@ shared_ptr ThriftConfigApplier::updatePort( *portConf->portType() == orig->getPortType() && *portConf->drainState() == orig->getPortDrainState() && portFlowletConfigUnchanged && - newFlowletConfigName == orig->getFlowletConfigName()) { + newFlowletConfigName == orig->getFlowletConfigName() && + *portConf->conditionalEntropyRehash() == + orig->getConditionalEntropyRehash()) { return nullptr; } @@ -2430,6 +2484,7 @@ shared_ptr ThriftConfigApplier::updatePort( newPort->setFlowletConfigName(newFlowletConfigName); newPort->setPortFlowletConfig(portFlowletCfg); newPort->setScope(*portConf->scope()); + newPort->setConditionalEntropyRehash(*portConf->conditionalEntropyRehash()); return newPort; } @@ -3140,12 +3195,14 @@ std::shared_ptr ThriftConfigApplier::updateAclTable( std::vector newActionTypes = *configTable.actionTypes(); std::vector newQualifiers = *configTable.qualifiers(); + std::vector newUdfGroups = *configTable.udfGroups(); if (origTable) { ++(*numExistingTablesProcessed); if (!newTableEntries && newTablePriority == origTable->getPriority() && newActionTypes == origTable->getActionTypes() && - newQualifiers == origTable->getQualifiers()) { + newQualifiers == origTable->getQualifiers() && + newUdfGroups == origTable->getUdfGroups()->toThrift()) { // Original table exists with same attributes. return nullptr; } @@ -3168,6 +3225,7 @@ std::shared_ptr ThriftConfigApplier::updateAclTable( newTable->setActionTypes(newActionTypes); newTable->setQualifiers(newQualifiers); + newTable->setUdfGroups(newUdfGroups); return newTable; } @@ -3468,10 +3526,11 @@ void ThriftConfigApplier::checkAcl(const cfg::AclEntry* config) const { std::to_string(AclEntry::kMaxIcmpCode)); } } - if (config->icmpType() && - (!config->proto() || - !(*config->proto() == AclEntry::kProtoIcmp || - *config->proto() == AclEntry::kProtoIcmpv6))) { + // TODO(daiweix): check proto should be 58 if icmp type/code is specified + // after CS00012373216 is resolved. + if (config->icmpType() && config->proto() && + !(*config->proto() == AclEntry::kProtoIcmp || + *config->proto() == AclEntry::kProtoIcmpv6)) { throw FbossError( "proto must be either icmp or icmpv6 ", "if icmp type is set"); } @@ -3711,18 +3770,14 @@ std::shared_ptr ThriftConfigApplier::updateInterfaces() { auto sysPort = new_->getSystemPorts()->getNode(SystemPortID(*interfaceCfg.intfID())); auto dsfNode = cfg_->dsfNodes()->find(sysPort->getSwitchId())->second; - auto sysPortRange = dsfNode.systemPortRange(); - CHECK(sysPortRange.has_value()); - if (interfaceCfg.intfID() < sysPortRange->minimum() || - interfaceCfg.intfID() > sysPortRange->maximum()) { + if (!withinRange( + *dsfNode.systemPortRanges(), + InterfaceID(*interfaceCfg.intfID()))) { throw FbossError( "Interface intfID :", *interfaceCfg.intfID(), "is out of range for corresponding VOQ switch.", - "sys port range,->min: ", - *sysPortRange->minimum(), - "->max: ", - *sysPortRange->maximum()); + "sys port range"); } CHECK_EQ((int)sysPort->getScope(), (int)(*interfaceCfg.scope())); } @@ -3749,6 +3804,58 @@ std::shared_ptr ThriftConfigApplier::updateInterfaces() { return std::make_shared(std::move(newIntfs)); } +std::shared_ptr +ThriftConfigApplier::updateRemoteInterfaces( + const std::shared_ptr& interfaces) { + if (scopeResolver_.hasVoq() && + scopeResolver_.scope(cfg::SwitchType::VOQ).size() <= 1) { + // remote system ports are applicable only for voq switches + // remote system ports are updated on config only when more than voq + // switches are configured on a given SwSwitch + return orig_->getRemoteInterfaces(); + } + auto remoteInterfaces = orig_->getRemoteInterfaces()->clone(); + + for (const auto& [matcher, interfaceMap] : std::as_const(*interfaces)) { + for (const auto& [intfID, intf] : std::as_const(*interfaceMap)) { + if (intf->getType() != cfg::InterfaceType::SYSTEM_PORT) { + continue; + } + auto remoteIntfScope = scopeResolver_.scope(cfg::SwitchType::VOQ); + remoteIntfScope.exclude(scopeResolver_.scope(intf, *cfg_).switchIds()); + auto remoteIntf = std::make_shared(); + remoteIntf->fromThrift(intf->toThrift()); + auto oldRemoteInterface = remoteInterfaces->getNodeIf(intfID); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface ? oldRemoteInterface->getArpTable() : nullptr, + remoteIntf->getArpTable()); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface ? oldRemoteInterface->getNdpTable() : nullptr, + remoteIntf->getNdpTable()); + if (remoteInterfaces->getNodeIf(intfID)) { + remoteInterfaces->updateNode(std::move(remoteIntf), remoteIntfScope); + } else { + remoteInterfaces->addNode(std::move(remoteIntf), remoteIntfScope); + } + } + } + + // check for deleted interfaces + for (const auto& [matcher, interfaceMap] : + std::as_const(*orig_->getInterfaces())) { + for (const auto& [intfID, intf] : std::as_const(*interfaceMap)) { + if (intf->getType() != cfg::InterfaceType::SYSTEM_PORT) { + continue; + } + if (!interfaces->getNodeIf(intfID)) { + remoteInterfaces->removeNode(intfID); + } + } + } + + return remoteInterfaces; +} + shared_ptr ThriftConfigApplier::createInterface( const cfg::Interface* config, const Interface::Addresses& addrs) { @@ -4223,8 +4330,9 @@ ThriftConfigApplier::updateMultiSwitchSettings() { auto origSwitchSettings = origMultiSwitchSettings->getNodeIf(matcher.matcherString()); - // If origmultiSwitchSettings is already populated, and if config carries - // switchId that is not present in origMultiSwitchSettings, throw error + // If origmultiSwitchSettings is already populated, and if config + // carries switchId that is not present in origMultiSwitchSettings, + // throw error if (origMultiSwitchSettings->size() != 0) { if (!origSwitchSettings) { throw FbossError("SwitchId cannot be changed on the fly"); @@ -4385,8 +4493,8 @@ shared_ptr ThriftConfigApplier::updateSwitchSettings( } // computeActualSwitchDrainState relies on minLinksToRemainInVOQDomain and - // minLinksToJoinVOQDomain. Thus, setting these fields must precede call to - // computeActualSwitchDrainState. + // minLinksToJoinVOQDomain. Thus, setting these fields must precede call + // to computeActualSwitchDrainState. std::optional newMinLinksToRemainInVOQDomain{std::nullopt}; if (cfg_->switchSettings()->minLinksToRemainInVOQDomain()) { if (newSwitchSettings->getSwitchIdsOfType(cfg::SwitchType::VOQ).size() == @@ -4422,6 +4530,30 @@ shared_ptr ThriftConfigApplier::updateSwitchSettings( switchSettingsChange = true; } + std::optional newSramGlobalFreePercentXoffThreshold; + if (cfg_->switchSettings()->sramGlobalFreePercentXoffThreshold()) { + newSramGlobalFreePercentXoffThreshold = + *cfg_->switchSettings()->sramGlobalFreePercentXoffThreshold(); + } + if (newSramGlobalFreePercentXoffThreshold != + origSwitchSettings->getSramGlobalFreePercentXoffThreshold()) { + newSwitchSettings->setSramGlobalFreePercentXoffThreshold( + newSramGlobalFreePercentXoffThreshold); + switchSettingsChange = true; + } + + std::optional newSramGlobalFreePercentXonThreshold; + if (cfg_->switchSettings()->sramGlobalFreePercentXonThreshold()) { + newSramGlobalFreePercentXonThreshold = + *cfg_->switchSettings()->sramGlobalFreePercentXonThreshold(); + } + if (newSramGlobalFreePercentXonThreshold != + origSwitchSettings->getSramGlobalFreePercentXonThreshold()) { + newSwitchSettings->setSramGlobalFreePercentXonThreshold( + newSramGlobalFreePercentXonThreshold); + switchSettingsChange = true; + } + if (origSwitchSettings->getSwitchDrainState() != *cfg_->switchSettings()->switchDrainState()) { auto numVoqSwtitches = @@ -4457,24 +4589,6 @@ shared_ptr ThriftConfigApplier::updateSwitchSettings( *cfg_->switchSettings()->exactMatchTableConfigs()); switchSettingsChange = true; } - for (auto& switchId : newSwitchSettings->getSwitchIds()) { - if (newSwitchSettings->getSwitchType(static_cast(switchId)) == - cfg::SwitchType::VOQ) { - auto dsfItr = *cfg_->dsfNodes()->find(static_cast(switchId)); - if (dsfItr == *cfg_->dsfNodes()->end()) { - throw FbossError( - "Missing dsf config for switch id: ", - static_cast(switchId)); - } - auto localNode = dsfItr.second; - CHECK(localNode.systemPortRange().has_value()); - auto origLocalNode = orig_->getDsfNodes()->getNodeIf(switchId); - if (!origLocalNode || - origLocalNode->getSystemPortRange() != *localNode.systemPortRange()) { - switchSettingsChange = true; - } - } - } VlanID defaultVlan(*cfg_->defaultVlan()); if (orig_->getDefaultVlan() != defaultVlan) { @@ -4658,9 +4772,9 @@ shared_ptr ThriftConfigApplier::updateControlPlane() { } } else { /* - * if cpuTrafficPolicy is not configured default to dataPlaneTrafficPolicy - * default i.e. with regards to QoS map configuration, treat CPU port like - * any front panel port. + * if cpuTrafficPolicy is not configured default to + * dataPlaneTrafficPolicy default i.e. with regards to QoS map + * configuration, treat CPU port like any front panel port. */ if (auto dataPlaneTrafficPolicy = cfg_->dataPlaneTrafficPolicy()) { if (auto defaultDataPlaneQosPolicy = @@ -4775,9 +4889,9 @@ Interface::Addresses ThriftConfigApplier::getInterfaceAddresses( } // NOTE: We do not want to leak link-local address into intfRouteTables_ - // TODO: For now we are allowing v4 LLs to be programmed because they are - // used within Galaxy for LL routing. This hack should go away once we - // move BGP sessions over non LL addresses + // TODO: For now we are allowing v4 LLs to be programmed because they + // are used within Galaxy for LL routing. This hack should go away once + // we move BGP sessions over non LL addresses if (intfAddr.first.isV6() and intfAddr.first.isLinkLocal()) { continue; } @@ -4785,7 +4899,8 @@ Interface::Addresses ThriftConfigApplier::getInterfaceAddresses( IPAddress::createNetwork(addr), std::make_pair(InterfaceID(*config->intfID()), intfAddr.first)); if (!ret2.second) { - // we get same network, only allow it if that is from the same interface + // we get same network, only allow it if that is from the same + // interface auto other = ret2.first->second.first; if (other != InterfaceID(*config->intfID())) { throw FbossError( @@ -5353,8 +5468,8 @@ folly::MacAddress ThriftConfigApplier::getLocalMac(SwitchID switchId) const { void ThriftConfigApplier::addRemoteIntfRoute() { // In order to resolve ECMP members pointing to remote nexthops, // also treat remote Interfaces as directly connected route in rib. - // HwSwitch will point remote nextHops as dropped such that switch does not - // attract traffic for remote nexthops. + // HwSwitch will point remote nextHops as dropped such that switch does + // not attract traffic for remote nexthops. for (const auto& remoteInterfaceMap : std::as_const(*orig_->getRemoteInterfaces())) { for (const auto& [_, remoteInterface] : diff --git a/fboss/agent/AsicUtils.cpp b/fboss/agent/AsicUtils.cpp index db48149711210..44a5f7877cb40 100644 --- a/fboss/agent/AsicUtils.cpp +++ b/fboss/agent/AsicUtils.cpp @@ -79,6 +79,7 @@ const HwAsic& getHwAsicForAsicType(const cfg::AsicType& asicType) { case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: break; } @@ -108,6 +109,7 @@ uint32_t getFabricPortsPerVirtualDevice(const cfg::AsicType asicType) { case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: throw FbossError( "Fabric ports are not applicable for: ", apache::thrift::util::enumNameSafe(asicType)); diff --git a/fboss/agent/BUCK b/fboss/agent/BUCK index 85111ef232ed1..6914bf80711cb 100644 --- a/fboss/agent/BUCK +++ b/fboss/agent/BUCK @@ -469,34 +469,35 @@ cpp_library( "facebook/Utils.cpp", ], exported_deps = [ - "fbcode//common/network:util", - "fbcode//fboss/agent:asic_utils", - "fbcode//fboss/agent:fboss-error", - "fbcode//fboss/agent:fboss-types", - "fbcode//fboss/agent:fsdb_helper", - "fbcode//fboss/agent:hwswitch_matcher", - "fbcode//fboss/agent:switch_config-cpp2-types", - "fbcode//fboss/agent:switch_state-cpp2-types", - "fbcode//fboss/agent:switchid_scope_resolver", - "fbcode//fboss/agent/if:ctrl-cpp2-types", - "fbcode//fboss/agent/platforms/common/janga800bic:janga800bic_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru400bia:meru400bia_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru400biu:meru400biu_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru800bfa:meru800bfa_platform_mapping", - "fbcode//fboss/agent/platforms/common/meru800bia:meru800bia_platform_mapping", - "fbcode//fboss/agent/state:state", - "fbcode//fboss/fsdb/if:fsdb_oper-cpp2-types", - "fbcode//folly:file_util", - "fbcode//folly:network_address", - "fbcode//folly:range", - "fbcode//folly:subprocess", - "fbcode//folly/json:dynamic", - "fbcode//folly/lang:bits", - "fbcode//folly/logging:logging", - "fbcode//folly/system:thread_name", - "fbcode//thrift/lib/cpp/util:enum_utils", - "fbcode//thrift/lib/cpp2/protocol:protocol", + ":asic_utils", + ":fboss-error", + ":fboss-types", + ":fsdb_helper", + ":hwswitch_matcher", + ":switch_config-cpp2-types", + ":switch_state-cpp2-types", + ":switchid_scope_resolver", + "//common/network:util", + "//fboss/agent/hw:hw_switch_fb303_stats", + "//fboss/agent/if:ctrl-cpp2-types", + "//fboss/agent/platforms/common/janga800bic:janga800bic_platform_mapping", + "//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", + "//fboss/agent/platforms/common/meru400bia:meru400bia_platform_mapping", + "//fboss/agent/platforms/common/meru400biu:meru400biu_platform_mapping", + "//fboss/agent/platforms/common/meru800bfa:meru800bfa_platform_mapping", + "//fboss/agent/platforms/common/meru800bia:meru800bia_platform_mapping", + "//fboss/agent/state:state", + "//fboss/fsdb/if:fsdb_oper-cpp2-types", + "//folly:file_util", + "//folly:network_address", + "//folly:range", + "//folly:subprocess", + "//folly/json:dynamic", + "//folly/lang:bits", + "//folly/logging:logging", + "//folly/system:thread_name", + "//thrift/lib/cpp/util:enum_utils", + "//thrift/lib/cpp2/protocol:protocol", ], exported_external_deps = [ "boost", @@ -572,7 +573,6 @@ cpp_library( srcs = ["ApplyThriftConfig.cpp"], exported_deps = [ ":agent_features", - ":asic_utils", ":core", ":fboss-error", ":hw_asic_table", @@ -664,6 +664,7 @@ cpp_library( "NeighborUpdaterImpl.cpp", "NeighborUpdaterNoopImpl.cpp", "PortUpdateHandler.cpp", + "RemoteNeighborUpdater.cpp", "ResolvedNexthopMonitor.cpp", "ResolvedNexthopProbe.cpp", "ResolvedNexthopProbeScheduler.cpp", @@ -802,6 +803,7 @@ cpp_library( "//fboss/lib/phy:phy-cpp2-types", "//fboss/lib/phy:prbs-cpp2-types", "//fboss/lib/platforms:product-info", + "//fboss/lib/thrift_service_client:thrift-service-client", "//fboss/thrift_cow/nodes:nodes", "//fboss/thrift_cow/nodes:serializer", "//fboss/thrift_cow/storage:cow_storage", @@ -826,9 +828,9 @@ cpp_library( "//folly:utility", "//folly/concurrency:concurrent_hash_map", "//folly/container:f14_hash", + "//folly/coro:bounded_queue", "//folly/executors:io_thread_pool_executor", "//folly/executors/thread_factory:named_thread_factory", - "//folly/experimental/coro:bounded_queue", "//folly/futures:core", "//folly/gen:base", "//folly/io:iobuf", @@ -1351,6 +1353,7 @@ cpp_library( ":restart_time_tracker", ":setup_thrift", ":split_agent_thrift_syncer", + ":test_utils", ":utils", "//common/fb303/cpp:default_control", "//fb303:logging", @@ -1436,6 +1439,7 @@ cpp_library( ":packet", "//fboss/agent/state:state", "//fboss/lib:common_thrift_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:cancellation_token", "//folly:network_address", "//folly:synchronized", @@ -1728,6 +1732,19 @@ cpp_library( ], ) +cpp_library( + name = "test_utils", + srcs = [ + "TestUtils.cpp", + ], + exported_deps = [ + ":agent_dir_util", + ":load_agent_config", + "//fboss/lib:common_file_utils", + "//folly/logging:logging", + ], +) + export_file(name = "Main.cpp") sai_main_all() diff --git a/fboss/agent/Constants.h b/fboss/agent/Constants.h index 72896f99abf6f..7a1fe3a7fe0aa 100644 --- a/fboss/agent/Constants.h +++ b/fboss/agent/Constants.h @@ -71,5 +71,6 @@ inline constexpr folly::StringPiece kUdfGroupPktMatchers{"udfGroupPktMatchers"}; inline constexpr folly::StringPiece kUdfPacketMatchers{"udfPacketMatchers"}; inline constexpr int32_t kDefaultVrf{0}; +constexpr auto kSingleStageInbandPortId = 1; } // namespace facebook::fboss diff --git a/fboss/agent/DsfStateUpdaterUtil.cpp b/fboss/agent/DsfStateUpdaterUtil.cpp index 2abe00d5b24df..fc17b62d7a728 100644 --- a/fboss/agent/DsfStateUpdaterUtil.cpp +++ b/fboss/agent/DsfStateUpdaterUtil.cpp @@ -33,20 +33,10 @@ std::shared_ptr updateFibForRemoteConnectedRoutes( namespace facebook::fboss { -std::shared_ptr DsfStateUpdaterUtil::getUpdatedState( - const std::shared_ptr& in, - const SwitchIdScopeResolver* scopeResolver, - RoutingInformationBase* rib, - const std::map>& - switchId2SystemPorts, - const std::map>& switchId2Intfs) { - bool changed{false}; - auto out = in->clone(); - IntfRouteTable remoteIntfRoutesToAdd; - boost::container:: - flat_map> - remoteIntfRoutesToDel; - +template +void DsfStateUpdaterUtil::updateNeighborEntry( + const TableT& oldTable, + const TableT& clonedTable) { auto skipProgramming = [&](const auto& nbrEntryIter) -> bool { // Local neighbor entry on one DSF node is remote neighbor entry on // every other DSF node. Thus, for neighbor entry received from other @@ -80,31 +70,45 @@ std::shared_ptr DsfStateUpdaterUtil::getUpdatedState( static_cast(std::time(nullptr))); } else { // Retain the resolved timestamp from the old entry. - nbrEntryIter->second->setResolvedSince( - oldTable->at(nbrEntryIter->second->getID())->getResolvedSince()); + if (std::as_const(*oldTable).find(nbrEntryIter->second->getID()) != + oldTable->cend()) { + nbrEntryIter->second->setResolvedSince( + oldTable->at(nbrEntryIter->second->getID())->getResolvedSince()); + } } }; - auto updateNeighborEntry = [&](const auto& oldTable, - const auto& clonedTable) { - auto nbrEntryIter = clonedTable->begin(); - while (nbrEntryIter != clonedTable->end()) { - if (skipProgramming(nbrEntryIter)) { - XLOG(DBG2) << "Skip programming remote neighbor: " - << nbrEntryIter->second->str(); - nbrEntryIter = clonedTable->erase(nbrEntryIter); - } else { - // Entries received from remote are non-Local on current node - nbrEntryIter->second->setIsLocal(false); - // Entries received from remote always need to be programmed - nbrEntryIter->second->setNoHostRoute(false); - updateResolvedTimestamp(oldTable, nbrEntryIter); - XLOG(DBG2) << "Program remote neighbor: " - << nbrEntryIter->second->str(); - ++nbrEntryIter; - } + auto nbrEntryIter = clonedTable->begin(); + while (nbrEntryIter != clonedTable->end()) { + if (skipProgramming(nbrEntryIter)) { + XLOG(DBG2) << "Skip programming remote neighbor: " + << nbrEntryIter->second->str(); + nbrEntryIter = clonedTable->erase(nbrEntryIter); + } else { + // Entries received from remote are non-Local on current node + nbrEntryIter->second->setIsLocal(false); + // Entries received from remote always need to be programmed + nbrEntryIter->second->setNoHostRoute(false); + updateResolvedTimestamp(oldTable, nbrEntryIter); + XLOG(DBG2) << "Program remote neighbor: " << nbrEntryIter->second->str(); + ++nbrEntryIter; } - }; + } +} + +std::shared_ptr DsfStateUpdaterUtil::getUpdatedState( + const std::shared_ptr& in, + const SwitchIdScopeResolver* scopeResolver, + RoutingInformationBase* rib, + const std::map>& + switchId2SystemPorts, + const std::map>& switchId2Intfs) { + bool changed{false}; + auto out = in->clone(); + IntfRouteTable remoteIntfRoutesToAdd; + boost::container:: + flat_map> + remoteIntfRoutesToDel; auto makeRemoteSysPort = [&](const auto& oldNode, const auto& newNode) { /* diff --git a/fboss/agent/DsfStateUpdaterUtil.h b/fboss/agent/DsfStateUpdaterUtil.h index 0807a66dfef33..ea240e78edc9b 100644 --- a/fboss/agent/DsfStateUpdaterUtil.h +++ b/fboss/agent/DsfStateUpdaterUtil.h @@ -20,6 +20,10 @@ class DsfStateUpdaterUtil { const std::map>& switchId2SystemPorts, const std::map>& switchId2Intfs); + template + static void updateNeighborEntry( + const TableT& oldTable, + const TableT& clonedTable); }; } // namespace facebook::fboss diff --git a/fboss/agent/DsfSubscriber.cpp b/fboss/agent/DsfSubscriber.cpp index 021a84f1380e6..b8a15ee131751 100644 --- a/fboss/agent/DsfSubscriber.cpp +++ b/fboss/agent/DsfSubscriber.cpp @@ -134,7 +134,9 @@ void DsfSubscriber::stateUpdated(const StateDelta& stateDelta) { fsdb::SubscriptionOptions opts{ folly::sformat("{}_{}:agent", localNodeName_, dstIPAddr.str()), false /* subscribeStats */, - FLAGS_dsf_gr_hold_time}; + FLAGS_dsf_gr_hold_time, + true /* requireInitialSyncToMarkConnect */, + true /* forceSubscribe */}; auto subscriptionsWlock = subscriptions_.wlock(); if (subscriptionsWlock->find(remoteEndpoint) != subscriptionsWlock->end()) { diff --git a/fboss/agent/DsfSubscription.cpp b/fboss/agent/DsfSubscription.cpp index 072b28b75b619..6c9528a7b42e3 100644 --- a/fboss/agent/DsfSubscription.cpp +++ b/fboss/agent/DsfSubscription.cpp @@ -9,6 +9,7 @@ #include "fboss/agent/state/SwitchState.h" #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_common_types.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/thrift_cow/nodes/Serializer.h" #include "fboss/util/Logging.h" @@ -17,16 +18,22 @@ namespace { const thriftpath::RootThriftPath stateRoot; -fsdb::FsdbStreamClient::ServerOptions getServerOptions( +utils::ConnectionOptions getConnectionOptions( const std::string& srcIP, const std::string& dstIP) { // Subscribe to FSDB of DSF node in the cluster with: // dstIP = inband IP of that DSF node // dstPort = FSDB port // srcIP = self inband IP - // priority = CRITICAL - return fsdb::FsdbStreamClient::ServerOptions( - dstIP, FLAGS_fsdbPort, srcIP, fsdb::FsdbStreamClient::Priority::CRITICAL); + // tos = NC + return utils::ConnectionOptions(dstIP, FLAGS_fsdbPort) + .setSrcAddr(srcIP) + .setPreferEncrypted(false) + .setTrafficClass(utils::ConnectionOptions::TrafficClass::NC) + .setConnectionTimeout( + std::chrono::milliseconds(FLAGS_dsf_session_conn_timeout_ms)) + .setRecvTimeout( + std::chrono::milliseconds(FLAGS_dsf_session_recv_timeout_ms)); } const auto& getSystemPortsPath() { @@ -80,7 +87,7 @@ DsfSubscription::DsfSubscription( subscriberEvb)), subMgr_(new FsdbAdaptedSubManager( fsdb::SubscriptionOptions(opts_), - getServerOptions(localIp.str(), remoteIp.str()), + getConnectionOptions(localIp.str(), remoteIp.str()), reconnectEvb, subscriberEvb)), validator_(std::make_unique( @@ -172,7 +179,7 @@ void DsfSubscription::setupSubscription() { [this](fsdb::OperSubPathUnit&& operStateUnit) { handleFsdbUpdate(std::move(operStateUnit)); }, - getServerOptions(localIp_.str(), remoteIp_.str())); + getConnectionOptions(localIp_.str(), remoteIp_.str())); XLOG(DBG2) << kDsfCtrlLogPrefix << "added subscription for : " << remoteEndpointStr(); } diff --git a/fboss/agent/DsfUpdateValidator.cpp b/fboss/agent/DsfUpdateValidator.cpp index d07145fefcbad..e5f4a2ed5f5a4 100644 --- a/fboss/agent/DsfUpdateValidator.cpp +++ b/fboss/agent/DsfUpdateValidator.cpp @@ -2,6 +2,7 @@ #include "fboss/agent/DsfUpdateValidator.h" #include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/Utils.h" #include "fboss/agent/state/DeltaFunctions.h" #include "fboss/agent/state/InterfaceMap.h" #include "fboss/agent/state/StateDelta.h" @@ -25,26 +26,13 @@ void DsfUpdateValidator::validate( " not found for : ", sysPort.getName()); } - auto sysPortRange = dsfNode->getSystemPortRange(); - if (!sysPortRange.has_value()) { - throw FbossError( - "No system port range for node ", - dsfNode->getName(), - " corresponding to ", - sysPort.getName()); - } - if (sysPort.getID() < *sysPortRange->minimum() || - sysPort.getID() > *sysPortRange->maximum()) { + if (!withinRange(dsfNode->getSystemPortRanges(), sysPort.getID())) { throw FbossError( "Sys port : ", sysPort.getName(), " belonging to: ", sysPort.getSwitchId(), - " out of range: [", - *sysPortRange->minimum(), - ", ", - *sysPortRange->maximum(), - "]"); + " out of range"); } }; DeltaFunctions::forEachChanged( diff --git a/fboss/agent/FabricConnectivityManager.cpp b/fboss/agent/FabricConnectivityManager.cpp index 70e41bb8390ff..9ae3af35d2368 100644 --- a/fboss/agent/FabricConnectivityManager.cpp +++ b/fboss/agent/FabricConnectivityManager.cpp @@ -23,6 +23,12 @@ #include "fboss/agent/hw/switch_asics/RamonAsic.h" #include + +DEFINE_bool( + janga_single_npu_for_testing, + false, + "Fabric connectivity manager to use single NPU janga platform for testing."); + using facebook::fboss::DeltaFunctions::forEachAdded; using facebook::fboss::DeltaFunctions::forEachChanged; using facebook::fboss::DeltaFunctions::forEachRemoved; @@ -56,13 +62,14 @@ getPlatformMappingForDsfNode(const PlatformType platformType) { true /*multiNpuPlatformMapping*/}; return &meru800bfa; } - case PlatformType::PLATFORM_MERU800BIA: { + case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: { static Meru800biaPlatformMapping meru800bia; return &meru800bia; } case PlatformType::PLATFORM_JANGA800BIC: { static Janga800bicPlatformMapping janga800bic{ - true /*multiNpuPlatformMapping*/}; + !FLAGS_janga_single_npu_for_testing /*multiNpuPlatformMapping*/}; return &janga800bic; } default: @@ -361,6 +368,35 @@ std::optional FabricConnectivityManager::getActualPortIdForSwitch( getRemotePortOffset(switchIdToDsfNode_[baseSwitchId]->getPlatformType())); } +std::pair, std::optional> +FabricConnectivityManager::getActualSwitchNameAndPortName( + uint64_t switchId, + int32_t portId) { + std::optional switchName{std::nullopt}, portName{std::nullopt}; + + auto switchIdIter = switchIdToBaseSwitchIdAndSwitchName_.find(switchId); + if (switchIdIter == switchIdToBaseSwitchIdAndSwitchName_.end()) { + XLOG(ERR) << "Unknown Peer SwitchID: " << static_cast(switchId); + } else { + SwitchID baseSwitchId; + + std::tie(baseSwitchId, switchName) = switchIdIter->second; + + auto actualPortId = getActualPortIdForSwitch( + PortID(portId), SwitchID(switchId), baseSwitchId, switchName.value()); + if (actualPortId.has_value()) { + const auto platformMapping = getPlatformMappingForDsfNode( + switchIdToDsfNode_[baseSwitchId]->getPlatformType()); + if (!platformMapping) { + throw FbossError("Unable to find platform mapping for port: ", portId); + } + portName = platformMapping->getPortNameByPortId(actualPortId.value()); + } + } + + return std::make_pair(switchName, portName); +} + std::optional FabricConnectivityManager::processConnectivityInfoForPort( const PortID& portId, @@ -384,42 +420,29 @@ FabricConnectivityManager::processConnectivityInfoForPort( if (iter->second.expectedSwitchId().has_value() && iter->second.expectedSwitchId().value() == iter->second.switchId() && - iter->second.expectedSwitchName().has_value()) { + iter->second.expectedSwitchName().has_value() && + iter->second.expectedPortId().has_value() && + iter->second.expectedPortId().value() == iter->second.portId() && + iter->second.expectedPortName().has_value()) { + // actual{switchID, portID} == expected{switchID, portID} iter->second.switchName() = iter->second.expectedSwitchName().value(); - - if (iter->second.expectedPortId().has_value() && - iter->second.expectedPortId().value() == iter->second.portId() && - iter->second.expectedPortName().has_value()) { - iter->second.portName() = iter->second.expectedPortName().value(); - } + iter->second.portName() = iter->second.expectedPortName().value(); } else { - auto switchIdIter = - switchIdToBaseSwitchIdAndSwitchName_.find(*iter->second.switchId()); - if (switchIdIter == switchIdToBaseSwitchIdAndSwitchName_.end()) { - XLOG(ERR) << "Unknown Peer SwitchID: " - << static_cast(*iter->second.switchId()); - } else { - auto& [baseSwitchId, switchName] = switchIdIter->second; - iter->second.switchName() = switchName; - - auto actualPortId = getActualPortIdForSwitch( - *iter->second.portId(), - SwitchID(*iter->second.switchId()), - baseSwitchId, - switchName); - if (actualPortId.has_value()) { - const auto platformMapping = getPlatformMappingForDsfNode( - switchIdToDsfNode_[baseSwitchId]->getPlatformType()); - if (!platformMapping) { - throw FbossError( - "Unable to find platform mapping for port: ", portId); - } - auto portName = - platformMapping->getPortNameByPortId(actualPortId.value()); - if (portName.has_value()) { - iter->second.portName() = portName.value(); - } - } + // Miscabling: + // - Connected to expected Switch but on wrong port + // - Connected to non-expected Switch + // Expected switchName/portName are not set + // + // For any of these scenarios, derive SwitchName, PortName + // from actual{switchID, portID}. + auto [switchName, portName] = getActualSwitchNameAndPortName( + *iter->second.switchId(), *iter->second.portId()); + + if (switchName.has_value()) { + iter->second.switchName() = switchName.value(); + } + if (portName.has_value()) { + iter->second.portName() = portName.value(); } } } else { diff --git a/fboss/agent/FabricConnectivityManager.h b/fboss/agent/FabricConnectivityManager.h index 3de7f7ce9db0f..c3f1e86545e94 100644 --- a/fboss/agent/FabricConnectivityManager.h +++ b/fboss/agent/FabricConnectivityManager.h @@ -11,6 +11,8 @@ #include "fboss/agent/state/StateDelta.h" #include "fboss/agent/types.h" +DECLARE_bool(janga_single_npu_for_testing); + namespace facebook::fboss { class HwAsic; class SwitchState; @@ -66,6 +68,8 @@ class FabricConnectivityManager { uint64_t switchId, uint64_t baseSwitchId, const auto& switchName); + std::pair, std::optional> + getActualSwitchNameAndPortName(uint64_t switchId, int32_t portId); private: void updateExpectedSwitchIdAndPortIdForPort(PortID portID); diff --git a/fboss/agent/FbossEventBase.h b/fboss/agent/FbossEventBase.h index 877624ed08862..8f8059259c56d 100644 --- a/fboss/agent/FbossEventBase.h +++ b/fboss/agent/FbossEventBase.h @@ -11,16 +11,20 @@ #include #include +#include namespace facebook::fboss { class FbossEventBase : public folly::EventBase { public: + explicit FbossEventBase(const std::string& name) : eventBaseName_(name) {} + void runInFbossEventBaseThread(Func fn) noexcept { - runInEventBaseThread(std::move(fn)); if (!isRunning()) { - XLOG(ERR) << "Cannot enqueue callback to non-running FbossEventBase."; + XLOG(ERR) << "runInFbossEventBaseThread to non-running " << eventBaseName_ + << " FbossEventBase."; } + runInEventBaseThread(std::move(fn)); } template @@ -29,18 +33,24 @@ class FbossEventBase : public folly::EventBase { } void runInFbossEventBaseThreadAndWait(Func fn) noexcept { - runInEventBaseThreadAndWait(std::move(fn)); if (!isRunning()) { - XLOG(ERR) << "Cannot enqueue callback to non-running FbossEventBase."; + XLOG(ERR) << "runInFbossEventBaseThreadAndWait for non-running " + << eventBaseName_ << " FbossEventBase."; } + runInEventBaseThreadAndWait(std::move(fn)); } void runImmediatelyOrRunInFbossEventBaseThreadAndWait(Func fn) noexcept { - runImmediatelyOrRunInEventBaseThreadAndWait(std::move(fn)); if (!isRunning()) { - XLOG(ERR) << "Cannot enqueue callback to non-running FbossEventBase."; + XLOG(ERR) + << "runImmediatelyOrRunInFbossEventBaseThreadAndWait for non-running " + << eventBaseName_ << " FbossEventBase."; } + runImmediatelyOrRunInEventBaseThreadAndWait(std::move(fn)); } + + private: + std::string eventBaseName_; }; } // namespace facebook::fboss diff --git a/fboss/agent/HwAgentMain.cpp b/fboss/agent/HwAgentMain.cpp index 919bb87f70291..43ba953fe7aa8 100644 --- a/fboss/agent/HwAgentMain.cpp +++ b/fboss/agent/HwAgentMain.cpp @@ -22,6 +22,7 @@ #include "fboss/agent/HwSwitch.h" #include "fboss/agent/RestartTimeTracker.h" #include "fboss/agent/SetupThrift.h" +#include "fboss/agent/TestUtils.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" #include "fboss/agent/mnpu/SplitAgentThriftSyncer.h" #include "fboss/agent/state/StateDelta.h" @@ -157,6 +158,10 @@ int hwAgentMain( fb303::fbData->setUseOptionsAsFlags(true); auto config = fbossCommonInit(argc, argv, true /*useBitsflowAclFileSuffix*/); + if (FLAGS_thrift_test_utils_thrift_handler || FLAGS_hw_agent_for_testing) { + config = getConfigFileForTesting(FLAGS_switchIndex); + } + auto hwAgent = std::make_unique( std::move(config), hwFeaturesDesired, initPlatformFn, FLAGS_switchIndex); @@ -202,7 +207,7 @@ int hwAgentMain( std::vector> handlers{}; handlers.push_back(hwAgent->getPlatform()->createHandler()); - if (FLAGS_thrift_test_utils_thrift_handler) { + if (FLAGS_thrift_test_utils_thrift_handler || FLAGS_hw_agent_for_testing) { // Add HwTestThriftHandler to the thrift server auto testUtilsHandler = utility::createHwTestThriftHandler( hwAgent->getPlatform()->getHwSwitch()); diff --git a/fboss/agent/HwSwitch.cpp b/fboss/agent/HwSwitch.cpp index cbfb80362daeb..76f445cbc06e6 100644 --- a/fboss/agent/HwSwitch.cpp +++ b/fboss/agent/HwSwitch.cpp @@ -85,6 +85,7 @@ constexpr auto kBuildSdkVersion = "SDK Version"; This function will match each type of sdk and produce results accordingly. */ std::tuple normalizeSdkVersion(std::string sdkVersion) { + // Chenab-TODO(pshaikh): add CHENAB SAI support for sdk version normalization /* Matches broadcom SDK version strings (e.g: BCM SDK Version: sdk-6.5.17) */ constexpr auto bcmSdkVerRegex = "BCM SDK Version: sdk-([0-9]{1,2})\\.([0-9]{1,2})\\.([0-9]{1,2})"; diff --git a/fboss/agent/HwSwitchCallback.h b/fboss/agent/HwSwitchCallback.h index ef79cbeb96063..a77ec8ba083f5 100644 --- a/fboss/agent/HwSwitchCallback.h +++ b/fboss/agent/HwSwitchCallback.h @@ -39,6 +39,7 @@ class HwSwitchCallback { virtual void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) = 0; /* diff --git a/fboss/agent/HwSwitchConnectionStatusTable.cpp b/fboss/agent/HwSwitchConnectionStatusTable.cpp index f4f865f95d778..e694ac5accb77 100644 --- a/fboss/agent/HwSwitchConnectionStatusTable.cpp +++ b/fboss/agent/HwSwitchConnectionStatusTable.cpp @@ -64,10 +64,21 @@ bool HwSwitchConnectionStatusTable::waitUntilHwSwitchConnected() { if (!connectedSwitches_.empty()) { return true; } - hwSwitchConnectedCV_.wait(lk, [this] { - return !connectedSwitches_.empty() || connectionWaitCancelled_; - }); - return !connectionWaitCancelled_; + if (FLAGS_hw_agent_connection_timeout_ms != 0) { + hwSwitchConnectedCV_.wait_for( + lk, + std::chrono::milliseconds(FLAGS_hw_agent_connection_timeout_ms), + [this] { + return !connectedSwitches_.empty() || connectionWaitCancelled_; + }); + return !connectedSwitches_.empty() && !connectionWaitCancelled_; + } else { + // Wait forever for HwSwitch to connect + hwSwitchConnectedCV_.wait(lk, [this] { + return !connectedSwitches_.empty() || connectionWaitCancelled_; + }); + return !connectionWaitCancelled_; + } } void HwSwitchConnectionStatusTable::cancelWait() { diff --git a/fboss/agent/HwSwitchHandler.h b/fboss/agent/HwSwitchHandler.h index acb0b1be7a18c..af33f9babc947 100644 --- a/fboss/agent/HwSwitchHandler.h +++ b/fboss/agent/HwSwitchHandler.h @@ -131,7 +131,7 @@ class HwSwitchHandler { const SwitchID switchId_; const cfg::SwitchInfo info_; - FbossEventBase hwSwitchManagerEvb_; + FbossEventBase hwSwitchManagerEvb_{"HwSwitchManagerEvb"}; std::unique_ptr hwSwitchManagerThread_; const OperDeltaFilter operDeltaFilter_; }; diff --git a/fboss/agent/LacpMachines.cpp b/fboss/agent/LacpMachines.cpp index 15560b2d2d942..6d61dcf702ef6 100644 --- a/fboss/agent/LacpMachines.cpp +++ b/fboss/agent/LacpMachines.cpp @@ -857,10 +857,10 @@ void Selector::select() { portToSelection().end(), [targetLagID](PortIDToSelection::value_type el) { Selection s = el.second; - return s.lagID == targetLagID && s.state == SelectionState::STANDBY; + return s.lagID == targetLagID; }); - if (targetLagMemberCount == minLinkCount_) { + if (targetLagMemberCount >= minLinkCount_) { auto portsToSignal = getPortsWithSelection( Selection(targetLagID, SelectionState::STANDBY)); controller_.selected( @@ -944,7 +944,11 @@ void Selector::unselected() { auto ports = getPortsWithSelection(Selection(myLagID, SelectionState::SELECTED)); - controller_.standby(folly::range(ports.begin(), ports.end())); + if (ports.size() < minLinkCount_) { + controller_.standby(folly::range(ports.begin(), ports.end())); + } else { + controller_.standby(); + } } void Selector::selected() { diff --git a/fboss/agent/MacTableManager.cpp b/fboss/agent/MacTableManager.cpp index 047efce67ba4e..bb2a968f8a50b 100644 --- a/fboss/agent/MacTableManager.cpp +++ b/fboss/agent/MacTableManager.cpp @@ -9,6 +9,7 @@ */ #include "fboss/agent/MacTableManager.h" +#include "fboss/agent/FbossHwUpdateError.h" #include "fboss/agent/L2Entry.h" #include "fboss/agent/MacTableUtils.h" #include "fboss/agent/SwSwitch.h" @@ -18,6 +19,14 @@ namespace facebook::fboss { MacTableManager::MacTableManager(SwSwitch* sw) : sw_(sw) {} +bool MacTableManager::isHwUpdateProtected() { + // this API return true if the platform supports hw protection + // for this we are using transactionsSupported() API + // and return true for SAI switches. MAC protection uses transactions + // support in HW switch which is available only in SAI switches + return sw_->getHwSwitchHandler()->transactionsSupported(); +} + void MacTableManager::handleL2LearningUpdate( L2Entry l2Entry, L2EntryUpdateType l2EntryUpdateType) { @@ -26,9 +35,21 @@ void MacTableManager::handleL2LearningUpdate( return MacTableUtils::updateMacTable(state, l2Entry, l2EntryUpdateType); }; - sw_->updateStateNoCoalescing( - folly::to("Programming : ", l2Entry.str()), - std::move(updateMacTableFn)); + if (FLAGS_enable_mac_update_protection && isHwUpdateProtected()) { + try { + sw_->updateStateWithHwFailureProtection( + folly::to( + "Programming with hw failure protection : ", l2Entry.str()), + std::move(updateMacTableFn)); + } catch (const FbossHwUpdateError& e) { + XLOG(ERR) << "Exception: " << e.what() << std::endl; + sw_->stats()->macTableUpdateFailure(); + } + } else { + sw_->updateStateNoCoalescing( + folly::to("Programming : ", l2Entry.str()), + std::move(updateMacTableFn)); + } } } // namespace facebook::fboss diff --git a/fboss/agent/MacTableManager.h b/fboss/agent/MacTableManager.h index 0adfe3025eadd..b7057fb2c2cfe 100644 --- a/fboss/agent/MacTableManager.h +++ b/fboss/agent/MacTableManager.h @@ -11,6 +11,8 @@ #include "fboss/agent/L2Entry.h" +DECLARE_bool(enable_mac_update_protection); + namespace facebook::fboss { class SwSwitch; @@ -22,6 +24,7 @@ class MacTableManager { void handleL2LearningUpdate( L2Entry l2Entry, L2EntryUpdateType l2EntryUpdateType); + bool isHwUpdateProtected(); private: // Forbidden copy constructor and assignment operator diff --git a/fboss/agent/MirrorManagerImpl.cpp b/fboss/agent/MirrorManagerImpl.cpp index 483364ed5a60c..337221a54abd3 100644 --- a/fboss/agent/MirrorManagerImpl.cpp +++ b/fboss/agent/MirrorManagerImpl.cpp @@ -77,9 +77,7 @@ std::shared_ptr MirrorManagerImpl::updateMirror( std::optional egressPortDesc = std::nullopt; if (mirror->configHasEgressPort()) { - egressPortDesc = mirror->getEgressPortDesc().has_value() - ? mirror->getEgressPortDesc().value() - : PortDescriptor(mirror->getEgressPort().value()); + egressPortDesc = PortDescriptor(mirror->getEgressPort().value()); } auto newMirror = std::make_shared( mirror->getID(), @@ -102,11 +100,9 @@ std::shared_ptr MirrorManagerImpl::updateMirror( } auto neighborPort = entry->getPort(); if (mirror->configHasEgressPort()) { - auto egressPort = mirror->getEgressPortDesc().has_value() - ? mirror->getEgressPortDesc().value().phyPortID() - : mirror->getEgressPort().value(); + egressPortDesc = mirror->getEgressPortDesc().value(); if (!neighborPort.isPhysicalPort() || - neighborPort.phyPortID() != egressPort) { + neighborPort.phyPortID() != egressPortDesc->phyPortID()) { // TODO: support configuring LAG egress for mirror continue; } @@ -155,7 +151,6 @@ std::shared_ptr MirrorManagerImpl::updateMirror( entry, newMirror->getTunnelUdpPorts())); newMirror->setEgressPortDesc(egressPortDesc.value()); - newMirror->setEgressPort(egressPortDesc.value().phyPortID()); break; } diff --git a/fboss/agent/MultiSwitchThriftHandler.cpp b/fboss/agent/MultiSwitchThriftHandler.cpp index 9bb9c7d1ed999..48f9b7d528448 100644 --- a/fboss/agent/MultiSwitchThriftHandler.cpp +++ b/fboss/agent/MultiSwitchThriftHandler.cpp @@ -64,11 +64,12 @@ void MultiSwitchThriftHandler::processLinkState( << *linkStateEvent.port() << " up :" << (*linkStateEvent.up() ? "UP" : "DOWN"); PortID portId = PortID(*linkStateEvent.port()); + cfg::PortType portType = *linkStateEvent.portType(); std::optional faultStatus; if (linkStateEvent.iPhyLinkFaultStatus()) { faultStatus = *linkStateEvent.iPhyLinkFaultStatus(); } - sw_->linkStateChanged(portId, *linkStateEvent.up(), faultStatus); + sw_->linkStateChanged(portId, *linkStateEvent.up(), portType, faultStatus); } void MultiSwitchThriftHandler::processLinkActiveState( diff --git a/fboss/agent/Platform.cpp b/fboss/agent/Platform.cpp index a27dc830da2e1..95fa6457d65f3 100644 --- a/fboss/agent/Platform.cpp +++ b/fboss/agent/Platform.cpp @@ -116,8 +116,13 @@ void Platform::init( const auto& dsfNodesConfig = *config_->thrift.sw()->dsfNodes(); const auto& dsfNodeConfig = dsfNodesConfig.find(*switchId); if (dsfNodeConfig != dsfNodesConfig.end() && - dsfNodeConfig->second.systemPortRange().has_value()) { - systemPortRange = *dsfNodeConfig->second.systemPortRange(); + !dsfNodeConfig->second.systemPortRanges() + ->systemPortRanges() + ->empty()) { + // FIXME[2-stage DSF] Pass SystemPortRanges to ASIC + systemPortRange = *dsfNodeConfig->second.systemPortRanges() + ->systemPortRanges() + ->begin(); } } else if (switchType == cfg::SwitchType::FABRIC) { fabricNodeRole = HwAsic::FabricNodeRole::SINGLE_STAGE_L1; diff --git a/fboss/agent/PlatformPort.cpp b/fboss/agent/PlatformPort.cpp index 1f2d48c974b80..e435ea68cfaf3 100644 --- a/fboss/agent/PlatformPort.cpp +++ b/fboss/agent/PlatformPort.cpp @@ -115,7 +115,6 @@ PlatformPort::getTransceiverPinConfigs(cfg::PortProfileID profileID) const { phy::PortPinConfig PlatformPort::getPortXphyPinConfig( cfg::PortProfileID profileID) const { if (platform_->needTransceiverInfo()) { - FbossEventBase evb; auto transceiverSpec = getTransceiverInfo(); if (transceiverSpec) { return platform_->getPlatformMapping()->getPortXphyPinConfig( @@ -249,7 +248,6 @@ const phy::PortProfileConfig PlatformPort::getPortProfileConfig( const std::optional PlatformPort::getPortProfileConfigIf(cfg::PortProfileID profileID) const { if (platform_->needTransceiverInfo()) { - FbossEventBase evb; auto transceiverSpec = getTransceiverInfo(); if (transceiverSpec) { return platform_->getPortProfileConfig(PlatformPortProfileConfigMatcher( diff --git a/fboss/agent/RemoteNeighborUpdater.cpp b/fboss/agent/RemoteNeighborUpdater.cpp new file mode 100644 index 0000000000000..ff686cef57e43 --- /dev/null +++ b/fboss/agent/RemoteNeighborUpdater.cpp @@ -0,0 +1,97 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/RemoteNeighborUpdater.h" + +#include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/SwSwitch.h" +#include "fboss/agent/SwitchIdScopeResolver.h" +#include "fboss/agent/state/SwitchState.h" + +namespace facebook::fboss { + +RemoteNeighborUpdater::RemoteNeighborUpdater(SwSwitch* sw) : sw_(sw) { + sw_->registerStateObserver(this, "RemoteNeighborUpdater"); +} + +void RemoteNeighborUpdater::stateUpdated(const StateDelta& delta) { + if (delta.getIntfsDelta().getOld() == delta.getIntfsDelta().getNew()) { + /* no change */ + return; + } + if (!sw_->getScopeResolver()->hasVoq()) { + XLOG(WARNING) << "No VOQ switches, ignoring interface update"; + return; + } + // isolated system port interfaces are treated as remote system port + // interfaces, they exist on an another voq switch within the same fboss + // switch + auto voqScope = sw_->getScopeResolver()->scope(cfg::SwitchType::VOQ); + if (voqScope.size() == 1) { + XLOG(WARNING) << "No multiple VOQ switches, ignoring system ports update"; + return; + } + std::vector changedIntfs; + DeltaFunctions::forEachChanged( + delta.getIntfsDelta(), + [&changedIntfs](auto /*oldNode*/, auto newNode) { + if (newNode->getType() != cfg::InterfaceType::SYSTEM_PORT) { + return; + } + changedIntfs.emplace_back(newNode->getID()); + }, + [&changedIntfs](auto newNode) { + changedIntfs.emplace_back(newNode->getID()); + }, + [](auto /*oldNode*/) { + // nothing to do. Remote interfaces are deleted as part of config + // apply + }); + + if (changedIntfs.empty()) { + // no change + return; + } + sw_->updateState( + "update isolated system port interfaces", + [this, changedIntfs = std::move(changedIntfs)]( + const std::shared_ptr& appliedState) { + // apply on an applied state + auto desiredState = appliedState->clone(); + for (const auto& intfID : changedIntfs) { + auto newInterface = appliedState->getInterfaces()->getNodeIf(intfID); + CHECK(newInterface); + processChangedInterface(&desiredState, newInterface); + } + return desiredState; + }); +} + +void RemoteNeighborUpdater::processChangedInterface( + std::shared_ptr* state, + const std::shared_ptr& newInterface) const { + auto remoteInterfaces = (*state)->getRemoteInterfaces()->modify(state); + auto systemPortID = SystemPortID(static_cast(newInterface->getID())); + auto switchID = sw_->getScopeResolver()->scope(systemPortID).switchId(); + auto scope = sw_->getScopeResolver()->scope(cfg::SwitchType::VOQ); + scope.exclude(switchID); + auto innerMap = remoteInterfaces->getMapNodeIf(scope); + CHECK(innerMap); + innerMap = innerMap->clone(); + + auto oldRemoteInterface = innerMap->getNodeIf(newInterface->getID()); + CHECK(oldRemoteInterface); + auto newRemoteInterface = oldRemoteInterface->clone(); + newRemoteInterface->setArpTable(newInterface->getArpTable()->toThrift()); + newRemoteInterface->setNdpTable(newInterface->getNdpTable()->toThrift()); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface->getArpTable(), newRemoteInterface->getArpTable()); + DsfStateUpdaterUtil::updateNeighborEntry( + oldRemoteInterface->getNdpTable(), newRemoteInterface->getNdpTable()); + + innerMap->updateNode(newRemoteInterface); + XLOG(DBG2) << "Updated isolated system port interface " + << newRemoteInterface->getID() << " from " + << scope.matcherString(); + remoteInterfaces->updateMapNode(innerMap, scope); +} +} // namespace facebook::fboss diff --git a/fboss/agent/RemoteNeighborUpdater.h b/fboss/agent/RemoteNeighborUpdater.h new file mode 100644 index 0000000000000..f23a937bc6419 --- /dev/null +++ b/fboss/agent/RemoteNeighborUpdater.h @@ -0,0 +1,24 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once + +#include "fboss/agent/StateObserver.h" + +namespace facebook::fboss { + +class SwSwitch; + +class RemoteNeighborUpdater : public StateObserver { + public: + explicit RemoteNeighborUpdater(SwSwitch* sw); + virtual ~RemoteNeighborUpdater() override {} + void stateUpdated(const StateDelta& delta) override; + + private: + void processChangedInterface( + std::shared_ptr* state, + const std::shared_ptr& newInterface) const; + SwSwitch* sw_{nullptr}; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/ResourceAccountant.cpp b/fboss/agent/ResourceAccountant.cpp index 220798a467b97..4ae8f891dafca 100644 --- a/fboss/agent/ResourceAccountant.cpp +++ b/fboss/agent/ResourceAccountant.cpp @@ -176,7 +176,7 @@ bool ResourceAccountant::shouldCheckRouteUpdate() const { return false; } -bool ResourceAccountant::stateChangedImpl(const StateDelta& delta) { +bool ResourceAccountant::ecmpStateChangedImpl(const StateDelta& delta) { if (!checkRouteUpdate_) { return true; } @@ -211,7 +211,7 @@ bool ResourceAccountant::stateChangedImpl(const StateDelta& delta) { } bool ResourceAccountant::isValidRouteUpdate(const StateDelta& delta) { - bool validRouteUpdate = stateChangedImpl(delta); + bool validRouteUpdate = ecmpStateChangedImpl(delta); if (FLAGS_dlbResourceCheckEnable && FLAGS_flowletSwitchingEnable && checkDlbResource_ && !validRouteUpdate) { @@ -257,10 +257,6 @@ bool ResourceAccountant::isValidRouteUpdate(const StateDelta& delta) { return validRouteUpdate; } -void ResourceAccountant::stateChanged(const StateDelta& delta) { - stateChangedImpl(delta); -} - void ResourceAccountant::enableDlbResourceCheck(bool enable) { checkDlbResource_ = enable; } @@ -275,4 +271,52 @@ ResourceAccountant::checkAndUpdateEcmpResource( const std::shared_ptr>& route, bool add); +// calculate new update for l2 entries from the delta +// check l2Entries_ in the switchState +// return true if the l2Entries_ are within the limit +bool ResourceAccountant::l2StateChangedImpl(const StateDelta& delta) { + auto processDelta = [&](const auto& deltaMac) { + DeltaFunctions::forEachChanged( + deltaMac, + [&](const auto& /*oldMac*/, const auto& /*newMac*/) { + return LoopAction::CONTINUE; + }, + [&](const auto& /*newMac*/) { + l2Entries_++; + return LoopAction::CONTINUE; + }, + [&](const auto& /*deletedMac*/) { + l2Entries_--; + return LoopAction::CONTINUE; + }); + }; + + for (auto& deltaVlan : delta.getVlansDelta()) { + processDelta(deltaVlan.getMacDelta()); + } + if (l2Entries_ > FLAGS_max_l2_entries) { + XLOG(ERR) << "Total l2 entries in new switchState: " << l2Entries_ + << " exceeds the limit: " << FLAGS_max_l2_entries; + return false; + } + return true; +} + +void ResourceAccountant::stateChanged(const StateDelta& delta) { + ecmpStateChangedImpl(delta); + if (FLAGS_enable_mac_update_protection) { + l2StateChangedImpl(delta); + } +} + +bool ResourceAccountant::isValidUpdate(const StateDelta& delta) { + bool validRouteUpdate = isValidRouteUpdate(delta); + bool validL2Update = true; + + if (FLAGS_enable_mac_update_protection) { + validL2Update = l2StateChangedImpl(delta); + } + + return validRouteUpdate && validL2Update; +} } // namespace facebook::fboss diff --git a/fboss/agent/ResourceAccountant.h b/fboss/agent/ResourceAccountant.h index 38d93b3d488c9..14084511ab49e 100644 --- a/fboss/agent/ResourceAccountant.h +++ b/fboss/agent/ResourceAccountant.h @@ -16,12 +16,17 @@ #include +DECLARE_int32(max_l2_entries); + +DECLARE_bool(enable_mac_update_protection); + namespace facebook::fboss { class ResourceAccountant { public: explicit ResourceAccountant(const HwAsicTable* asicTable); + bool isValidUpdate(const StateDelta& delta); bool isValidRouteUpdate(const StateDelta& delta); void stateChanged(const StateDelta& delta); void enableDlbResourceCheck(bool enable); @@ -30,7 +35,7 @@ class ResourceAccountant { int getMemberCountForEcmpGroup(const RouteNextHopEntry& fwd) const; bool checkEcmpResource(bool intermediateState) const; bool checkDlbResource(uint32_t resourcePercentage) const; - bool stateChangedImpl(const StateDelta& delta); + bool ecmpStateChangedImpl(const StateDelta& delta); bool shouldCheckRouteUpdate() const; bool isEcmp(const RouteNextHopEntry& fwd) const; int computeWeightedEcmpMemberCount( @@ -42,6 +47,8 @@ class ResourceAccountant { const std::shared_ptr>& route, bool add); + bool l2StateChangedImpl(const StateDelta& delta); + uint32_t ecmpMemberUsage_{0}; std::map ecmpGroupRefMap_; @@ -49,11 +56,13 @@ class ResourceAccountant { bool nativeWeightedEcmp_{true}; bool checkRouteUpdate_; bool checkDlbResource_{true}; + int32_t l2Entries_{0}; FRIEND_TEST(ResourceAccountantTest, getMemberCountForEcmpGroup); FRIEND_TEST(ResourceAccountantTest, checkDlbResource); FRIEND_TEST(ResourceAccountantTest, checkEcmpResource); FRIEND_TEST(ResourceAccountantTest, checkAndUpdateEcmpResource); FRIEND_TEST(ResourceAccountantTest, computeWeightedEcmpMemberCount); + FRIEND_TEST(MacTableManagerTest, MacLearnedBulkCb); }; } // namespace facebook::fboss diff --git a/fboss/agent/SetupThrift.cpp b/fboss/agent/SetupThrift.cpp index 6b5e70357a51a..a5303953ec62a 100644 --- a/fboss/agent/SetupThrift.cpp +++ b/fboss/agent/SetupThrift.cpp @@ -21,11 +21,19 @@ DEFINE_int32( 30, "Thrift task expire timeout in seconds."); +// TODO: remove after netcastle changes are in place DEFINE_bool( thrift_test_utils_thrift_handler, false, "Enable thrift handler for HW tests"); +DEFINE_bool( + hw_agent_for_testing, + false, + "Whether to prepare hw agent for testing. This includes " + "1) Enable thrift handler for HW tests, " + "2) Consume config file created by sw agent with overrides."); + namespace facebook::fboss { std::unique_ptr setupThriftServer( folly::EventBase& eventBase, diff --git a/fboss/agent/SetupThrift.h b/fboss/agent/SetupThrift.h index e33dc0002a497..d87bfbe141d9d 100644 --- a/fboss/agent/SetupThrift.h +++ b/fboss/agent/SetupThrift.h @@ -21,7 +21,9 @@ DECLARE_int32(thrift_idle_timeout); DECLARE_int32(thrift_task_expire_timeout); +// TODO: remove after netcastle changes are in place DECLARE_bool(thrift_test_utils_thrift_handler); +DECLARE_bool(hw_agent_for_testing); namespace facebook::fboss { diff --git a/fboss/agent/SwAgentInitializer.cpp b/fboss/agent/SwAgentInitializer.cpp index ed57e2a4ae957..fc0819affbe20 100644 --- a/fboss/agent/SwAgentInitializer.cpp +++ b/fboss/agent/SwAgentInitializer.cpp @@ -229,7 +229,7 @@ int SwAgentInitializer::initAgent( swHandler->setIdleTimeout(FLAGS_thrift_idle_timeout); auto handlers = getThrifthandlers(); handlers.push_back(swHandler); - eventBase_ = new FbossEventBase(); + eventBase_ = new FbossEventBase("SwAgentInitializerInitAgentEventBase"); std::vector ports = {FLAGS_port, FLAGS_migrated_port}; // serve on hw agent port in mono so that clients can access // hw agent apis on mono as well diff --git a/fboss/agent/SwSwitch.cpp b/fboss/agent/SwSwitch.cpp index c9240259a0558..3c884870ec3d3 100644 --- a/fboss/agent/SwSwitch.cpp +++ b/fboss/agent/SwSwitch.cpp @@ -57,6 +57,7 @@ #include "fboss/agent/PhySnapshotManager.h" #include "fboss/agent/PortStats.h" #include "fboss/agent/PortUpdateHandler.h" +#include "fboss/agent/RemoteNeighborUpdater.h" #include "fboss/agent/ResolvedNexthopMonitor.h" #include "fboss/agent/ResolvedNexthopProbeScheduler.h" #include "fboss/agent/RestartTimeTracker.h" @@ -183,6 +184,13 @@ DEFINE_bool(rx_sw_priority, false, "Enable rx packet prioritization"); DEFINE_int32(rx_pkt_thread_timeout, 100, "Rx packet thread timeout (ms)"); +DEFINE_int32(max_l2_entries, 1000, "Maximum L2 entries supported"); + +DEFINE_bool( + enable_mac_update_protection, + false, + "Enable MAC table update protection"); + using namespace facebook::fboss; namespace { @@ -429,6 +437,7 @@ SwSwitch::SwSwitch( routeUpdateLogger_(new RouteUpdateLogger(this)), resolvedNexthopMonitor_(new ResolvedNexthopMonitor(this)), resolvedNexthopProbeScheduler_(new ResolvedNexthopProbeScheduler(this)), + remoteNeighborUpdater_(new RemoteNeighborUpdater(this)), portUpdateHandler_(new PortUpdateHandler(this)), lookupClassUpdater_(new LookupClassUpdater(this)), lookupClassRouteUpdater_(new LookupClassRouteUpdater(this)), @@ -541,6 +550,7 @@ void SwSwitch::stop(bool isGracefulStop, bool revertToMinAlpmState) { resolvedNexthopMonitor_.reset(); resolvedNexthopProbeScheduler_.reset(); + remoteNeighborUpdater_.reset(); // Several member variables are performing operations in the background // thread. Ask them to stop, before we shut down the background thread. // @@ -1165,6 +1175,11 @@ std::shared_ptr SwSwitch::preInit(SwitchFlags flags) { << " | SDK version: " << getAsicSdkVersion(sdkVersion_) << " | Agent version: " << getBuildPackageVersion(); + swSwitchWarmbootHelper_->logBoot( + apache::thrift::util::enumNameSafe(bootType_), + getAsicSdkVersion(sdkVersion_), + getBuildPackageVersion()); + multiHwSwitchHandler_->start(); std::optional wbState{}; if (bootType_ == BootType::WARM_BOOT) { @@ -1753,7 +1768,7 @@ std::shared_ptr SwSwitch::applyUpdate( return oldState; } - if (!resourceAccountant_->isValidRouteUpdate(delta)) { + if (!resourceAccountant_->isValidUpdate(delta)) { // Notify resource account to revert back to previous state resourceAccountant_->stateChanged(StateDelta(newState, oldState)); return oldState; @@ -2109,6 +2124,7 @@ void SwSwitch::pfcWatchdogStateChanged( void SwSwitch::linkStateChanged( PortID portId, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus) { if (!isFullyInitialized()) { XLOG(ERR) @@ -2148,8 +2164,20 @@ void SwSwitch::linkStateChanged( return newState; }; - updateStateNoCoalescing( - "Port OperState (UP/DOWN) Update", std::move(updateOperStateFn)); + + // Note: On NIF ports, we never coalesce link up/down updates to ensure + // expiry of NDP/ARP entries, but that is not applicable for Fabric port. + // Thus, coalesce updates on Fabric ports. This is especially useful for a + // flapping fabric ports as coalescing means that fewer state updates get + // queued and other state updates (e.g. drain request to take a flapping + // link off the prod) can get through quicker. + if (portType == cfg::PortType::FABRIC_PORT) { + updateState( + "Fabric Port OperState (UP/DOWN) Update", std::move(updateOperStateFn)); + } else { + updateStateNoCoalescing( + "Port OperState (UP/DOWN) Update", std::move(updateOperStateFn)); + } } void SwSwitch::linkActiveStateChanged( @@ -2222,7 +2250,23 @@ void SwSwitch::linkActiveStateChanged( return newState; }; - updateStateNoCoalescing( + + /* + * Consider the following scenario: + * - Continuous flaps on fabric port(s). + * - linkActiveStateChanged callbacks for each flap. + * - A large number of state updates will be queued. + * - If processed without coalescing, state update queue will build up. + * - This will significantly delay any other state updates. + * - For example, Self Healing's attempt to drain a flapping link will + * require a state update, and could get significantly delayed. + * + * Thus, process linkActiveStateChanged with coalescing. + * + * Note: On NIF ports, we never coalesce link up/down updates to ensure + * expiry of NDP/ARP entries, but that is not applicable for Fabric port. + */ + updateState( "Port ActiveState (ACTIVE/INACTIVE) Update", std::move(updateActiveStateFn)); } @@ -3461,7 +3505,8 @@ void SwSwitch::setPortsDownForSwitch(SwitchID switchId) { if (HwSwitchMatcher(matcher).has(switchId)) { for (const auto& port : std::as_const(*portMap)) { if (port.second->isUp()) { - linkStateChanged(port.second->getID(), false); + linkStateChanged( + port.second->getID(), false, port.second->getPortType()); } } } diff --git a/fboss/agent/SwSwitch.h b/fboss/agent/SwSwitch.h index b3ef1f298009b..a0e1f825e7413 100644 --- a/fboss/agent/SwSwitch.h +++ b/fboss/agent/SwSwitch.h @@ -42,7 +42,7 @@ #include #if FOLLY_HAS_COROUTINES -#include +#include #endif #include @@ -106,6 +106,7 @@ class SwSwitchWarmBootHelper; class AgentDirectoryUtil; class HwSwitchThriftClientTable; class ResourceAccountant; +class RemoteNeighborUpdater; inline static const int kHiPriorityBufferSize{1000}; inline static const int kMidPriorityBufferSize{1000}; @@ -217,6 +218,9 @@ class SwSwitch : public HwSwitchCallback { return hwSwitchThriftClientTable_.get(); } + ResourceAccountant* getResourceAccountant() const { + return resourceAccountant_.get(); + } /* * Initialize the switch. * @@ -560,6 +564,7 @@ class SwSwitch : public HwSwitchCallback { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override; void linkActiveStateChanged( @@ -1189,7 +1194,7 @@ class SwSwitch : public HwSwitchCallback { * A thread for performing various background tasks. */ std::unique_ptr backgroundThread_; - FbossEventBase backgroundEventBase_; + FbossEventBase backgroundEventBase_{"SwSwitchBackgroundEventBase"}; std::shared_ptr bgThreadHeartbeat_; /* @@ -1198,34 +1203,35 @@ class SwSwitch : public HwSwitchCallback { * ASIC front panel ports */ std::unique_ptr packetTxThread_; - FbossEventBase packetTxEventBase_; + FbossEventBase packetTxEventBase_{"SwSwitchPacketTxEventBase"}; std::shared_ptr packetTxThreadHeartbeat_; /* * A thread for sending packets to the distribution process */ std::shared_ptr pcapDistributionThread_; - FbossEventBase pcapDistributionEventBase_; + FbossEventBase pcapDistributionEventBase_{ + "SwSwitchPcapDistributionEventBase"}; /* * A thread for processing SwitchState updates. */ std::unique_ptr updateThread_; - FbossEventBase updateEventBase_; + FbossEventBase updateEventBase_{"SwSwitchUpdateEventBase"}; std::shared_ptr updThreadHeartbeat_; /* * A thread dedicated to LACP processing. */ std::unique_ptr lacpThread_; - FbossEventBase lacpEventBase_; + FbossEventBase lacpEventBase_{"SwSwitchLacpEventBase"}; std::shared_ptr lacpThreadHeartbeat_; /* * A thread dedicated to Arp and Ndp cache entry processing. */ std::unique_ptr neighborCacheThread_; - FbossEventBase neighborCacheEventBase_; + FbossEventBase neighborCacheEventBase_{"SwSwitchNeighborCacheEventBase"}; std::shared_ptr neighborCacheThreadHeartbeat_; /* @@ -1274,6 +1280,7 @@ class SwSwitch : public HwSwitchCallback { BootType bootType_{BootType::UNINITIALIZED}; std::unique_ptr lldpManager_; + std::unique_ptr remoteNeighborUpdater_; std::unique_ptr portUpdateHandler_; SwitchFlags flags_{SwitchFlags::DEFAULT}; diff --git a/fboss/agent/SwSwitchWarmBootHelper.cpp b/fboss/agent/SwSwitchWarmBootHelper.cpp index f3f93841d70ba..6a0691b620603 100644 --- a/fboss/agent/SwSwitchWarmBootHelper.cpp +++ b/fboss/agent/SwSwitchWarmBootHelper.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "fboss/agent/AgentDirectoryUtil.h" #include "fboss/agent/AsyncLogger.h" @@ -155,4 +156,35 @@ SwSwitchWarmBootHelper::reconstructStateAndRib( } return std::make_pair(state, std::move(rib)); } + +void SwSwitchWarmBootHelper::logBoot( + const std::string& bootType, + const std::string& sdkVersion, + const std::string& agentVersion) { + folly::File logFile; + try { + logFile = folly::File( + AgentDirectoryUtil().getAgentBootHistoryLogFile(), + O_RDWR | O_CREAT | O_APPEND); + } catch (const std::system_error&) { + // /var/facebook/logs/fboss/ might not exist for testing switch + XLOG(WARNING) + << "Agent boot history log failed to create under /var/facebook/logs/fboss/, using /tmp/"; + logFile = + folly::File("/tmp/wedge_agent_starts.log", O_RDWR | O_CREAT | O_TRUNC); + } + + auto now = std::chrono::system_clock::now(); + auto timer = std::chrono::system_clock::to_time_t(now); + std::tm tm; + localtime_r(&timer, &tm); + + std::ostringstream oss; + oss << "[ " << std::put_time(&tm, "%Y %B %d %H:%M:%S") + << " ]: " << "Start of a " << bootType << ", " + << "SDK version: " << sdkVersion << ", " + << "Agent version: " << agentVersion << std::endl; + auto ossString = oss.str(); + folly::writeFull(logFile.fd(), ossString.c_str(), ossString.size()); +} } // namespace facebook::fboss diff --git a/fboss/agent/SwSwitchWarmBootHelper.h b/fboss/agent/SwSwitchWarmBootHelper.h index f616fa952ae42..c21cef477b5b4 100644 --- a/fboss/agent/SwSwitchWarmBootHelper.h +++ b/fboss/agent/SwSwitchWarmBootHelper.h @@ -28,6 +28,10 @@ class SwSwitchWarmBootHelper { const std::string& warmBootDir() const { return warmBootDir_; } + void logBoot( + const std::string& bootType, + const std::string& sdkVersion, + const std::string& agentVersion); static std::pair< std::shared_ptr, diff --git a/fboss/agent/SwitchStats.cpp b/fboss/agent/SwitchStats.cpp index fce7ccbf6384b..dc9d00f4f35c8 100644 --- a/fboss/agent/SwitchStats.cpp +++ b/fboss/agent/SwitchStats.cpp @@ -353,7 +353,12 @@ SwitchStats::SwitchStats(ThreadLocalStatsMap* map, int numSwitches) SUM, RATE), loPriPktsDropped_(map, kCounterPrefix + "lo_pri_pkts_dropped", SUM, RATE), - multiSwitchStatus_(map, kCounterPrefix + "multi_switch", SUM, RATE) + multiSwitchStatus_(map, kCounterPrefix + "multi_switch", SUM, RATE), + macTableUpdateFailure_( + map, + kCounterPrefix + "mac_table_update_failure", + SUM, + RATE) { for (auto switchIndex = 0; switchIndex < numSwitches; switchIndex++) { diff --git a/fboss/agent/SwitchStats.h b/fboss/agent/SwitchStats.h index bf95bf50b6a86..5b1f1b6d6a1d2 100644 --- a/fboss/agent/SwitchStats.h +++ b/fboss/agent/SwitchStats.h @@ -452,6 +452,14 @@ class SwitchStats : public boost::noncopyable { multiSwitchStatus_.addValue(enabled ? 1 : 0); } + void macTableUpdateFailure() { + macTableUpdateFailure_.addValue(1); + } + + int getMacTableUpdateFailure() const { + return getCumulativeValue(macTableUpdateFailure_); + } + void hiPriPktsReceived() { hiPriPktsReceived_.addValue(1); } @@ -1024,6 +1032,8 @@ class SwitchStats : public boost::noncopyable { // TODO: delete this once multi_switch becomes default TLTimeseries multiSwitchStatus_; + TLTimeseries macTableUpdateFailure_; + std::vector hwAgentConnectionStatus_; std::vector hwAgentUpdateTimeouts_; std::vector thriftStreamConnectionStatus_; diff --git a/fboss/agent/TestUtils.cpp b/fboss/agent/TestUtils.cpp new file mode 100644 index 0000000000000..932e10f60ccda --- /dev/null +++ b/fboss/agent/TestUtils.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/TestUtils.h" +#include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentDirectoryUtil.h" +#include "fboss/lib/CommonFileUtils.h" + +#include +#include +#include +#include + +namespace { +auto constexpr kConfigFileWaitPeriod = std::chrono::milliseconds{100}; +} + +namespace facebook::fboss { +std::unique_ptr getConfigFileForTesting(int switchIndex) { + auto configFileName = + AgentDirectoryUtil().getTestHwAgentConfigFile(switchIndex); + std::condition_variable configFileCv; + std::mutex configFileMutex; + std::unique_lock lock(configFileMutex); + XLOG(INFO) << "Waiting on config file " << configFileName + << " to init hw agent"; + while (!checkFileExists(configFileName)) { + configFileCv.wait_for(lock, kConfigFileWaitPeriod, [&]() { + return checkFileExists(configFileName); + }); + } + XLOG(INFO) << "Using config file " << configFileName << " to init hw agent"; + auto config = AgentConfig::fromFile(configFileName); + removeFile(configFileName); + return config; +} +} // namespace facebook::fboss diff --git a/fboss/agent/TestUtils.h b/fboss/agent/TestUtils.h new file mode 100644 index 0000000000000..69e4b79f56d82 --- /dev/null +++ b/fboss/agent/TestUtils.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include + +namespace facebook::fboss { +struct AgentConfig; + +std::unique_ptr getConfigFileForTesting(int switchIndex); +} // namespace facebook::fboss diff --git a/fboss/agent/ThriftHandler.cpp b/fboss/agent/ThriftHandler.cpp index 663dbefe5bf10..193e83b510884 100644 --- a/fboss/agent/ThriftHandler.cpp +++ b/fboss/agent/ThriftHandler.cpp @@ -199,6 +199,7 @@ void getPortInfoHelper( portInfo.hwLogicalPortId() = *id; } *portInfo.portType() = port->getPortType(); + *portInfo.scope() = port->getScope(); std::shared_ptr qosPolicy; auto state = sw.getState(); @@ -659,11 +660,13 @@ void addRecylePortRifNeighbors( continue; } auto switchId = SwitchID(switchIdAndInfo.first); + auto inbandSysPortId = getInbandSystemPortID(state, switchId); auto dsfNode = state->getDsfNodes()->getNodeIf(switchId); - CHECK(dsfNode); - constexpr auto kRecyclePortId = 1; + if (!dsfNode || !dsfNode->getInbandPortId().has_value()) { + throw FbossError("Unable to lookup inband port for : ", switchId); + } auto localRecycleRifId = - InterfaceID(*dsfNode->getSystemPortRange()->minimum() + kRecyclePortId); + InterfaceID(static_cast(inbandSysPortId)); const auto& localRecycleRif = state->getInterfaces()->getNode(localRecycleRifId); const auto& nbrTable = @@ -673,13 +676,13 @@ void addRecylePortRifNeighbors( NeighborThriftT nbrThrift; nbrThrift.ip() = facebook::network::toBinaryAddress(entry->getIP()); nbrThrift.mac() = entry->getMac().toString(); - nbrThrift.port() = kRecyclePortId; - nbrThrift.portDescriptor()->portId() = kRecyclePortId; + nbrThrift.port() = dsfNode->getInbandPortId().value(); + nbrThrift.portDescriptor()->portId() = dsfNode->getInbandPortId().value(); nbrThrift.portDescriptor()->portType() = cfg::PortDescriptorType::Physical; nbrThrift.vlanName() = "--"; - nbrThrift.interfaceID() = kRecyclePortId; + nbrThrift.interfaceID() = static_cast(localRecycleRifId); // Local recycle port for RIF, should always be STATIC CHECK(entry->getType() == state::NeighborEntryType::STATIC_ENTRY); nbrThrift.state() = "STATIC"; diff --git a/fboss/agent/Utils.cpp b/fboss/agent/Utils.cpp index 853df90012e7b..f6ef41936bfb9 100644 --- a/fboss/agent/Utils.cpp +++ b/fboss/agent/Utils.cpp @@ -11,12 +11,12 @@ #include #include - #include "fboss/agent/AsicUtils.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/FsdbHelper.h" #include "fboss/agent/SwitchIdScopeResolver.h" #include "fboss/agent/SysError.h" +#include "fboss/agent/hw/HwSwitchFb303Stats.h" #include "fboss/agent/state/ArpEntry.h" #include "fboss/agent/state/ArpTable.h" #include "fboss/agent/state/Interface.h" @@ -139,7 +139,19 @@ getPlatformMappingForDsfNode(const facebook::fboss::PlatformType platformType) { return nullptr; } +bool withinRange(const cfg::SystemPortRanges& ranges, int64_t id) { + bool inRange{false}; + for (const auto& sysPortRange : *ranges.systemPortRanges()) { + if (id >= *sysPortRange.minimum() && id <= *sysPortRange.maximum()) { + inRange = true; + break; + } + } + return inRange; +} } // namespace + // + void utilCreateDir(folly::StringPiece path) { try { boost::filesystem::create_directories(path.str()); @@ -388,36 +400,33 @@ PortID getPortID( SystemPortID getSystemPortID( const PortID& portId, + cfg::Scope portScope, const std::map& switchToSwitchInfo, - int64_t switchId) { - auto switchInfo = switchToSwitchInfo.find(switchId); + SwitchID switchId) { + auto switchInfo = switchToSwitchInfo.find(static_cast(switchId)); if (switchInfo == switchToSwitchInfo.end()) { throw FbossError( "switchId: ", switchId, " not found in switchToSwitchInfo"); } - auto sysPortRange = switchInfo->second.systemPortRange(); - CHECK(sysPortRange.has_value()); + auto offset = portScope == cfg::Scope::GLOBAL + ? switchInfo->second.globalSystemPortOffset() + : switchInfo->second.localSystemPortOffset(); + if (!offset.has_value()) { + throw FbossError("Global/local offset not set"); + } auto portIdRange = *switchInfo->second.portIdRange(); - auto systemPortId = static_cast(portId) + *sysPortRange->minimum() - - *portIdRange.minimum(); - CHECK_LE(systemPortId, *sysPortRange->maximum()); + auto systemPortId = + static_cast(portId) + *offset - *portIdRange.minimum(); return SystemPortID(systemPortId); } -SystemPortID getSystemPortID( - const PortID& portId, - const std::map& switchToSwitchInfo, - SwitchID switchId) { - return getSystemPortID( - portId, switchToSwitchInfo, static_cast(switchId)); -} - SystemPortID getSystemPortID( const PortID& portId, const std::shared_ptr& state, SwitchID switchId) { return getSystemPortID( portId, + state->getPorts()->getNode(portId)->getScope(), state->getSwitchSettings() ->getSwitchSettings( HwSwitchMatcher(std::unordered_set({switchId}))) @@ -425,6 +434,59 @@ SystemPortID getSystemPortID( switchId); } +SystemPortID getInbandSystemPortID( + const std::shared_ptr& state, + SwitchID switchId) { + const auto& switchId2Info = state->getSwitchSettings() + ->getSwitchSettings(HwSwitchMatcher( + std::unordered_set({switchId}))) + ->getSwitchIdToSwitchInfo(); + auto switchInfoItr = switchId2Info.find(switchId); + if (switchInfoItr == switchId2Info.end()) { + throw FbossError("Unable to lookup switch info for : ", switchId); + } + return getInbandSystemPortID(switchId2Info, switchId); +} + +SystemPortID getInbandSystemPortID( + const std::map& switchId2Info, + SwitchID switchId) { + auto switchInfoItr = switchId2Info.find(static_cast(switchId)); + if (switchInfoItr == switchId2Info.end()) { + throw FbossError("Unable to lookup switch info for : ", switchId); + } + if (!switchInfoItr->second.inbandPortId().has_value()) { + throw FbossError("Inband port id not set for: ", switchId); + } + if (!switchInfoItr->second.globalSystemPortOffset().has_value()) { + throw FbossError("Global sys port offset not set for ", switchId); + } + /* + * We need to derive inband port Ids in 2 scenarios. + * Local switchIds - here we can use the generic getSystemPortID functions + * which leverages port Id range information (we have that for local + * switches). Remote switchIds - here we don't have the remote switch id's + * port range. So we can't leverage the generic getSystemPortID function. + * Alternatives + * 1. Embed inband port id offset (instead of inband port ID) in the + * inbandPortId field in config. Rename the field as inbandPortOffset. + * 2. Embed port id range in DsfNode struct. + * + * 1 is lighter weight and hence used right now. + */ + return SystemPortID( + *switchInfoItr->second.globalSystemPortOffset() + + *switchInfoItr->second.inbandPortId()); +} + +bool withinRange(const cfg::SystemPortRanges& ranges, InterfaceID intfId) { + return withinRange(ranges, static_cast(intfId)); +} + +bool withinRange(const cfg::SystemPortRanges& ranges, SystemPortID sysPortId) { + return withinRange(ranges, static_cast(sysPortId)); +} + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo) { for (const auto& [switchId, switchInfo] : switchToSwitchInfo) { @@ -890,6 +952,7 @@ uint32_t getRemotePortOffset(const PlatformType platformType) { case PlatformType::PLATFORM_MERU800BFA_P1: return 0; case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_JANGA800BIC: return 1024; @@ -914,17 +977,18 @@ std::string runShellCmd(const std::string& cmd) { return result; } -InterfaceID getRecyclePortIntfID( +InterfaceID getInbandPortIntfID( const std::shared_ptr& state, const SwitchID& switchId) { auto dsfNode = state->getDsfNodes()->getNodeIf(switchId); CHECK(dsfNode); - auto systemPortRange = dsfNode->getSystemPortRange(); - CHECK(systemPortRange.has_value()); + // Inband port is of Global scope by definition + auto globalSystemPortOffset = dsfNode->getGlobalSystemPortOffset(); + CHECK(globalSystemPortOffset.has_value()); auto recyclePortId = - InterfaceID(*systemPortRange.value().minimum() + kRecyclePortIdOffset); + InterfaceID(*globalSystemPortOffset + kRecyclePortIdOffset); return recyclePortId; } @@ -981,13 +1045,13 @@ bool haveParallelLinksToInterfaceNodes( const std::vector& localFabricSwitchIds, const std::unordered_map>& switchNameToSwitchIds, - SwitchIdScopeResolver& scopeResolver) { + SwitchIdScopeResolver& scopeResolver, + const PlatformMapping* platformMapping) { for (const auto& fabricSwitchId : localFabricSwitchIds) { - // TODO(zecheng): Update to look at DsfNode layer config once available. - // Can be optimized to only look at FDSW layer - std::unordered_set voqNeighbors; + // Determine parallel links on VD level - there are two VDs per R3 ASIC + std::unordered_map> vd2VoqNeighbors; for (const auto& port : *cfg->ports()) { - // Only process ports belonging to the passed switchId + // Only process ports belonging to one switchId if (scopeResolver.scope(port).has(SwitchID(fabricSwitchId)) && port.expectedNeighborReachability()->size() > 0) { auto neighborRemoteSwitchId = @@ -997,6 +1061,23 @@ bool haveParallelLinksToInterfaceNodes( CHECK(neighborDsfNodeIter != cfg->dsfNodes()->end()); if (*neighborDsfNodeIter->second.type() == cfg::DsfNodeType::INTERFACE_NODE) { + CHECK(port.name().has_value()); + auto localVirtualDeviceId = + platformMapping->getVirtualDeviceID(*port.name()); + if (!localVirtualDeviceId.has_value()) { + throw FbossError( + "Unable to find virtual device id for port: ", + *port.logicalID(), + " virtual device"); + } + + if (vd2VoqNeighbors.find(localVirtualDeviceId.value()) == + vd2VoqNeighbors.end()) { + vd2VoqNeighbors.insert( + {localVirtualDeviceId.value(), + std::unordered_set()}); + } + auto& voqNeighbors = vd2VoqNeighbors[localVirtualDeviceId.value()]; const auto& [neighborName, _] = getExpectedNeighborAndPortName(port); if (voqNeighbors.find(neighborName) != voqNeighbors.end()) { return true; @@ -1009,24 +1090,22 @@ bool haveParallelLinksToInterfaceNodes( return false; }; -CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId) { - switch (hwQueueId) { - case 0: - return CpuCosQueueId::LOPRI; - case 1: - return CpuCosQueueId::DEFAULT; - case 2: - return CpuCosQueueId::MIDPRI; - /* On asics with 8 queues, cosQueue 7 is high priority - * bcm has 10 mcast cpu queues and use queue 9 as high priority queue - */ - case 7: - case 9: - return CpuCosQueueId::HIPRI; - default: - XLOG(FATAL) << "Got Invalid hwQueueId " << hwQueueId; - break; +CpuCosQueueId hwQueueIdToCpuCosQueueId( + uint8_t hwQueueId, + const HwAsic* asic, + HwSwitchFb303Stats* switchStats) { + if (hwQueueId == asic->getHiPriCpuQueueId()) { + return CpuCosQueueId::HIPRI; + } else if (hwQueueId == asic->getMidPriCpuQueueId()) { + return CpuCosQueueId::MIDPRI; + } else if (hwQueueId == static_cast(CpuCosQueueId::LOPRI)) { + return CpuCosQueueId::LOPRI; + } else if (hwQueueId == static_cast(CpuCosQueueId::DEFAULT)) { + return CpuCosQueueId::DEFAULT; } + XLOG_EVERY_N(ERR, 10000) << "Got Invalid hwQueueId " << hwQueueId; + switchStats->invalidQueueRxPackets(); + return CpuCosQueueId::LOPRI; } int numFabricLevels(const std::map& dsfNodes) { diff --git a/fboss/agent/Utils.h b/fboss/agent/Utils.h index 177fee7ad040a..6e6e6571d3a6b 100644 --- a/fboss/agent/Utils.h +++ b/fboss/agent/Utils.h @@ -86,6 +86,10 @@ class SwitchState; class Interface; class SwitchSettings; class SwitchIdScopeResolver; +class PlatformMapping; +struct AgentConfig; +class HwAsic; +class HwSwitchFb303Stats; constexpr auto kRecyclePortIdOffset = 1; @@ -248,19 +252,23 @@ PortID getPortID( SystemPortID getSystemPortID( const PortID& portId, + cfg::Scope portScope, const std::map& switchToSwitchInfo, - int64_t switchId); + SwitchID switchId); SystemPortID getSystemPortID( const PortID& portId, - const std::map& switchToSwitchInfo, + const std::shared_ptr& state, SwitchID switchId); -SystemPortID getSystemPortID( - const PortID& portId, +SystemPortID getInbandSystemPortID( const std::shared_ptr& state, SwitchID switchId); +SystemPortID getInbandSystemPortID( + const std::map& switchToSwitchInfo, + SwitchID switchId); + cfg::Range64 getFirstSwitchSystemPortIdRange( const std::map& switchToSwitchInfo); @@ -268,6 +276,9 @@ std::vector getPortsForInterface( InterfaceID intf, const std::shared_ptr& state); +bool withinRange(const cfg::SystemPortRanges& ranges, InterfaceID intfId); + +bool withinRange(const cfg::SystemPortRanges& ranges, SystemPortID sysPortId); /* * An NPU switch injects a broadcast message such as neighbor solicitation or * advertisement via pipeline lookup. ASIC forwards these messages to all the @@ -419,7 +430,7 @@ uint32_t getRemotePortOffset(const PlatformType platformType); std::string runShellCmd(const std::string& cmd); -InterfaceID getRecyclePortIntfID( +InterfaceID getInbandPortIntfID( const std::shared_ptr& state, const SwitchID& switchId); @@ -437,8 +448,12 @@ bool haveParallelLinksToInterfaceNodes( const std::vector& localFabricSwitchIds, const std::unordered_map>& switchNameToSwitchIds, - SwitchIdScopeResolver& scopeResolver); + SwitchIdScopeResolver& scopeResolver, + const PlatformMapping* platformMapping); -CpuCosQueueId hwQueueIdToCpuCosQueueId(uint8_t hwQueueId); +CpuCosQueueId hwQueueIdToCpuCosQueueId( + uint8_t hwQueueId, + const HwAsic* asic, + HwSwitchFb303Stats* hwswitchStats); int numFabricLevels(const std::map& dsfNodes); } // namespace facebook::fboss diff --git a/fboss/agent/benchmarks/benchmarks.bzl b/fboss/agent/benchmarks/benchmarks.bzl deleted file mode 100644 index ee381218de1e6..0000000000000 --- a/fboss/agent/benchmarks/benchmarks.bzl +++ /dev/null @@ -1,96 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "BCM_SDKS", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "to_impl_lib_name") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -def bcm_agent_benchmark_libs(srcs): - return [ - cpp_library( - name = "bcm_agent_benchmarks_main{}".format(to_impl_suffix(sdk)), - srcs = srcs, - headers = [ - "AgentBenchmarksMain.h", - ], - versions = to_versions(sdk), - exported_deps = [ - ":mono_agent_benchmarks", - "//fboss/agent:main-bcm", - "//fboss/agent/platforms/wedge:platform", - "//folly:benchmark", - "//folly:dynamic", - "//folly/init:init", - "//folly/logging:init", - ], - ) - for sdk in BCM_SDKS - ] - -def sai_agent_mono_benchmark_libs(srcs): - libs = [] - prefix = "mono_sai_agent_benchmarks_main" - benchmarks_dep = ":mono_agent_benchmarks" - for sai_impl in get_all_npu_impls(): - name = sai_switch_dependent_name(prefix, sai_impl, True) - platform = sai_switch_dependent_name("sai_platform", sai_impl, True) - libs += [ - cpp_library( - name = name, - srcs = srcs, - headers = [ - "AgentBenchmarksMain.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - benchmarks_dep, - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/platforms/sai:{}".format(platform), - "//folly:benchmark", - "//folly:dynamic", - "//folly/init:init", - "//folly/logging:init", - ], - ), - ] - - return libs - -def sai_agent_multi_switch_benchmark_lib(srcs): - name = "multi_switch_sai_agent_benchmarks_main" - benchmarks_dep = ":multi_switch_agent_benchmarks" - return cpp_library( - name = name, - srcs = srcs, - headers = [ - "AgentBenchmarksMain.h", - ], - exported_deps = [ - benchmarks_dep, - "//folly:benchmark", - "//folly:dynamic", - "//folly/init:init", - "//folly/logging:init", - ], - ) - -def agent_benchmark_lib(mono): - name = "mono_agent_benchmarks" if mono else "multi_switch_agent_benchmarks" - ensemble_lib = "//fboss/agent/test:mono_agent_ensemble" if mono else "//fboss/agent/test:multi_switch_agent_ensemble" - return cpp_library( - name = name, - srcs = [ - "AgentBenchmarks.cpp", - ], - headers = [ - "AgentBenchmarks.h", - ], - exported_deps = [ - "fbsource//third-party/googletest:gtest", - ensemble_lib, - ], - ) - -def agent_benchmark_libs(): - return [ - agent_benchmark_lib(True), - agent_benchmark_lib(False), - ] diff --git a/fboss/agent/fbpkg/agent.bzl b/fboss/agent/fbpkg/agent.bzl deleted file mode 100644 index 74bcd0abcdf73..0000000000000 --- a/fboss/agent/fbpkg/agent.bzl +++ /dev/null @@ -1,135 +0,0 @@ -load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "to_impl_suffix") -load("//fboss/agent/fbpkg:common.bzl", "BRCM_SAI_PLATFORM_FMT", "get_agent_sdk_libraries_target") -load("//fboss/build:sdk.bzl", "get_fbpkg_sdks") -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -_SAI_BCM_AGENT_ALIAS_PREFIX = "brcm_sai_wedge_agent" -_SAI_BCM_HW_AGENT_ALIAS_PREFIX = "brcm_sai_hw_agent" - -def _get_agent_target(sdk): - if sdk.product_line == ProductLine.BCM_NATIVE_SDK: - return "//fboss/agent/platforms/wedge:wedge_agent_{}".format(sdk.major_version) - elif sdk.product_line in (ProductLine.SAI_SDK_BCM, ProductLine.BCM_DSF_SDK): - return ":{}{}".format(_SAI_BCM_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)) - elif sdk.product_line in (ProductLine.BCM_DSF_SDK, ProductLine.LEABA): - return "//fboss/agent/platforms/sai:wedge_agent{}".format(to_impl_suffix(sdk)) - else: - fail("Unsupported product line {}".format(sdk.product_line)) - -def _get_hw_agent_target(sdk): - if sdk.product_line in (ProductLine.SAI_SDK_BCM, ProductLine.BCM_DSF_SDK): - return ":{}{}".format(_SAI_BCM_HW_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)) - elif sdk.product_line == ProductLine.LEABA: - return "//fboss/agent/platforms/sai:fboss_hw_agent{}".format(to_impl_suffix(sdk)) - else: - fail("Unsupported product line {}".format(sdk.product_line)) - -def _get_wedge_agent_path_actions(sdks, include_split_bins = True): - actions = {} - - for sdk in sdks: - base_dir = "sdk-{}".format(sdk.major_version) - actions[base_dir] = {} - actions[base_dir]["wedge_agent"] = _get_agent_target(sdk) - actions[base_dir]["lib"] = get_agent_sdk_libraries_target(sdk) - if include_split_bins: - actions[base_dir]["fboss_hw_agent"] = _get_hw_agent_target(sdk) - return actions - -def get_scripts_path_actions(): - return { - "agent_executor_runner": "//fboss/agent/facebook:agent_executor_runner", - "agent_pre_start_exec_runner": "//fboss/agent:agent_pre_start_exec_runner", - "fboss_sw_agent": "//fboss/agent:fboss_sw_agent", - "pre_wedge_agent_shut_runner.par": "//neteng/fboss/tools/wrapper_scripts:pre_wedge_agent_shut_runner", - "wedge_agent.service": "//neteng/fboss/scripts:wedge_agent.service", - "wedge_agent.sh": "//neteng/fboss/scripts:wedge_agent.sh", - "wedge_agent_wrapper.par": "//neteng/fboss/tools/wrapper_scripts:wedge_agent_wrapper", - } - -def _gen_brcm_sai_constraint_aliases(sdks): - for sdk in sdks: - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:wedge_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_HW_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:fboss_hw_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - -def _gen_dnx_sai_constraint_aliases(sdks): - for sdk in sdks: - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:wedge_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - fb_native.configured_alias( - name = "{}{}".format(_SAI_BCM_HW_AGENT_ALIAS_PREFIX, to_impl_suffix(sdk)), - actual = "//fboss/agent/platforms/sai:fboss_hw_agent{}".format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/...", "//netos/..."], - ) - -def get_all_wedge_agent_brcm_native_path_actions(): - bcm_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK]) - path_actions = {} - path_actions.update(_get_wedge_agent_path_actions(bcm_sdks, include_split_bins = False)) - return path_actions - -def get_all_wedge_agent_brcm_sai_path_actions(flatten_path_actions = True): - sai_sdks = get_fbpkg_sdks([ProductLine.SAI_SDK_BCM]) - _gen_brcm_sai_constraint_aliases(sai_sdks) - - path_actions = _get_wedge_agent_path_actions(sai_sdks) - if flatten_path_actions: - path_actions = _flatten_path_actions(path_actions) - return path_actions - -def _flatten_path_actions(current_actions): - path_actions = {} - for target, target_info in current_actions.items(): - for target_name, target_value in target_info.items(): - path_actions["{}/{}".format(target, target_name)] = target_value - return path_actions - -def get_all_wedge_agent_path_actions(include_scripts = True, flatten_path_actions = True): - sai_path_actions = get_all_wedge_agent_brcm_sai_path_actions(flatten_path_actions = False) - native_path_actions = get_all_wedge_agent_brcm_native_path_actions() - native_path_actions.update(sai_path_actions) - path_actions = native_path_actions - if flatten_path_actions: - path_actions = _flatten_path_actions(native_path_actions) - if include_scripts: - path_actions.update(get_scripts_path_actions()) - return path_actions - -def get_all_wedge_agent_csco_path_actions(flatten_path_actions = True, include_scripts = True): - csco_sdks = get_fbpkg_sdks([ProductLine.LEABA]) - - path_actions = {} - path_actions.update(_get_wedge_agent_path_actions(csco_sdks)) - if flatten_path_actions: - path_actions = _flatten_path_actions(path_actions) - if include_scripts: - path_actions.update(get_scripts_path_actions()) - return path_actions - -def get_all_wedge_agent_dnx_path_actions(flatten_path_actions = True, include_scripts = True): - dnx_sdks = get_fbpkg_sdks([ProductLine.BCM_DSF_SDK]) - _gen_dnx_sai_constraint_aliases(dnx_sdks) - - path_actions = {} - path_actions.update(_get_wedge_agent_path_actions(dnx_sdks)) - if flatten_path_actions: - path_actions = _flatten_path_actions(path_actions) - if include_scripts: - path_actions.update(get_scripts_path_actions()) - return path_actions diff --git a/fboss/agent/fbpkg/common.bzl b/fboss/agent/fbpkg/common.bzl deleted file mode 100644 index 52017f441a9ba..0000000000000 --- a/fboss/agent/fbpkg/common.bzl +++ /dev/null @@ -1,15 +0,0 @@ -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -BRCM_SAI_PLATFORM_FMT = "ovr_config//platform/linux:x86_64-fbcode-platform010-compat-clang15-FBOSS-projects-brcm-sai-{brcm_sai_version}-brcm-sai-{brcm_sai_version}-broadcom-xgs-robo-{native_sdk_version}" - -def get_agent_sdk_libraries_target(sdk): - if sdk.product_line == ProductLine.BCM_NATIVE_SDK: - return "//third-party-buck/platform010-compat/build/broadcom-xgs-robo/{}:libraries".format(sdk.major_version) - elif sdk.product_line == ProductLine.BCM_DSF_SDK: - return "//third-party-buck/platform010-compat/build/broadcom-xgs-robo/{}:libraries".format(sdk.native_bcm_sdk_version) - elif sdk.product_line == ProductLine.SAI_SDK_BCM: - return "//third-party-buck/platform010-compat/build/brcm-sai/{}:libraries".format(sdk.major_version) - elif sdk.product_line == ProductLine.LEABA: - return "//third-party-buck/platform010-compat/build/leaba-sdk/{}:libraries".format(sdk.major_version) - else: - fail("Unsupported product line {}".format(sdk.product_line)) diff --git a/fboss/agent/fbpkg/test_artifacts.bzl b/fboss/agent/fbpkg/test_artifacts.bzl deleted file mode 100644 index 28e4c5c054353..0000000000000 --- a/fboss/agent/fbpkg/test_artifacts.bzl +++ /dev/null @@ -1,84 +0,0 @@ -load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "to_impl_suffix") -load("//fboss/agent/fbpkg:common.bzl", "BRCM_SAI_PLATFORM_FMT", "get_agent_sdk_libraries_target") -load("//fboss/build:sdk.bzl", "get_fbpkg_sdks") -load("//fboss/build:sdk.thrift.bzl", "ProductLine") - -# Add a target to path actions in the base_dir with the name of the target -# i.e. //fboss/agent/hw/sai/hw_test:sai_test-8.2.0.0_odp will result in -# path_actions[/sai_test-8.2.0.0_odp] = //fboss/agent/hw/sai/hw_test:sai_test-8.2.0.0_odp -def _add_named_target(path_actions, base_dir, target): - [_, name] = target.split(":") - path_actions["{}/{}".format(base_dir, name)] = target - -# Due to some version universe issues, brcm-sai targets need to be configured with a hardcoded platform -def _brcm_sai_configured_target(target_fmt, sdk): - [_, test_name_fmt] = target_fmt.split(":") - configured_test_name = test_name_fmt.format(to_impl_suffix(sdk)) - fb_native.configured_alias( - name = configured_test_name, - actual = target_fmt.format(to_impl_suffix(sdk)), - platform = BRCM_SAI_PLATFORM_FMT.format(brcm_sai_version = sdk.major_version, native_sdk_version = sdk.native_bcm_sdk_version), - visibility = ["//fboss/agent/fbpkg/..."], - ) - return ":{}".format(configured_test_name) - -# Output path_actions map in the form -# { -# "sdk-": { -# "lib": "", -# "target_name": "target_fmt-", -# } -# } -def _produce_standard_test_artifacts_pkg(sdks, bcm_target_fmt, sai_target_fmt): - path_actions = {} - for sdk in sdks: - base_dir = "sdk{}".format(to_impl_suffix(sdk)) - if sdk.product_line == ProductLine.BCM_NATIVE_SDK: - # some tests don't have the bcm target but still need the libraries - if bcm_target_fmt: - target = bcm_target_fmt.format(to_impl_suffix(sdk)) - _add_named_target(path_actions, base_dir, target) - path_actions["{}/lib".format(base_dir)] = get_agent_sdk_libraries_target(sdk) - elif sdk.product_line == ProductLine.SAI_SDK_BCM: - target = _brcm_sai_configured_target(sai_target_fmt, sdk) - _add_named_target(path_actions, base_dir, target) - path_actions["{}/lib".format(base_dir)] = get_agent_sdk_libraries_target(sdk) - elif sdk.product_line == ProductLine.LEABA: - target = sai_target_fmt.format(to_impl_suffix(sdk)) - _add_named_target(path_actions, base_dir, target) - else: - fail("Unsupported sdk for tests in test_artifacts: {}".format(sdk.product_line)) - return path_actions - -def get_all_hw_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/hw/bcm/tests:bcm_test{}" - sai_target_fmt = "//fboss/agent/hw/sai/hw_test:sai_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_agent_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/test/agent_hw_tests:bcm_agent_hw_test{}" - sai_target_fmt = "//fboss/agent/test/agent_hw_tests:sai_agent_hw_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_link_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/test/link_tests:bcm_link_test{}" - sai_target_fmt = "//fboss/agent/test/link_tests:sai_link_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_fsdb_integration_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - bcm_target_fmt = "//fboss/agent/test/fsdb_integration_tests/facebook:bcm_fsdb_test{}" - sai_target_fmt = "//fboss/agent/test/fsdb_integration_tests/facebook:sai_fsdb_integration_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) - -def get_all_invariant_test_path_actions(): - all_sdks = get_fbpkg_sdks([ProductLine.BCM_NATIVE_SDK, ProductLine.SAI_SDK_BCM, ProductLine.LEABA]) - - # We don't include invariant test for bcm native - bcm_target_fmt = None - sai_target_fmt = "//fboss/agent/test/prod_invariant_tests:sai_invariant_agent_test{}" - return _produce_standard_test_artifacts_pkg(all_sdks, bcm_target_fmt, sai_target_fmt) diff --git a/fboss/agent/hw/HwSwitchFb303Stats.cpp b/fboss/agent/hw/HwSwitchFb303Stats.cpp index 17947c1d88dc6..2d27bf0c9ab83 100644 --- a/fboss/agent/hw/HwSwitchFb303Stats.cpp +++ b/fboss/agent/hw/HwSwitchFb303Stats.cpp @@ -214,6 +214,11 @@ HwSwitchFb303Stats::HwSwitchFb303Stats( map, getCounterPrefix() + "phy_info_collection_failed", SUM, + RATE), + invalidQueueRxPackets_( + map, + getCounterPrefix() + "invalid_queue_rx_packets", + SUM, RATE) {} void HwSwitchFb303Stats::update(const HwSwitchDropStats& dropStats) { diff --git a/fboss/agent/hw/HwSwitchFb303Stats.h b/fboss/agent/hw/HwSwitchFb303Stats.h index 50ce8a07eba90..4fa9fb76ed7ba 100644 --- a/fboss/agent/hw/HwSwitchFb303Stats.h +++ b/fboss/agent/hw/HwSwitchFb303Stats.h @@ -101,6 +101,9 @@ class HwSwitchFb303Stats { void phyInfoCollectionFailed() { phyInfoCollectionFailed_.addValue(1); } + void invalidQueueRxPackets() { + invalidQueueRxPackets_.addValue(1); + } void fabricReachabilityMissingCount(int64_t value); void fabricReachabilityMismatchCount(int64_t value); void virtualDevicesWithAsymmetricConnectivity(int64_t value); @@ -257,6 +260,7 @@ class HwSwitchFb303Stats { // info collection failures TLTimeseries hwStatsCollectionFailed_; TLTimeseries phyInfoCollectionFailed_; + TLTimeseries invalidQueueRxPackets_; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/bcm/BcmControlPlane.cpp b/fboss/agent/hw/bcm/BcmControlPlane.cpp index 4e97166d540c3..050a3bf928c0a 100644 --- a/fboss/agent/hw/bcm/BcmControlPlane.cpp +++ b/fboss/agent/hw/bcm/BcmControlPlane.cpp @@ -74,6 +74,7 @@ bcm_rx_reasons_t configRxReasonToBcmReasons(cfg::PacketRxReason reason) { return RxUtils::genReasons(bcmRxReasonNhop); case cfg::PacketRxReason::L3_MTU_ERROR: return RxUtils::genReasons(bcmRxReasonL3MtuFail); + case cfg::PacketRxReason::PORT_MTU_ERROR: case cfg::PacketRxReason::NDP: case cfg::PacketRxReason::LLDP: case cfg::PacketRxReason::ARP_RESPONSE: diff --git a/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp b/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp index 2a1b1df0ecaa8..71d8cc0746812 100644 --- a/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp +++ b/fboss/agent/hw/bcm/BcmFieldProcessorUtils.cpp @@ -518,6 +518,7 @@ bool needsExtraFPQsetQualifiers(cfg::AsicType asicType) { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_JERICHO2: diff --git a/fboss/agent/hw/bcm/BcmPort.cpp b/fboss/agent/hw/bcm/BcmPort.cpp index 475d958cc5061..8b88052dfd1e5 100644 --- a/fboss/agent/hw/bcm/BcmPort.cpp +++ b/fboss/agent/hw/bcm/BcmPort.cpp @@ -107,6 +107,23 @@ bool hasPortQueueChanges( return false; } +// PfcPriorities is compiled taking headroom limit into consideration +// Refer to findEnabledPfcPriorities() +bool hasPfcPrioritiesChanged( + const shared_ptr& oldPort, + const shared_ptr& newPort) { + auto oldList = oldPort->getPfcPriorities(); + auto newList = newPort->getPfcPriorities(); + std::set oldPfcPriorities( + oldList.begin(), oldList.end()); + std::set newPfcPriorities( + newList.begin(), newList.end()); + if (oldPfcPriorities != newPfcPriorities) { + return true; + } + return false; +} + bool hasPfcStatusChangedToEnabled( const shared_ptr& oldPort, const shared_ptr& newPort) { @@ -1035,7 +1052,17 @@ void BcmPort::setupStatsIfNeeded(const std::shared_ptr& swPort) { if (!savedPort || swPort->getName() != savedPort->getName() || hasPortQueueChanges(savedPort, swPort) || - hasPfcStatusChangedToEnabled(savedPort, swPort)) { + hasPfcStatusChangedToEnabled(savedPort, swPort) || + hasPfcPrioritiesChanged(savedPort, swPort)) { + // PfcPriorities can be + // - added (2 -> 2,6) + // - deleted (2,6 -> 6) + // - updated (2,6 -> 2,7) + // Clear the existing counters and reinit the new list + if (savedPort) { + auto pfcPriorities = savedPort->getPfcPriorities(); + removePortPfcStatsLocked(lockedPortStatsPtr, swPort, pfcPriorities); + } reinitPortStatsLocked(lockedPortStatsPtr, swPort); } if (savedPort && hasPfcStatusChangedToDisabled(savedPort, swPort)) { diff --git a/fboss/agent/hw/bcm/BcmSwitch.cpp b/fboss/agent/hw/bcm/BcmSwitch.cpp index 765aac484742c..79066f8aab536 100644 --- a/fboss/agent/hw/bcm/BcmSwitch.cpp +++ b/fboss/agent/hw/bcm/BcmSwitch.cpp @@ -776,7 +776,8 @@ void BcmSwitch::setupLinkscan() { // so we need to update sw state here. This needs to be done after linkscan // is enabled otherwise the sdk may return inconsistent results for (auto& port : std::as_const(*portTable_)) { - callback_->linkStateChanged(port.first, port.second->isUp()); + callback_->linkStateChanged( + port.first, port.second->isUp(), cfg::PortType::INTERFACE_PORT); } } } @@ -3014,7 +3015,10 @@ void BcmSwitch::linkStateChangedHwNotLocked( // back. Adding them earlier leads to packet loss. } callback_->linkStateChanged( - portTable_->getPortId(bcmPortId), up, iPhyLinkFaultStatus); + portTable_->getPortId(bcmPortId), + up, + cfg::PortType::INTERFACE_PORT, + iPhyLinkFaultStatus); } // The callback provided to bcm_rx_register() @@ -4105,6 +4109,7 @@ void BcmSwitch::disableHotSwap() const { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_MOCK: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: @@ -4219,7 +4224,8 @@ void BcmSwitch::initialStateApplied() { void BcmSwitch::syncLinkStates() { linkScanBottomHalfEventBase_.runInFbossEventBaseThread([this]() { for (auto& port : std::as_const(*portTable_)) { - callback_->linkStateChanged(port.first, port.second->isUp()); + callback_->linkStateChanged( + port.first, port.second->isUp(), cfg::PortType::INTERFACE_PORT); } }); } diff --git a/fboss/agent/hw/bcm/BcmSwitch.h b/fboss/agent/hw/bcm/BcmSwitch.h index 0213a0e75c354..673e282e93091 100644 --- a/fboss/agent/hw/bcm/BcmSwitch.h +++ b/fboss/agent/hw/bcm/BcmSwitch.h @@ -931,7 +931,7 @@ class BcmSwitch : public BcmSwitchIf { * loss in case of back to back port up/down events. * */ - void linkStateChanged(PortID port, bool up); + void linkStateChanged(PortID port, bool up, cfg::PortType portType); /* * Private callback called by the Broadcom API. Dispatches to @@ -1184,7 +1184,7 @@ class BcmSwitch : public BcmSwitchIf { std::unique_ptr bstStatsMgr_; std::unique_ptr linkScanBottomHalfThread_; - FbossEventBase linkScanBottomHalfEventBase_; + FbossEventBase linkScanBottomHalfEventBase_{"BcmLinkScanBottomHalfEventBase"}; std::unique_ptr switchSettings_; diff --git a/fboss/agent/hw/bcm/bcm.bzl b/fboss/agent/hw/bcm/bcm.bzl deleted file mode 100644 index aefd13120cd01..0000000000000 --- a/fboss/agent/hw/bcm/bcm.bzl +++ /dev/null @@ -1,29 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/bcm:wrapped_symbols.bzl", "wrapped_bcm_sdk_symbols", "wrapped_bcm_symbols", "wrapped_soc_symbols_tmp") - -def sdk_tracer_lib(link_whole): - link_whole_suffix = "_link_whole" if link_whole else "" - - return cpp_library( - name = "sdk_tracer{}".format(link_whole_suffix), - srcs = [ - "SdkTracer.cpp", - ], - compiler_flags = [ - "-DSOC_PCI_DEBUG", - ], - link_whole = link_whole, - linker_flags = ( - wrapped_bcm_sdk_symbols + wrapped_bcm_symbols + wrapped_soc_symbols_tmp - ), - exported_deps = [ - ":sdk_wrap_settings", - "//fboss/agent/hw/bcm:bcm_cinter", - "//fboss/lib:function_call_time_reporter", - "//folly/io/async:async_base", - ], - exported_external_deps = [ - "glog", - "gflags", - ], - ) diff --git a/fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl b/fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl deleted file mode 100644 index 49ab6b6eda4f4..0000000000000 --- a/fboss/agent/hw/bcm/benchmarks/bcm_benchmarks.bzl +++ /dev/null @@ -1,21 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "BCM_SDKS", "to_impl_suffix", "to_versions") - -def bcm_agent_benchmark(name, srcs, extra_deps): - return [ - cpp_binary( - name = "{}{}".format(name, to_impl_suffix(sdk)), - srcs = srcs, - versions = to_versions(sdk), - deps = [ - "//fboss/agent/benchmarks:bcm_agent_benchmarks_main{}".format(to_impl_suffix(sdk)), - "//fboss/agent/hw/bcm/tests:bcm_linkstate_toggler", - "//fboss/agent/hw/bcm/tests:agent_hw_test_thrift_handler", - "//fboss/agent/hw/bcm/tests:bcm_ecmp_utils", - ] + extra_deps, - external_deps = [ - ("broadcom-xgs-robo", None, "xgs_robo"), - ], - ) - for sdk in BCM_SDKS - ] diff --git a/fboss/agent/hw/bcm/tests/BUCK b/fboss/agent/hw/bcm/tests/BUCK index 651141fe098d2..ebc160a2040c3 100644 --- a/fboss/agent/hw/bcm/tests/BUCK +++ b/fboss/agent/hw/bcm/tests/BUCK @@ -53,6 +53,7 @@ cpp_library( link_whole = True, exported_deps = [ ":bcm_test_handler", + "//fboss/agent:agent_features", "//fboss/agent:fboss-error", "//fboss/agent:load_agent_config", "//fboss/agent:setup_thrift", @@ -611,19 +612,24 @@ cpp_library( "HwTestMirrorUtilsThriftHandler.cpp", "HwTestNeighborUtilsThriftHandler.cpp", "HwTestPortUtilsThriftHandler.cpp", + "HwTestRouteUtilsThriftHandler.cpp", "HwTestThriftHandler.cpp", "HwTestVoqSwitchUtilsThriftHandler.cpp", ], headers = [ ], + undefined_symbols = "True", # The sai/bcm implementations will define some functions exported_deps = [ - "fbcode//fboss/agent:hw_switch", - "fbcode//fboss/agent/hw/bcm:bcm", - "fbcode//fboss/agent/hw/bcm:bcmaddress_fb_convertors", - "fbcode//fboss/agent/hw/bcm/tests:bcm_ecmp_utils", - "fbcode//fboss/agent/hw/switch_asics:switch_asics", - "fbcode//fboss/agent/hw/test:hw_test_ecmp_utils", - "fbcode//fboss/agent/hw/test:hw_test_thrift_handler_h", - "fbcode//fboss/agent/test/utils:acl_test_utils", + "//fboss/agent:fboss-types", + "//fboss/agent:hw_switch", + "//fboss/agent/hw/bcm:bcm", + "//fboss/agent/hw/bcm:bcmaddress_fb_convertors", # @manual + "//fboss/agent/hw/switch_asics:switch_asics", + "//fboss/agent/hw/test:hw_test_ecmp_utils", + "//fboss/agent/hw/test:hw_test_thrift_handler_h", + "//fboss/agent/test/utils:acl_test_utils", + ], + exported_external_deps = [ + ("broadcom-xgs-robo", None, "xgs_robo"), ], ) diff --git a/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp b/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp index b107bbc5104e9..aff3a6f735ee4 100644 --- a/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp +++ b/fboss/agent/hw/bcm/tests/BcmSwitchEnsemble.cpp @@ -12,6 +12,7 @@ #include #include #include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentFeatures.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/Utils.h" #include "fboss/agent/hw/bcm/BcmAPI.h" diff --git a/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp b/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp index 9b6e845223697..921c9e2a516bf 100644 --- a/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp +++ b/fboss/agent/hw/bcm/tests/HwTestPortUtilsThriftHandler.cpp @@ -2,6 +2,32 @@ #include "fboss/agent/hw/test/HwTestThriftHandler.h" +#include "fboss/agent/hw/bcm/BcmError.h" + +extern "C" { +#include +} + +using facebook::fboss::cfg::PortLoopbackMode; + +namespace { +facebook::fboss::cfg::PortLoopbackMode bcmToFbLoopbackMode( + bcm_port_loopback_t inMode) { + switch (inMode) { + case BCM_PORT_LOOPBACK_NONE: + return facebook::fboss::cfg::PortLoopbackMode::NONE; + case BCM_PORT_LOOPBACK_PHY: + return facebook::fboss::cfg::PortLoopbackMode::PHY; + case BCM_PORT_LOOPBACK_MAC: + return facebook::fboss::cfg::PortLoopbackMode::MAC; + default: + CHECK(0) << "Should never reach here"; + break; + } + return facebook::fboss::cfg::PortLoopbackMode::NONE; +} +} // namespace + namespace facebook { namespace fboss { namespace utility { @@ -12,6 +38,23 @@ void HwTestThriftHandler::injectFecError( // not implemented in bcm return; } + +void HwTestThriftHandler::getPortInfo( + ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, + std::unique_ptr<::std::vector<::std::int32_t>> portIds) { + for (const auto& portId : *portIds) { + PortInfo portInfo; + int loopbackMode; + auto rv = bcm_port_loopback_get( + 0, static_cast(portId), &loopbackMode); + bcmCheckError(rv, "Failed to get loopback mode for port:", portId); + portInfo.loopbackMode() = static_cast( + bcmToFbLoopbackMode(static_cast(loopbackMode))); + portInfos.push_back(portInfo); + } + return; +} + } // namespace utility } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp new file mode 100644 index 0000000000000..92a5dc9b2344f --- /dev/null +++ b/fboss/agent/hw/bcm/tests/HwTestRouteUtilsThriftHandler.cpp @@ -0,0 +1,282 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/hw/test/HwTestThriftHandler.h" + +#include "fboss/agent/HwSwitch.h" +#include "fboss/agent/hw/bcm/BcmAddressFBConvertors.h" +#include "fboss/agent/hw/bcm/BcmError.h" +#include "fboss/agent/hw/bcm/BcmHost.h" +#include "fboss/agent/hw/bcm/BcmIntf.h" +#include "fboss/agent/types.h" + +using facebook::fboss::bcmCheckError; +using facebook::fboss::BcmError; +using facebook::fboss::BcmSwitch; +using facebook::fboss::HwAsic; +using facebook::fboss::HwSwitch; +using facebook::fboss::InterfaceID; +using facebook::fboss::ipToBcmIp6; + +namespace { +void initBcmRoute( + bcm_l3_route_t& route, + const folly::CIDRNetwork& cidrNetwork) { + bcm_l3_route_t_init(&route); + + const auto& [networkIP, netmask] = cidrNetwork; + if (networkIP.isV4()) { + route.l3a_subnet = networkIP.asV4().toLongHBO(); + route.l3a_ip_mask = + folly::IPAddressV4(folly::IPAddressV4::fetchMask(netmask)).toLongHBO(); + } else { // IPv6 + ipToBcmIp6(networkIP, &route.l3a_ip6_net); + memcpy( + &route.l3a_ip6_mask, + folly::IPAddressV6::fetchMask(netmask).data(), + sizeof(route.l3a_ip6_mask)); + route.l3a_flags = BCM_L3_IP6; + } +} + +bcm_l3_route_t +getBcmRoute(int unit, const folly::CIDRNetwork& cidrNetwork, uint32_t flags) { + bcm_l3_route_t route; + initBcmRoute(route, cidrNetwork); + route.l3a_flags |= flags; + CHECK_EQ(bcm_l3_route_get(unit, &route), 0); + return route; +} + +bool isRoutePresent( + int unit, + facebook::fboss::RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + bcm_l3_route_t route; + initBcmRoute(route, cidrNetwork); + route.l3a_vrf = rid; + return (0 == bcm_l3_route_get(unit, &route)); +} + +std::optional getHwRouteClassID( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + return route.l3a_lookup_class == 0 ? std::nullopt + : std::optional(route.l3a_lookup_class); +} + +bool isHwRouteToCpu( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + if (route.l3a_flags & BCM_L3_MULTIPATH) { + return false; + } + bcm_l3_egress_t egress; + bcm_l3_egress_t_init(&egress); + CHECK_EQ(bcm_l3_egress_get(bcmSwitch->getUnit(), route.l3a_intf, &egress), 0); + + return (egress.flags & BCM_L3_L2TOCPU) && (egress.flags | BCM_L3_COPY_TO_CPU); +} + +bool isHwRouteMultiPath( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + return route.l3a_flags & BCM_L3_MULTIPATH; +} + +bool isRouteUnresolvedToCpuClassId( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + auto classId = getHwRouteClassID(hwSwitch, rid, cidrNetwork); + return classId.has_value() && + facebook::fboss::cfg::AclLookupClass(classId.value()) == + facebook::fboss::cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2; +} + +bool isHwRouteHit( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + return (route.l3a_flags & BCM_L3_HIT); +} + +void clearHwRouteHit( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID /*rid*/, + const folly::CIDRNetwork& cidrNetwork) { + auto bcmSwitch = static_cast(hwSwitch); + getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, BCM_L3_HIT_CLEAR); +} + +bool isEgressToIp( + const BcmSwitch* bcmSwitch, + facebook::fboss::RouterID rid, + folly::IPAddress addr, + bcm_if_t egress) { + if (!bcmSwitch->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::HOSTTABLE)) { + bcm_l3_route_t route = getBcmRoute( + bcmSwitch->getUnit(), folly::CIDRNetwork(addr, addr.bitCount()), 0); + return egress == route.l3a_intf; + } + bcm_l3_host_t host; + bcm_l3_host_t_init(&host); + if (addr.isV4()) { + host.l3a_ip_addr = addr.asV4().toLongHBO(); + } else { + memcpy( + &host.l3a_ip6_addr, + addr.asV6().toByteArray().data(), + sizeof(host.l3a_ip6_addr)); + host.l3a_flags |= BCM_L3_IP6; + } + host.l3a_vrf = rid; + CHECK_EQ(bcm_l3_host_find(bcmSwitch->getUnit(), &host), 0); + return egress == host.l3a_intf; +} + +bool isHwRouteToNextHop( + const HwSwitch* hwSwitch, + facebook::fboss::RouterID rid, + const folly::CIDRNetwork& cidrNetwork, + folly::IPAddress ip, + std::optional weight) { + auto bcmSwitch = static_cast(hwSwitch); + + bcm_l3_route_t route = getBcmRoute(bcmSwitch->getUnit(), cidrNetwork, 0); + + if (route.l3a_flags & BCM_L3_MULTIPATH) { + // check for member to ip, interface + bcm_l3_egress_ecmp_t ecmp; + bcm_l3_egress_ecmp_t_init(&ecmp); + ecmp.ecmp_intf = route.l3a_intf; + ecmp.flags = BCM_L3_WITH_ID; + int count = 0; + CHECK_EQ( + bcm_l3_ecmp_get(bcmSwitch->getUnit(), &ecmp, 0, nullptr, &count), 0); + std::vector members; + members.resize(count); + CHECK_EQ( + bcm_l3_ecmp_get( + bcmSwitch->getUnit(), + &ecmp, + members.size(), + members.data(), + &count), + 0); + bool found = false; + bcm_l3_ecmp_member_t foundMember; + bcm_l3_ecmp_member_t_init(&foundMember); + for (auto member : members) { + if (!isEgressToIp(bcmSwitch, rid, ip, member.egress_if)) { + continue; + } + found = true; + foundMember = member; + break; + } + + if (!weight) { + return found; + } + + return weight.value() == + std::count_if( + members.begin(), members.end(), [foundMember](auto member) { + return member.egress_if == foundMember.egress_if; + }); + } + // check for next hop + return isEgressToIp(bcmSwitch, rid, ip, route.l3a_intf); +} + +} // namespace + +namespace facebook { +namespace fboss { +namespace utility { + +void HwTestThriftHandler::getRouteInfo( + RouteInfo& routeInfo, + std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + routeInfo.exists() = isRoutePresent(0, RouterID(0), routePrefix); + if (*routeInfo.exists()) { + auto classID = getHwRouteClassID(hwSwitch_, RouterID(0), routePrefix); + if (classID.has_value()) { + routeInfo.classId() = classID.value(); + } + routeInfo.isProgrammedToCpu() = + isHwRouteToCpu(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isMultiPath() = + isHwRouteMultiPath(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isRouteUnresolvedToClassId() = + isRouteUnresolvedToCpuClassId(hwSwitch_, RouterID(0), routePrefix); + } +} + +bool HwTestThriftHandler::isRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +void HwTestThriftHandler::clearRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + clearHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +bool HwTestThriftHandler::isRouteToNexthop( + std::unique_ptr prefix, + std::unique_ptr nexthop) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteToNextHop( + hwSwitch_, + RouterID(0), + routePrefix, + network::toIPAddress(*nexthop), + std::nullopt); +} + +bool HwTestThriftHandler::isProgrammedInHw( + int intfID, + std::unique_ptr /*prefix*/, + std::unique_ptr labelStack, + int refCount) { + if (labelStack->empty()) { + return static_cast(hwSwitch_) + ->getIntfTable() + ->getBcmIntfIf(InterfaceID(intfID)) + ->getLabeledTunnelRefCount(*labelStack) == refCount; + } else { + return static_cast(hwSwitch_) + ->getIntfTable() + ->getBcmIntfIf(InterfaceID(intfID)) + ->getLabeledTunnelRefCount(LabelForwardingAction::LabelStack{ + labelStack->begin() + 1, labelStack->end()}) == refCount; + } +} + +} // namespace utility +} // namespace fboss +} // namespace facebook diff --git a/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp b/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp index 0051782087435..30cdd4cd26aab 100644 --- a/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp +++ b/fboss/agent/hw/bcm/tests/HwTestTamUtils.cpp @@ -24,6 +24,7 @@ void triggerParityError(HwSwitchEnsemble* ensemble) { case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: + case cfg::AsicType::ASIC_TYPE_CHENAB: XLOG(FATAL) << "Unsupported HwAsic: " << ensemble->getPlatform()->getAsic()->getAsicTypeStr(); break; diff --git a/fboss/agent/hw/bcm/wrapped_symbols.bzl b/fboss/agent/hw/bcm/wrapped_symbols.bzl deleted file mode 100644 index 8d5adf9889ee8..0000000000000 --- a/fboss/agent/hw/bcm/wrapped_symbols.bzl +++ /dev/null @@ -1,549 +0,0 @@ -# -# Linker flags to wrap BCM symbols -# -wrapped_bcm_sdk_symbols = [ - # - # BCM - # - "--wrap=bcm_field_entry_prio_set", - "--wrap=bcm_field_entry_enable_set", - "--wrap=bcm_switch_object_count_multi_get", - "--wrap=bcm_switch_object_count_get", - "--wrap=bcm_field_group_create_id", - "--wrap=bcm_field_group_config_create", - "--wrap=bcm_field_group_destroy", - "--wrap=bcm_rx_cosq_mapping_set", - "--wrap=bcm_rx_cosq_mapping_get", - "--wrap=bcm_rx_cosq_mapping_delete", - "--wrap=bcm_rx_cosq_mapping_extended_add", - "--wrap=bcm_rx_cosq_mapping_extended_delete", - "--wrap=bcm_rx_cosq_mapping_extended_set", - "--wrap=bcm_cosq_init", - "--wrap=bcm_rx_queue_max_get", - "--wrap=bcm_field_action_add", - "--wrap=bcm_field_action_remove", - "--wrap=bcm_field_action_delete", - "--wrap=bcm_field_init", - "--wrap=bcm_field_entry_destroy", - "--wrap=bcm_field_entry_install", - "--wrap=bcm_field_qualify_DstIp", - "--wrap=bcm_field_qualify_IpProtocol", - "--wrap=bcm_field_entry_multi_get", - "--wrap=bcm_field_range_create", - "--wrap=bcm_cosq_bst_stat_sync", - "--wrap=bcm_rx_cosq_mapping_size_get", - "--wrap=bcm_l3_egress_ecmp_delete", - "--wrap=bcm_l3_egress_ecmp_t_init", - "--wrap=bcm_field_range_get", - "--wrap=bcm_field_entry_create_id", - "--wrap=bcm_field_qualify_L4SrcPort", - "--wrap=bcm_port_autoneg_set", - "--wrap=bcm_field_range_destroy", - "--wrap=bcm_l3_alpm_resource_get", - "--wrap=bcm_l3_egress_get", - "--wrap=bcm_l3_egress_create", - "--wrap=bcm_l3_egress_find", - "--wrap=bcm_l3_egress_traverse", - "--wrap=bcm_l3_egress_ecmp_add", - "--wrap=bcm_field_entry_create", - "--wrap=bcm_field_qualify_TcpControl", - "--wrap=bcm_field_qualify_IpFrag", - "--wrap=bcm_rx_active", - "--wrap=bcm_l3_egress_ecmp_get", - "--wrap=bcm_l3_enable_set", - "--wrap=bcm_field_qualify_DstIp6", - "--wrap=bcm_field_group_enable_get", - "--wrap=bcm_cosq_gport_traverse", - "--wrap=bcm_cosq_control_get", - "--wrap=bcm_cosq_control_set", - "--wrap=bcm_cosq_port_profile_set", - "--wrap=bcm_cosq_port_profile_get", - "--wrap=bcm_cosq_gport_bandwidth_set", - "--wrap=bcm_cosq_gport_bandwidth_get", - "--wrap=bcm_cosq_gport_discard_t_init", - "--wrap=bcm_cosq_gport_discard_get", - "--wrap=bcm_cosq_gport_discard_set", - "--wrap=bcm_cosq_gport_mapping_set", - "--wrap=bcm_cosq_gport_mapping_get", - "--wrap=bcm_cosq_gport_sched_get", - "--wrap=bcm_cosq_gport_sched_set", - "--wrap=bcm_cosq_bst_stat_get", - "--wrap=bcm_cosq_bst_stat_extended_get", - "--wrap=bcm_cosq_control_get", - "--wrap=bcm_field_qualify_L4DstPort", - "--wrap=bcm_cosq_bst_stat_clear", - "--wrap=bcm_port_pause_sym_set", - "--wrap=bcm_port_phy_control_get", - "--wrap=bcm_port_phy_tx_set", - "--wrap=bcm_port_phy_tx_get", - "--wrap=bcm_qos_map_create", - "--wrap=bcm_qos_map_destroy", - "--wrap=bcm_qos_map_add", - "--wrap=bcm_qos_map_delete", - "--wrap=bcm_qos_map_multi_get", - "--wrap=bcm_qos_multi_get", - "--wrap=bcm_qos_port_map_set", - "--wrap=bcm_qos_port_map_get", - "--wrap=bcm_qos_port_map_type_get", - "--wrap=bcm_port_dscp_map_mode_get", - "--wrap=bcm_port_dscp_map_mode_set", - "--wrap=bcm_field_group_get", - "--wrap=bcm_field_qset_id_multi_get", - "--wrap=bcm_field_group_status_get", - "--wrap=bcm_field_stat_create", - "--wrap=bcm_field_entry_stat_attach", - "--wrap=bcm_field_entry_stat_detach", - "--wrap=bcm_field_entry_stat_get", - "--wrap=bcm_field_stat_destroy", - "--wrap=bcm_field_stat_get", - "--wrap=bcm_field_stat_size", - "--wrap=bcm_field_stat_config_get", - "--wrap=bcm_field_entry_reinstall", - "--wrap=bcm_field_qualify_RangeCheck_get", - "--wrap=bcm_field_entry_prio_get", - "--wrap=bcm_field_group_traverse", - "--wrap=bcm_port_phy_control_set", - "--wrap=bcm_field_qualify_SrcPort", - "--wrap=bcm_field_qualify_InPorts", - "--wrap=bcm_field_qualify_SrcIp6_get", - "--wrap=bcm_field_qualify_DstIp6_get", - "--wrap=bcm_field_qualify_L4SrcPort_get", - "--wrap=bcm_field_qualify_L4DstPort_get", - "--wrap=bcm_field_qualify_TcpControl_get", - "--wrap=bcm_field_qualify_SrcPort_get", - "--wrap=bcm_field_qualify_DstPort_get", - "--wrap=bcm_field_qualify_IpFrag_get", - "--wrap=bcm_field_qualify_DSCP_get", - "--wrap=bcm_field_qualify_IpType_get", - "--wrap=bcm_field_qualify_EtherType_get", - "--wrap=bcm_field_qualify_IpProtocol_get", - "--wrap=bcm_field_qualify_Ttl_get", - "--wrap=bcm_field_entry_enable_get", - "--wrap=bcm_field_qualify_DstMac_get", - "--wrap=bcm_field_qualify_SrcMac_get", - "--wrap=bcm_field_qualify_Ttl", - "--wrap=bcm_field_qualify_IpType", - "--wrap=bcm_field_qualify_EtherType", - "--wrap=bcm_field_qualify_DSCP", - "--wrap=bcm_port_ability_advert_set", - "--wrap=bcm_switch_control_set", - "--wrap=bcm_switch_control_get", - "--wrap=bcm_cosq_bst_profile_get", - "--wrap=bcm_l2_traverse", - "--wrap=bcm_field_action_get", - "--wrap=bcm_field_qualify_RangeCheck", - "--wrap=bcm_field_qualify_IcmpTypeCode", - "--wrap=bcm_port_subsidiary_ports_get", - "--wrap=bcm_field_qualify_SrcIp6", - "--wrap=bcm_l3_info", - "--wrap=bcm_switch_pkt_trace_info_get", - "--wrap=bcm_field_qualify_DstPort", - "--wrap=bcm_field_qualify_DstMac", - "--wrap=bcm_field_qualify_SrcMac", - "--wrap=bcm_field_qualify_DstClassL2_get", - "--wrap=bcm_field_qualify_DstClassL2", - "--wrap=bcm_field_qualify_DstClassL3_get", - "--wrap=bcm_field_qualify_DstClassL3", - "--wrap=bcm_field_qualify_PacketRes", - "--wrap=bcm_field_qualify_PacketRes_get", - "--wrap=bcm_field_qualify_OuterVlanId", - "--wrap=bcm_field_qualify_OuterVlanId_get", - "--wrap=bcm_cosq_bst_profile_set", - "--wrap=bcm_port_pause_set", - "--wrap=bcm_port_pause_get", - "--wrap=bcm_port_sample_rate_set", - "--wrap=bcm_port_sample_rate_get", - "--wrap=bcm_port_control_set", - "--wrap=bcm_port_control_get", - "--wrap=bcm_info_get", - "--wrap=bcm_linkscan_update", - "--wrap=bcm_trunk_bitmap_expand", - "--wrap=bcm_port_loopback_get", - "--wrap=bcm_port_loopback_set", - "--wrap=bcm_stat_custom_add", - "--wrap=bcm_mirror_init", - "--wrap=bcm_mirror_mode_set", - "--wrap=bcm_mirror_destination_create", - "--wrap=bcm_mirror_destination_get", - "--wrap=bcm_mirror_destination_destroy", - "--wrap=bcm_mirror_port_dest_add", - "--wrap=bcm_mirror_port_dest_delete", - "--wrap=bcm_mirror_port_dest_delete_all", - "--wrap=bcm_mirror_port_dest_get", - "--wrap=bcm_mirror_destination_traverse", - "--wrap=bcm_mpls_init", - "--wrap=bcm_mpls_tunnel_switch_add", - "--wrap=bcm_mpls_tunnel_switch_delete", - "--wrap=bcm_mpls_tunnel_switch_get", - "--wrap=bcm_mpls_tunnel_switch_traverse", - "--wrap=bcm_mpls_tunnel_initiator_set", - "--wrap=bcm_mpls_tunnel_initiator_clear", - "--wrap=bcm_mpls_tunnel_initiator_get", - "--wrap=bcm_port_resource_speed_get", - "--wrap=bcm_port_resource_speed_set", - "--wrap=bcm_port_resource_multi_set", - "--wrap=sh_process_command", - "--wrap=bcm_l2_addr_delete_by_port", - "--wrap=bcm_cosq_priority_group_mapping_profile_get", - "--wrap=bcm_cosq_priority_group_mapping_profile_set", - "--wrap=bcm_cosq_priority_group_pfc_priority_mapping_profile_get", - "--wrap=bcm_cosq_priority_group_pfc_priority_mapping_profile_set", - "--wrap=bcm_cosq_pfc_class_config_profile_set", - "--wrap=bcm_cosq_pfc_class_config_profile_get", - "--wrap=bcm_port_priority_group_config_set", - "--wrap=bcm_port_priority_group_config_get", - "--wrap=bcm_cosq_port_priority_group_property_set", - "--wrap=bcm_cosq_port_priority_group_property_get", - "--wrap=bcm_port_stat_attach", - "--wrap=bcm_port_stat_detach_with_id", - # Since QCM is not supported after 6.5.16, we only wrap these collector API - # but not log them in Bcm Cinter - "--wrap=bcm_collector_create", - "--wrap=bcm_collector_destroy", - "--wrap=bcm_collector_export_profile_create", - "--wrap=bcm_collector_export_profile_destroy", - "--wrap=bcm_collector_export_profile_t_init", - "--wrap=bcm_collector_info_t_init", - "--wrap=bcm_port_phy_timesync_config_set", - "--wrap=bcm_port_phy_timesync_config_t_init", - "--wrap=bcm_port_timesync_config_set", - "--wrap=bcm_port_timesync_config_t_init", - "--wrap=bcm_time_interface_add", - "--wrap=bcm_time_interface_delete_all", - "--wrap=bcm_time_interface_t_init", - "--wrap=bcm_field_entry_flexctr_attach", - "--wrap=bcm_field_entry_flexctr_detach", - "--wrap=bcm_field_entry_remove", - "--wrap=bcm_cosq_pfc_deadlock_control_set", - "--wrap=bcm_cosq_pfc_deadlock_control_get", - "--wrap=bcm_cosq_pfc_deadlock_recovery_event_register", - "--wrap=bcm_cosq_pfc_deadlock_recovery_event_unregister", - "--wrap=bcm_flexctr_action_create", - "--wrap=bcm_flexctr_action_destroy", - "--wrap=bcm_l3_route_stat_attach", - "--wrap=bcm_l3_route_stat_detach", - "--wrap=bcm_l3_route_flexctr_object_set", - "--wrap=bcm_stat_custom_group_create", - "--wrap=bcm_stat_group_destroy", - "--wrap=bcm_stat_group_mode_id_create", - "--wrap=bcm_stat_group_mode_id_destroy", - "--wrap=bcm_port_ifg_get", - "--wrap=bcm_port_ifg_set", - "--wrap=bcm_stat_group_create", - "--wrap=bcm_l3_ingress_stat_attach", - "--wrap=bcm_l3_egress_stat_attach", - "--wrap=bcm_field_hint_t_init", - "--wrap=bcm_field_hints_create", - "--wrap=bcm_field_hints_add", - "--wrap=bcm_field_hints_destroy", - "--wrap=bcm_field_hints_get", - "--wrap=bcm_port_control_phy_timesync_set", -] - -wrapped_soc_symbols = [ - # - # SOC - # - "--wrap=soc_reset_init", - "--wrap=soc_init", - "--wrap=soc_stable_set", - "--wrap=soc_stable_size_set", - "--wrap=soc_property_get", - "--wrap=soc_cm_device_supported", - "--wrap=soc_misc_init", - "--wrap=soc_cm_device_init", - "--wrap=soc_switch_stable_register", - "--wrap=soc_detach", - "--wrap=soc_anyreg_read", - "--wrap=soc_miim_write", - "--wrap=soc_pci_read", - "--wrap=soc_pci_write", - "--wrap=soc_cm_init", - "--wrap=soc_cm_sfree", - "--wrap=soc_cm_device_create", - "--wrap=soc_cm_salloc", - "--wrap=soc_cm_device_destroy", - "--wrap=soc_mmu_init", -] - -# This is to be merged to wrapped_soc_symbols. For now, it has to be separate -# because all the other entries in wrapped_soc_symbols[] lack the implementation -# SdkTracer.cpp. Directly using that list would break the build for many -# builds such as bcm_tests. -# Adding the implementations for those entries will be done in a separate -# diff. After that is in, these two lists can be merged. -wrapped_soc_symbols_tmp = [ - "--wrap=soc_shutdown", -] - -wrapped_sai_symbols = [ - "--wrap=sai_api_query", - "--wrap=sai_api_initialize", - "--wrap=sai_api_uninitialize", - "--wrap=sai_get_object_key", -] - -wrapped_sal_symbols = [ - # - # SAL - # - "--wrap=sal_thread_name", - "--wrap=sal_vprintf", - "--wrap=sal_free", - "--wrap=sal_config_init_defaults", - "--wrap=sal_thread_main_get", - "--wrap=sal_core_init", - "--wrap=sal_config_refresh", - "--wrap=sal_thread_self", - "--wrap=sal_mutex_create", - "--wrap=sal_mutex_destroy", - "--wrap=sal_mutex_take", - "--wrap=sal_mutex_give", -] - -wrapped_bde_symbols = [ - # - # BDE - # - "--wrap=linux_bde_create", - "--wrap=linux_bde_destroy", -] - -wrapped_bcm_soc_sal_bde_symbols = ( - wrapped_bcm_sdk_symbols + - wrapped_soc_symbols + - wrapped_soc_symbols_tmp + - wrapped_sal_symbols + - wrapped_bde_symbols -) - -wrapped_combined_sdk_symbols = [ - "--wrap=soc_control", - "--wrap=soc_cm_get_id", -] - -# -# Linker flags to wrap Bcm symbols -# -wrapped_bcm_symbols = [ - "--wrap=bcm_pkt_flags_init", - "--wrap=bcm_linkscan_enable_set", - "--wrap=bcm_l3_egress_ecmp_find", - "--wrap=bcm_l3_egress_multipath_add", - "--wrap=bcm_l2_station_add", - "--wrap=bcm_stg_stp_get", - "--wrap=bcm_l2_addr_add", - "--wrap=bcm_l3_intf_delete", - "--wrap=bcm_switch_control_set", - "--wrap=bcm_l3_egress_t_init", - "--wrap=bcm_ip_mask_create", - "--wrap=bcm_knet_filter_traverse", - "--wrap=bcm_port_control_set", - "--wrap=bcm_cosq_mapping_get", - "--wrap=bcm_cosq_bst_profile_get", - "--wrap=bcm_l3_ecmp_member_add", - "--wrap=bcm_l3_egress_ecmp_add", - "--wrap=bcm_knet_netif_create", - "--wrap=bcm_vlan_list_destroy", - "--wrap=bcm_l2_age_timer_set", - "--wrap=bcm_stat_multi_get", - "--wrap=bcm_stat_get", - "--wrap=bcm_stat_sync_multi_get", - "--wrap=bcm_l3_egress_get", - "--wrap=bcm_rx_unregister", - "--wrap=bcm_port_ability_advert_get", - "--wrap=bcm_l3_ecmp_get", - "--wrap=bcm_l3_egress_ecmp_get", - "--wrap=bcm_l3_host_delete_by_interface", - "--wrap=bcm_vlan_destroy", - "--wrap=bcm_port_interface_get", - "--wrap=bcm_l3_egress_multipath_get", - "--wrap=bcm_knet_filter_create", - "--wrap=bcm_switch_event_unregister", - "--wrap=bcm_port_ability_local_get", - "--wrap=bcm_port_learn_set", - "--wrap=bcm_port_enable_set", - "--wrap=bcm_port_stat_enable_set", - "--wrap=bcm_port_fdr_config_set", - "--wrap=bcm_port_fdr_config_get", - "--wrap=bcm_port_fdr_stats_get", - "--wrap=bcm_rx_free", - "--wrap=bcm_port_phy_modify", - "--wrap=bcm_l3_route_delete", - "--wrap=bcm_port_speed_max", - "--wrap=bcm_l3_init", - "--wrap=bcm_knet_init", - "--wrap=bcm_port_queued_count_get", - "--wrap=bcm_cosq_bst_profile_set", - "--wrap=bcm_l3_route_delete_by_interface", - "--wrap=bcm_rx_control_get", - "--wrap=bcm_port_control_get", - "--wrap=bcm_cosq_mapping_set", - "--wrap=bcm_pkt_alloc", - "--wrap=bcm_attach", - "--wrap=bcm_attach_max", - "--wrap=bcm_port_speed_get", - "--wrap=bcm_l3_egress_ecmp_t_init", - "--wrap=bcm_knet_filter_t_init", - "--wrap=bcm_l3_egress_multipath_create", - "--wrap=bcm_linkscan_register", - "--wrap=bcm_stg_stp_set", - "--wrap=bcm_knet_filter_destroy", - "--wrap=bcm_cosq_bst_stat_multi_get", - "--wrap=bcm_l3_route_traverse", - "--wrap=bcm_l3_egress_ecmp_destroy", - "--wrap=bcm_cosq_bst_stat_multi_get", - "--wrap=bcm_l3_route_traverse", - "--wrap=bcm_l3_ecmp_destroy", - "--wrap=bcm_l3_egress_ecmp_destroy", - "--wrap=bcm_l3_route_delete_all", - "--wrap=bcm_switch_pkt_trace_info_get", - "--wrap=bcm_port_enable_get", - "--wrap=bcm_port_vlan_member_set", - "--wrap=bcm_switch_control_port_set", - "--wrap=bcm_port_selective_get", - "--wrap=bcm_port_speed_set", - "--wrap=bcm_port_interface_set", - "--wrap=bcm_l3_host_find", - "--wrap=bcm_l3_host_add", - "--wrap=bcm_l2_age_timer_get", - "--wrap=bcm_cosq_bst_stat_get", - "--wrap=bcm_cosq_bst_stat_extended_get", - "--wrap=bcm_udf_hash_config_add", - "--wrap=bcm_udf_hash_config_delete", - "--wrap=bcm_udf_create", - "--wrap=bcm_udf_destroy", - "--wrap=bcm_udf_pkt_format_create", - "--wrap=bcm_udf_pkt_format_destroy", - "--wrap=bcm_port_pause_addr_set", - "--wrap=bcm_udf_pkt_format_add", - "--wrap=bcm_udf_pkt_format_delete", - "--wrap=bcm_udf_pkt_format_get", - "--wrap=bcm_udf_hash_config_get", - "--wrap=bcm_udf_pkt_format_info_get", - "--wrap=bcm_udf_pkt_format_info_t_init", - "--wrap=bcm_udf_alloc_hints_t_init", - "--wrap=bcm_udf_t_init", - "--wrap=bcm_udf_hash_config_t_init", - "--wrap=bcm_udf_init", - "--wrap=bcm_udf_get", - "--wrap=bcm_field_qset_id_multi_set", - "--wrap=bcm_field_qualify_UdfClass", - "--wrap=bcm_field_group_config_t_init", - "--wrap=bcm_field_qualify_udf", - "--wrap=bcm_field_qualify_udf_get", - "--wrap=bcm_stg_list", - "--wrap=bcm_port_untagged_vlan_get", - "--wrap=bcm_l3_egress_traverse", - "--wrap=bcm_port_frame_max_get", - "--wrap=bcm_port_untagged_vlan_set", - "--wrap=bcm_linkscan_mode_set_pbm", - "--wrap=bcm_port_dtag_mode_get", - "--wrap=bcm_cosq_bst_stat_sync", - "--wrap=bcm_port_gport_get", - "--wrap=bcm_l3_ecmp_create", - "--wrap=bcm_l3_egress_ecmp_create", - "--wrap=bcm_cosq_bst_stat_clear", - "--wrap=bcm_vlan_gport_delete_all", - "--wrap=bcm_l3_egress_multipath_find", - "--wrap=bcm_vlan_list", - "--wrap=bcm_vlan_default_set", - "--wrap=bcm_l3_route_add", - "--wrap=bcm_vlan_control_port_set", - "--wrap=bcm_stg_default_get", - "--wrap=bcm_attach_check", - "--wrap=bcm_l2_addr_delete", - "--wrap=bcm_vlan_port_remove", - "--wrap=bcm_l3_egress_destroy", - "--wrap=bcm_stg_vlan_add", - "--wrap=bcm_l3_intf_find", - "--wrap=bcm_l3_egress_create", - "--wrap=bcm_port_local_get", - "--wrap=bcm_l3_host_delete_all", - "--wrap=bcm_l3_intf_create", - "--wrap=bcm_l2_addr_get", - "--wrap=bcm_l3_egress_multipath_traverse", - "--wrap=bcm_rx_register", - "--wrap=bcm_knet_netif_t_init", - "--wrap=bcm_rx_start", - "--wrap=bcm_l3_route_max_ecmp_get", - "--wrap=bcm_l3_ecmp_member_delete", - "--wrap=bcm_l3_egress_ecmp_delete", - "--wrap=bcm_stg_destroy", - "--wrap=bcm_stg_list_destroy", - "--wrap=bcm_linkscan_enable_get", - "--wrap=bcm_l3_intf_get", - "--wrap=bcm_knet_netif_destroy", - "--wrap=bcm_stg_default_set", - "--wrap=bcm_switch_control_port_get", - "--wrap=bcm_linkscan_unregister", - "--wrap=bcm_pkt_free", - "--wrap=bcm_l3_egress_find", - "--wrap=bcm_vlan_port_add", - "--wrap=bcm_switch_event_register", - "--wrap=bcm_port_selective_set", - "--wrap=bcm_l2_traverse", - "--wrap=bcm_l3_host_delete", - "--wrap=bcm_l2_station_delete", - "--wrap=bcm_l3_egress_ecmp_traverse", - "--wrap=bcm_port_link_status_get", - "--wrap=bcm_vlan_create", - "--wrap=bcm_l3_info", - "--wrap=bcm_rx_stop", - "--wrap=bcm_switch_control_get", - "--wrap=bcm_info_get", - "--wrap=bcm_linkscan_detach", - "--wrap=bcm_l3_egress_multipath_destroy", - "--wrap=bcm_port_dtag_mode_set", - "--wrap=bcm_port_vlan_member_get", - "--wrap=bcm_vlan_default_get", - "--wrap=bcm_linkscan_mode_get", - "--wrap=bcm_stk_my_modid_get", - "--wrap=bcm_stat_clear", - "--wrap=bcm_l3_egress_multipath_delete", - "--wrap=bcm_port_config_t_init", - "--wrap=bcm_port_config_get", - "--wrap=bcm_linkscan_mode_set", - "--wrap=bcm_vlan_destroy_all", - "--wrap=bcm_detach", - "--wrap=_bcm_shutdown", - "--wrap=bcm_stg_create", - "--wrap=bcm_port_learn_get", - "--wrap=bcm_knet_netif_traverse", - "--wrap=bcm_rx_cfg_get", - "--wrap=bcm_tx", - "--wrap=bcm_pktio_tx", - "--wrap=bcm_pktio_txpmd_stat_attach", - "--wrap=bcm_pktio_txpmd_stat_detach", - "--wrap=bcm_l3_intf_find_vlan", - "--wrap=bcm_l3_route_get", - "--wrap=bcm_port_name", - "--wrap=bcm_l3_host_traverse", - "--wrap=bcm_port_frame_max_set", - "--wrap=bcm_l2_station_get", - "--wrap=bcm_rx_control_set", - "--wrap=bcm_l3_route_max_ecmp_set", - "--wrap=bcm_l3_route_multipath_get", - "--wrap=bcm_port_ability_advert_set", - "--wrap=bcm_ip6_mask_create", - "--wrap=bcm_trunk_init", - "--wrap=bcm_trunk_get", - "--wrap=bcm_trunk_set", - "--wrap=bcm_trunk_create", - "--wrap=bcm_trunk_destroy", - "--wrap=bcm_trunk_member_add", - "--wrap=bcm_trunk_member_delete", - "--wrap=bcm_trunk_find", - "--wrap=bcm_l3_ingress_create", - "--wrap=bcm_l3_ingress_destroy", - "--wrap=bcm_vlan_control_vlan_set", - "--wrap=bcm_vlan_control_vlan_get", - "--wrap=bcm_l3_egress_ecmp_ethertype_set", - "--wrap=bcm_l3_egress_ecmp_ethertype_get", - "--wrap=bcm_l3_egress_ecmp_member_status_set", - "--wrap=bcm_l3_egress_ecmp_member_status_get", - "--wrap=bcm_l3_ecmp_dlb_port_quality_attr_t_init", - "--wrap=bcm_l3_ecmp_dlb_port_quality_attr_set", - "--wrap=bcm_l3_ecmp_dlb_port_quality_attr_get", - "--wrap=bcm_port_control_phy_timesync_set", -] diff --git a/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp b/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp index 01b6fc66550a7..9b753bbf02a37 100644 --- a/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp +++ b/fboss/agent/hw/benchmarks/AgentTeFlowStatsExportBenchmark.cpp @@ -48,7 +48,7 @@ BENCHMARK(AgentTeFlowStatsPublishToFsdb) { }; AgentEnsemblePlatformConfigFn platformConfigFn = - [](cfg::PlatformConfig& config) { + [](const cfg::SwitchConfig&, cfg::PlatformConfig& config) { if (!(config.chip()->getType() == config.chip()->bcm)) { return; } diff --git a/fboss/agent/hw/benchmarks/BUCK b/fboss/agent/hw/benchmarks/BUCK index 5694f6c71aef5..6462497e7593e 100644 --- a/fboss/agent/hw/benchmarks/BUCK +++ b/fboss/agent/hw/benchmarks/BUCK @@ -378,3 +378,9 @@ agent_benchmark_lib( "//fboss/agent/hw/test:hw_test_thrift_handler_h", ], ) + +agent_benchmark_lib( + name = "hw_voq_sys_port_programming", + srcs = ["HwVoqSysPortProgrammingBenchmark.cpp"], + extra_deps = [], +) diff --git a/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp b/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp index 791029aec57d7..b589c32fe9a85 100644 --- a/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp +++ b/fboss/agent/hw/benchmarks/HwTeFlowScaleBenchmarkHelper.cpp @@ -48,7 +48,7 @@ void teFlowAddDelEntriesBenchmarkHelper(bool measureAdd) { ensemble.getSw(), {ports[0], ports[1]}); }; AgentEnsemblePlatformConfigFn platformConfigFn = - [](cfg::PlatformConfig& config) { + [](const cfg::SwitchConfig&, cfg::PlatformConfig& config) { if (!(config.chip()->getType() == config.chip()->bcm)) { return; } diff --git a/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp b/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp index 47d2b4d0d7ac5..9ba81e5bd1879 100644 --- a/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp +++ b/fboss/agent/hw/benchmarks/HwTeFlowStatsCollectionBenchmark.cpp @@ -49,7 +49,7 @@ BENCHMARK(HwTeFlowStatsCollection) { }; AgentEnsemblePlatformConfigFn platformConfigFn = - [](cfg::PlatformConfig& config) { + [](const cfg::SwitchConfig&, cfg::PlatformConfig& config) { if (!(config.chip()->getType() == config.chip()->bcm)) { return; } diff --git a/fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp b/fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp new file mode 100644 index 0000000000000..7ae385be49ed3 --- /dev/null +++ b/fboss/agent/hw/benchmarks/HwVoqSysPortProgrammingBenchmark.cpp @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "fboss/agent/AgentFeatures.h" +#include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/FibHelpers.h" +#include "fboss/agent/Utils.h" +#include "fboss/agent/hw/test/ConfigFactory.h" +#include "fboss/agent/test/AgentEnsemble.h" +#include "fboss/agent/test/utils/DsfConfigUtils.h" +#include "fboss/agent/test/utils/VoqTestUtils.h" +#include "fboss/lib/FunctionCallTimeReporter.h" + +#include + +namespace facebook::fboss { + +BENCHMARK(HwVoqSysPortProgramming) { + folly::BenchmarkSuspender suspender; + + AgentEnsembleSwitchConfigFn voqInitialConfig = + [](const AgentEnsemble& ensemble) { + FLAGS_hide_fabric_ports = false; + FLAGS_dsf_subscribe = false; + auto config = utility::onePortPerInterfaceConfig( + ensemble.getSw(), + ensemble.masterLogicalPortIds(), + true, /*interfaceHasSubnet*/ + true, /*setInterfaceMac*/ + utility::kBaseVlanId, + true /*enable fabric ports*/); + config.dsfNodes() = *utility::addRemoteIntfNodeCfg(*config.dsfNodes()); + return config; + }; + auto ensemble = + createAgentEnsemble(voqInitialConfig, false /*disableLinkStateToggler*/); + ScopedCallTimer timeIt; + + auto updateDsfStateFn = [&ensemble](const std::shared_ptr& in) { + std::map> switchId2SystemPorts; + std::map> switchId2Rifs; + utility::populateRemoteIntfAndSysPorts( + switchId2SystemPorts, + switchId2Rifs, + ensemble->getSw()->getConfig(), + ensemble->getSw()->getHwAsicTable()->isFeatureSupportedOnAllAsic( + HwAsic::Feature::RESERVED_ENCAP_INDEX_RANGE)); + return DsfStateUpdaterUtil::getUpdatedState( + in, + ensemble->getSw()->getScopeResolver(), + ensemble->getSw()->getRib(), + switchId2SystemPorts, + switchId2Rifs); + }; + + suspender.dismiss(); + ensemble->getSw()->getRib()->updateStateInRibThread( + [&ensemble, updateDsfStateFn]() { + ensemble->getSw()->updateStateWithHwFailureProtection( + folly::sformat("Update state for node: {}", 0), updateDsfStateFn); + }); + suspender.rehire(); +} +} // namespace facebook::fboss diff --git a/fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl b/fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl deleted file mode 100644 index aeca39a73d3c0..0000000000000 --- a/fboss/agent/hw/benchmarks/agent_hw_benchmarks.bzl +++ /dev/null @@ -1,28 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -def agent_benchmark_lib(name, srcs, extra_deps = None): - extra_deps = extra_deps if extra_deps else [] - extra_deps += [ - ":hw_route_scale_benchmark_helpers", - "//folly:benchmark", - "//folly:dynamic", - "//folly:json", - "//fboss/agent/hw/test:config_factory", - "//fboss/agent/hw/test:hw_packet_utils", - "//fboss/agent/test/utils:voq_test_utils", - "//fboss/agent/test:ecmp_helper", - "//fboss/lib:function_call_time_reporter", - "//fboss/agent/benchmarks:agent_benchmarks_h", - ] - - return cpp_library( - name = name, - srcs = srcs, - # Don't drop the benchmark functions they will be needed - # in the final benchmark run - link_whole = True, - # Ensemble will be linked in by particular HwSwitch - # implementations - undefined_symbols = True, - exported_deps = extra_deps, - ) diff --git a/fboss/agent/hw/config/asic_config_v2.thrift b/fboss/agent/hw/config/asic_config_v2.thrift index 65f31d4a879ca..8f99b9117ffaa 100644 --- a/fboss/agent/hw/config/asic_config_v2.thrift +++ b/fboss/agent/hw/config/asic_config_v2.thrift @@ -23,9 +23,34 @@ struct AsicConfig { 2: optional map npuEntries; } +/* + * AsicConfigGenType determines the vendor configs to be + * generated based on the gen type mode. + * - DEFAULT - prod asic config + * - HW_TEST - SAI Hw test asic config + * - BENCHMARK - Benchmark asic config + * - LINK_TEST - Link test asic config + */ +enum AsicConfigGenType { + DEFAULT = 0, + HW_TEST = 1, + BENCHMARK = 2, + LINK_TEST = 3, +} + +// asic config depending on roles in multistage DNX network +enum MultistageRole { + NONE = 0, + FAP = 1, // for Jericho3 + FE13 = 2, // for 1st stage Ramon3 + FE2 = 3, // for 2nd stage Ramon3 +} + struct AsicConfigParameters { 1: AsicConfigType configType; 2: optional bool exactMatch; 3: optional bool mmuLossless; - 4: optional bool testConfig; + 4: optional AsicConfigGenType configGenType; + 5: optional string portConfig; + 6: optional MultistageRole multistageRole; } diff --git a/fboss/agent/hw/mock/MockPlatformMapping.cpp b/fboss/agent/hw/mock/MockPlatformMapping.cpp index d1038b55ebdfa..6f201d46371bc 100644 --- a/fboss/agent/hw/mock/MockPlatformMapping.cpp +++ b/fboss/agent/hw/mock/MockPlatformMapping.cpp @@ -18,6 +18,7 @@ MockPlatformMapping::MockPlatformMapping() : Wedge100PlatformMapping() { auto& platformPort = entry.second; platformPort.mapping()->attachedCoreId() = 0; platformPort.mapping()->attachedCorePortIndex() = 0; + platformPort.mapping()->virtualDeviceId() = 0; } } } // namespace facebook::fboss diff --git a/fboss/agent/hw/mock/MockTestHandle.cpp b/fboss/agent/hw/mock/MockTestHandle.cpp index fc387c9bf2371..fdd31f8054afd 100644 --- a/fboss/agent/hw/mock/MockTestHandle.cpp +++ b/fboss/agent/hw/mock/MockTestHandle.cpp @@ -33,11 +33,11 @@ void MockTestHandle::rxPacket( } void MockTestHandle::forcePortDown(PortID port) { - getSw()->linkStateChanged(port, false); + getSw()->linkStateChanged(port, false, cfg::PortType::INTERFACE_PORT); } void MockTestHandle::forcePortUp(PortID port) { - getSw()->linkStateChanged(port, true); + getSw()->linkStateChanged(port, true, cfg::PortType::INTERFACE_PORT); } void MockTestHandle::forcePortFlap(PortID port) { diff --git a/fboss/agent/hw/sai/api/AclApi.h b/fboss/agent/hw/sai/api/AclApi.h index 8e661b05e7876..bbdd21ee2a2eb 100644 --- a/fboss/agent/hw/sai/api/AclApi.h +++ b/fboss/agent/hw/sai/api/AclApi.h @@ -149,7 +149,7 @@ struct SaiAclTableTraits { SaiAttribute; using FieldTcpFlags = SaiAttribute; -#if defined(TAJO_SDK) +#if defined(TAJO_SDK) || defined(CHENAB_SAI_SDK) using FieldSrcPort = SaiAttribute; #else @@ -311,7 +311,7 @@ struct SaiAclEntryTraits { EnumType, SAI_ACL_ENTRY_ATTR_FIELD_DST_IP, AclEntryFieldIpV4>; -#if defined(TAJO_SDK) +#if defined(TAJO_SDK) || defined(CHENAB_SAI_SDK) using FieldSrcPort = SaiAttribute< EnumType, SAI_ACL_ENTRY_ATTR_FIELD_IN_PORT, diff --git a/fboss/agent/hw/sai/api/BUCK b/fboss/agent/hw/sai/api/BUCK index e8d701942767c..d89bad082f259 100644 --- a/fboss/agent/hw/sai/api/BUCK +++ b/fboss/agent/hw/sai/api/BUCK @@ -94,6 +94,7 @@ cpp_library( "SwitchApi.h", "SystemPortApi.h", "TamApi.h", + "TamEventAgingGroupApi.h", "Traits.h", "TunnelApi.h", "Types.h", diff --git a/fboss/agent/hw/sai/api/BufferApi.h b/fboss/agent/hw/sai/api/BufferApi.h index e63fc24962950..581d34af12368 100644 --- a/fboss/agent/hw/sai/api/BufferApi.h +++ b/fboss/agent/hw/sai/api/BufferApi.h @@ -93,6 +93,10 @@ struct SaiBufferProfileTraits { EnumType, SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH, sai_int8_t>; + using SharedStaticThreshold = SaiAttribute< + EnumType, + SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH, + sai_uint64_t>; using XoffTh = SaiAttribute; using XonTh = @@ -106,6 +110,26 @@ struct SaiBufferProfileTraits { }; using SharedFadtMaxTh = SaiExtensionAttribute; + struct AttributeSharedFadtMinTh { + std::optional operator()(); + }; + using SharedFadtMinTh = + SaiExtensionAttribute; + struct AttributeSramFadtMaxTh { + std::optional operator()(); + }; + using SramFadtMaxTh = + SaiExtensionAttribute; + struct AttributeSramFadtMinTh { + std::optional operator()(); + }; + using SramFadtMinTh = + SaiExtensionAttribute; + struct AttributeSramFadtXonOffset { + std::optional operator()(); + }; + using SramFadtXonOffset = + SaiExtensionAttribute; }; using AdapterKey = BufferProfileSaiId; using CreateAttributes = std::tuple< @@ -113,10 +137,19 @@ struct SaiBufferProfileTraits { std::optional, std::optional, std::optional, +#if not defined(BRCM_SAI_SDK_XGS_AND_DNX) + // TODO(nivinl): Get rid of the check once support is + // available in SAI 8.2/11.3 - CS00012374846. + std::optional, +#endif std::optional, std::optional, std::optional, - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; using AdapterHostKey = CreateAttributes; }; @@ -124,10 +157,15 @@ SAI_ATTRIBUTE_NAME(BufferProfile, PoolId); SAI_ATTRIBUTE_NAME(BufferProfile, ReservedBytes); SAI_ATTRIBUTE_NAME(BufferProfile, ThresholdMode); SAI_ATTRIBUTE_NAME(BufferProfile, SharedDynamicThreshold); +SAI_ATTRIBUTE_NAME(BufferProfile, SharedStaticThreshold); SAI_ATTRIBUTE_NAME(BufferProfile, XoffTh); SAI_ATTRIBUTE_NAME(BufferProfile, XonTh); SAI_ATTRIBUTE_NAME(BufferProfile, XonOffsetTh); SAI_ATTRIBUTE_NAME(BufferProfile, SharedFadtMaxTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SharedFadtMinTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SramFadtMaxTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SramFadtMinTh); +SAI_ATTRIBUTE_NAME(BufferProfile, SramFadtXonOffset); struct SaiIngressPriorityGroupTraits { static constexpr sai_api_t ApiType = SAI_API_BUFFER; diff --git a/fboss/agent/hw/sai/api/LoggingUtil.cpp b/fboss/agent/hw/sai/api/LoggingUtil.cpp index 5b0835bf89c3e..5014f265868d1 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.cpp +++ b/fboss/agent/hw/sai/api/LoggingUtil.cpp @@ -16,9 +16,31 @@ #include +extern "C" { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif +} + namespace facebook::fboss { folly::StringPiece saiApiTypeToString(sai_api_t apiType) { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + if (UNLIKELY(apiType >= SAI_API_MAX)) { + switch (static_cast(apiType)) { + case SAI_API_TAM_EVENT_AGING_GROUP: + return "tam-event-aging-group"; + default: + break; + } + } +#endif + switch (apiType) { case SAI_API_UNSPECIFIED: return "unspecified"; @@ -127,6 +149,17 @@ folly::StringPiece saiApiTypeToString(sai_api_t apiType) { } folly::StringPiece saiObjectTypeToString(sai_object_type_t objectType) { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + if (UNLIKELY(objectType >= SAI_OBJECT_TYPE_MAX)) { + switch (static_cast(objectType)) { + case SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP: + return "event-aging-group"; + default: + throw FbossError("object type extension invalid: ", objectType); + } + } +#endif + switch (objectType) { case SAI_OBJECT_TYPE_NULL: return "null"; @@ -208,6 +241,10 @@ folly::StringPiece saiObjectTypeToString(sai_object_type_t objectType) { return "debug-counter"; case SAI_OBJECT_TYPE_WRED: return "wred"; + case SAI_OBJECT_TYPE_TAM_COLLECTOR: + return "tam-collector"; + case SAI_OBJECT_TYPE_TAM_TRANSPORT: + return "tam-transport"; case SAI_OBJECT_TYPE_TAM_REPORT: return "tam-report"; case SAI_OBJECT_TYPE_TAM_EVENT_ACTION: @@ -390,6 +427,8 @@ folly::StringPiece packetRxReasonToString(cfg::PacketRxReason rxReason) { return "samplepacket"; case cfg::PacketRxReason::EAPOL: return "eapol"; + case cfg::PacketRxReason::PORT_MTU_ERROR: + return "port-mtu-error"; default: return "unknown-trap"; } diff --git a/fboss/agent/hw/sai/api/LoggingUtil.h b/fboss/agent/hw/sai/api/LoggingUtil.h index b3674603481fc..e3d49473c5b62 100644 --- a/fboss/agent/hw/sai/api/LoggingUtil.h +++ b/fboss/agent/hw/sai/api/LoggingUtil.h @@ -269,6 +269,19 @@ struct formatter { prbsStats.error_count); } }; +// Formatting for sai_object_type_t +template <> +struct formatter { + template + constexpr auto parse(ParseContext& ctx) const { + return ctx.begin(); + } + + template + auto format(const sai_object_type_t& type, FormatContext& ctx) const { + return format_to(ctx.out(), "{}", static_cast(type)); + } +}; #endif // Formatting for sai_port_err_status_list_t diff --git a/fboss/agent/hw/sai/api/MirrorApi.h b/fboss/agent/hw/sai/api/MirrorApi.h index cb7933f97814e..0ede3ad5cc3a9 100644 --- a/fboss/agent/hw/sai/api/MirrorApi.h +++ b/fboss/agent/hw/sai/api/MirrorApi.h @@ -170,6 +170,11 @@ struct SaiMirrorTraits { EnumType, SAI_MIRROR_SESSION_ATTR_SAMPLE_RATE, sai_uint32_t>; + struct AttributeTcBufferLimit { + std::optional operator()(); + }; + using TcBufferLimit = + SaiExtensionAttribute; }; using CreateAttributes = std::tuple< typename Attributes::Type, @@ -184,7 +189,8 @@ struct SaiMirrorTraits { typename Attributes::IpHeaderVersion, std::optional, std::optional, - std::optional>; + std::optional, + std::optional>; using AdapterHostKey = std::tuple< typename Attributes::Type, typename Attributes::MonitorPort, @@ -250,6 +256,7 @@ SAI_ATTRIBUTE_NAME(EnhancedRemoteMirror, IpHeaderVersion) SAI_ATTRIBUTE_NAME(EnhancedRemoteMirror, SampleRate) SAI_ATTRIBUTE_NAME(SflowMirror, UdpSrcPort) SAI_ATTRIBUTE_NAME(SflowMirror, UdpDstPort) +SAI_ATTRIBUTE_NAME(SflowMirror, TcBufferLimit) class MirrorApi : public SaiApi { public: diff --git a/fboss/agent/hw/sai/api/PortApi.h b/fboss/agent/hw/sai/api/PortApi.h index 38ef69766056c..88dde6c95cfd8 100644 --- a/fboss/agent/hw/sai/api/PortApi.h +++ b/fboss/agent/hw/sai/api/PortApi.h @@ -152,6 +152,11 @@ struct SaiPortTraits { SAI_PORT_ATTR_PKT_TX_ENABLE, bool, SaiBoolDefaultTrue>; + using TamObject = SaiAttribute< + EnumType, + SAI_PORT_ATTR_TAM_OBJECT, + std::vector, + SaiObjectIdListDefault>; using SerdesId = SaiAttribute< EnumType, SAI_PORT_ATTR_PORT_SERDES_ID, @@ -419,6 +424,27 @@ struct SaiPortTraits { sai_uint32_t, AttributeReachabilityGroup, SaiIntDefault>; + struct AttributeCondEntropyRehashEnable { + std::optional operator()(); + }; + using CondEntropyRehashEnable = SaiExtensionAttribute< + bool, + AttributeCondEntropyRehashEnable, + SaiBoolDefaultFalse>; + struct AttributeCondEntropyRehashPeriodUS { + std::optional operator()(); + }; + using CondEntropyRehashPeriodUS = SaiExtensionAttribute< + sai_uint32_t, + AttributeCondEntropyRehashPeriodUS, + SaiIntDefault>; + struct AttributeCondEntropyRehashSeed { + std::optional operator()(); + }; + using CondEntropyRehashSeed = SaiExtensionAttribute< + sai_uint32_t, + AttributeCondEntropyRehashSeed, + SaiIntDefault>; }; using AdapterKey = PortSaiId; @@ -487,6 +513,7 @@ struct SaiPortTraits { std::optional, std::optional, std::optional, + std::optional, std::optional, std::optional, std::optional, @@ -523,7 +550,10 @@ struct SaiPortTraits { std::optional, std::optional, #endif - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional>; static constexpr std::array CounterIdsToRead = { SAI_PORT_STAT_IF_IN_OCTETS, SAI_PORT_STAT_IF_IN_UCAST_PKTS, @@ -600,6 +630,7 @@ SAI_ATTRIBUTE_NAME(Port, QosQueueList) SAI_ATTRIBUTE_NAME(Port, Type) SAI_ATTRIBUTE_NAME(Port, InterfaceType) SAI_ATTRIBUTE_NAME(Port, PktTxEnable) +SAI_ATTRIBUTE_NAME(Port, TamObject) SAI_ATTRIBUTE_NAME(Port, SerdesId) SAI_ATTRIBUTE_NAME(Port, IngressMirrorSession) SAI_ATTRIBUTE_NAME(Port, EgressMirrorSession) @@ -674,6 +705,9 @@ SAI_ATTRIBUTE_NAME(Port, ArsPortLoadPastWeight) SAI_ATTRIBUTE_NAME(Port, ArsPortLoadFutureWeight) #endif SAI_ATTRIBUTE_NAME(Port, ReachabilityGroup) +SAI_ATTRIBUTE_NAME(Port, CondEntropyRehashEnable) +SAI_ATTRIBUTE_NAME(Port, CondEntropyRehashPeriodUS) +SAI_ATTRIBUTE_NAME(Port, CondEntropyRehashSeed) template <> struct SaiObjectHasStats : public std::true_type {}; @@ -771,6 +805,167 @@ struct SaiPortSerdesTraits { using RxAfeAdaptiveEnable = SaiExtensionAttribute< std::vector, AttributeRxAfeAdaptiveEnableWrapper>; + // Tx Attributes + struct AttributeTxDiffEncoderEnWrapper { + std::optional operator()(); + }; + struct AttributeTxDigGainWrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff0Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff1Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff2Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff3Wrapper { + std::optional operator()(); + }; + struct AttributeTxFfeCoeff4Wrapper { + std::optional operator()(); + }; + struct AttributeTxDriverSwingWrapper { + std::optional operator()(); + }; + + // Rx Attributes + struct AttributeRxInstgBoost1StartWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost1StepWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost1StopWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost2OrHrStartWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost2OrHrStepWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgBoost2OrHrStopWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgC1Start1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgC1Step1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgC1Stop1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgDfeStart1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgDfeStep1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxInstgDfeStop1p7Wrapper { + std::optional operator()(); + }; + struct AttributeRxEnableScanSelectionWrapper { + std::optional operator()(); + }; + struct AttributeRxInstgScanUseSrSettingsWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrCfgOvEnWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrTdet1stOrdStepOvValWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrTdet2ndOrdStepOvValWrapper { + std::optional operator()(); + }; + struct AttributeRxCdrTdetFineStepOvValWrapper { + std::optional operator()(); + }; + + using TxDiffEncoderEn = SaiExtensionAttribute< + std::vector, + AttributeTxDiffEncoderEnWrapper>; + using TxDigGain = SaiExtensionAttribute< + std::vector, + AttributeTxDigGainWrapper>; + using TxFfeCoeff0 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff0Wrapper>; + using TxFfeCoeff1 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff1Wrapper>; + using TxFfeCoeff2 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff2Wrapper>; + using TxFfeCoeff3 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff3Wrapper>; + using TxFfeCoeff4 = SaiExtensionAttribute< + std::vector, + AttributeTxFfeCoeff4Wrapper>; + using TxDriverSwing = SaiExtensionAttribute< + std::vector, + AttributeTxDriverSwingWrapper>; + + using RxInstgBoost1Start = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost1StartWrapper>; + using RxInstgBoost1Step = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost1StepWrapper>; + using RxInstgBoost1Stop = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost1StopWrapper>; + using RxInstgBoost2OrHrStart = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost2OrHrStartWrapper>; + using RxInstgBoost2OrHrStep = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost2OrHrStepWrapper>; + using RxInstgBoost2OrHrStop = SaiExtensionAttribute< + std::vector, + AttributeRxInstgBoost2OrHrStopWrapper>; + using RxInstgC1Start1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgC1Start1p7Wrapper>; + using RxInstgC1Step1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgC1Step1p7Wrapper>; + using RxInstgC1Stop1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgC1Stop1p7Wrapper>; + using RxInstgDfeStart1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgDfeStart1p7Wrapper>; + using RxInstgDfeStep1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgDfeStep1p7Wrapper>; + using RxInstgDfeStop1p7 = SaiExtensionAttribute< + std::vector, + AttributeRxInstgDfeStop1p7Wrapper>; + using RxEnableScanSelection = SaiExtensionAttribute< + std::vector, + AttributeRxEnableScanSelectionWrapper>; + using RxInstgScanUseSrSettings = SaiExtensionAttribute< + std::vector, + AttributeRxInstgScanUseSrSettingsWrapper>; + using RxCdrCfgOvEn = SaiExtensionAttribute< + std::vector, + AttributeRxCdrCfgOvEnWrapper>; + using RxCdrTdet1stOrdStepOvVal = SaiExtensionAttribute< + std::vector, + AttributeRxCdrTdet1stOrdStepOvValWrapper>; + using RxCdrTdet2ndOrdStepOvVal = SaiExtensionAttribute< + std::vector, + AttributeRxCdrTdet2ndOrdStepOvValWrapper>; + using RxCdrTdetFineStepOvVal = SaiExtensionAttribute< + std::vector, + AttributeRxCdrTdetFineStepOvValWrapper>; }; using AdapterKey = PortSerdesSaiId; using AdapterHostKey = Attributes::PortId; @@ -791,7 +986,33 @@ struct SaiPortSerdesTraits { std::optional, std::optional, std::optional, - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; }; SAI_ATTRIBUTE_NAME(PortSerdes, PortId); @@ -810,6 +1031,32 @@ SAI_ATTRIBUTE_NAME(PortSerdes, RxDspMode); SAI_ATTRIBUTE_NAME(PortSerdes, RxAfeTrim); SAI_ATTRIBUTE_NAME(PortSerdes, RxAcCouplingByPass); SAI_ATTRIBUTE_NAME(PortSerdes, RxAfeAdaptiveEnable); +SAI_ATTRIBUTE_NAME(PortSerdes, TxDiffEncoderEn); +SAI_ATTRIBUTE_NAME(PortSerdes, TxDigGain); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff0); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff1); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff2); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff3); +SAI_ATTRIBUTE_NAME(PortSerdes, TxFfeCoeff4); +SAI_ATTRIBUTE_NAME(PortSerdes, TxDriverSwing); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost1Start); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost1Step); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost1Stop); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost2OrHrStart); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost2OrHrStep); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgBoost2OrHrStop); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgC1Start1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgC1Step1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgC1Stop1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgDfeStart1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgDfeStep1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgDfeStop1p7); +SAI_ATTRIBUTE_NAME(PortSerdes, RxEnableScanSelection); +SAI_ATTRIBUTE_NAME(PortSerdes, RxInstgScanUseSrSettings); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrCfgOvEn); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrTdet1stOrdStepOvVal); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrTdet2ndOrdStepOvVal); +SAI_ATTRIBUTE_NAME(PortSerdes, RxCdrTdetFineStepOvVal); struct SaiPortConnectorTraits { static constexpr sai_object_type_t ObjectType = diff --git a/fboss/agent/hw/sai/api/RouterInterfaceApi.h b/fboss/agent/hw/sai/api/RouterInterfaceApi.h index fa34eecbea91b..8338f9e4d0847 100644 --- a/fboss/agent/hw/sai/api/RouterInterfaceApi.h +++ b/fboss/agent/hw/sai/api/RouterInterfaceApi.h @@ -117,8 +117,11 @@ struct SaiRouterInterfaceTraitsT { typename detail::RouterInterfaceAttributesTypes::VlanId; using PortId = typename detail::RouterInterfaceAttributesTypes::PortId; - using Mtu = - SaiAttribute; + using Mtu = SaiAttribute< + EnumType, + SAI_ROUTER_INTERFACE_ATTR_MTU, + sai_uint32_t, + SaiIntDefault>; }; using AdapterKey = RouterInterfaceSaiId; using AdapterHostKey = typename detail:: diff --git a/fboss/agent/hw/sai/api/SaiApiTable.cpp b/fboss/agent/hw/sai/api/SaiApiTable.cpp index 4089357bbee24..348470e2a7044 100644 --- a/fboss/agent/hw/sai/api/SaiApiTable.cpp +++ b/fboss/agent/hw/sai/api/SaiApiTable.cpp @@ -197,6 +197,12 @@ const TamApi& SaiApiTable::tamApi() const { return getApi(); } +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) +const TamEventAgingGroupApi& SaiApiTable::tamEventAgingGroupApi() const { + return getApi(); +} +#endif + const TunnelApi& SaiApiTable::tunnelApi() const { return getApi(); } diff --git a/fboss/agent/hw/sai/api/SaiApiTable.h b/fboss/agent/hw/sai/api/SaiApiTable.h index 1f1c2ecd02bb7..c8c829f2fd94f 100644 --- a/fboss/agent/hw/sai/api/SaiApiTable.h +++ b/fboss/agent/hw/sai/api/SaiApiTable.h @@ -36,6 +36,7 @@ #include "fboss/agent/hw/sai/api/SwitchApi.h" #include "fboss/agent/hw/sai/api/SystemPortApi.h" #include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/api/TamEventAgingGroupApi.h" #include "fboss/agent/hw/sai/api/TunnelApi.h" #include "fboss/agent/hw/sai/api/UdfApi.h" #include "fboss/agent/hw/sai/api/VirtualRouterApi.h" @@ -127,6 +128,10 @@ class SaiApiTable { const TamApi& tamApi() const; +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + const TamEventAgingGroupApi& tamEventAgingGroupApi() const; +#endif + const TunnelApi& tunnelApi() const; const LagApi& lagApi() const; @@ -185,6 +190,9 @@ class SaiApiTable { std::unique_ptr, std::unique_ptr, std::unique_ptr, +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + std::unique_ptr, +#endif std::unique_ptr, std::unique_ptr, std::unique_ptr> diff --git a/fboss/agent/hw/sai/api/SaiAttribute.h b/fboss/agent/hw/sai/api/SaiAttribute.h index 1eb098362c894..eec66bab7d750 100644 --- a/fboss/agent/hw/sai/api/SaiAttribute.h +++ b/fboss/agent/hw/sai/api/SaiAttribute.h @@ -184,6 +184,7 @@ DEFINE_extract(facebook::fboss::AclEntryFieldU32, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldIpV6, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldIpV4, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldMac, aclfield); +DEFINE_extract(facebook::fboss::AclEntryFieldU8List, aclfield); DEFINE_extract(facebook::fboss::AclEntryFieldSaiObjectIdT, aclfield); DEFINE_extract(facebook::fboss::AclEntryActionBool, aclaction); DEFINE_extract(facebook::fboss::AclEntryActionU8, aclaction); @@ -399,6 +400,37 @@ inline void _fill( facebook::fboss::toSaiMacAddress(src.getDataAndMask().second, dst.mask.mac); } +inline void _fill( + const sai_acl_field_data_t& src, + facebook::fboss::AclEntryFieldU8List& dst) { + std::vector data(src.data.u8list.count); + std::vector mask(src.mask.u8list.count); + data.resize(src.data.u8list.count); + mask.resize(src.mask.u8list.count); + std::copy( + src.data.u8list.list, + src.data.u8list.list + src.data.u8list.count, + std::begin(data)); + std::copy( + src.mask.u8list.list, + src.mask.u8list.list + src.mask.u8list.count, + std::begin(mask)); + dst.setDataAndMask(std::make_pair(std::move(data), std::move(mask))); +} + +inline void _fill( + const facebook::fboss::AclEntryFieldU8List& src, + sai_acl_field_data_t& dst) { + dst.enable = true; + const auto& dataAndMask = src.getDataAndMask(); + dst.data.u8list.count = dataAndMask.first.size(); + dst.mask.u8list.count = dataAndMask.second.size(); + dst.data.u8list.list = const_cast( + reinterpret_cast(dataAndMask.first.data())); + dst.mask.u8list.list = const_cast( + reinterpret_cast(dataAndMask.second.data())); +} + inline void _fill( const sai_acl_field_data_t& src, facebook::fboss::AclEntryFieldSaiObjectIdT& dst) { @@ -513,6 +545,16 @@ inline void _realloc( dst.setData(dstData); } +inline void _realloc( + const sai_acl_field_data_t& src, + facebook::fboss::AclEntryFieldU8List& dst) { + std::vector dstData(src.data.u8list.count); + std::vector dstMask(src.mask.u8list.count); + dstData.resize(src.data.u8list.count); + dstMask.resize(src.mask.u8list.count); + dst.setDataAndMask(std::make_pair(std::move(dstData), std::move(dstMask))); +} + template void _realloc(const SaiListT& src, std::vector& dst) { static_assert( diff --git a/fboss/agent/hw/sai/api/SaiVersion.h b/fboss/agent/hw/sai/api/SaiVersion.h index 09ef91ee3d944..eb7b5e11d83fb 100644 --- a/fboss/agent/hw/sai/api/SaiVersion.h +++ b/fboss/agent/hw/sai/api/SaiVersion.h @@ -59,6 +59,7 @@ defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ defined(SAI_VERSION_11_0_EA_DNX_SIM_ODP) || \ defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) || \ defined(SAI_VERSION_12_0_EA_DNX_ODP) #define BRCM_SAI_SDK_DNX #endif @@ -79,13 +80,15 @@ defined(SAI_VERSION_11_0_EA_SIM_ODP) || \ defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ defined(SAI_VERSION_11_0_EA_DNX_SIM_ODP) || \ - defined(SAI_VERSION_11_3_0_0_DNX_ODP) || defined(SAI_VERSION_11_3_0_0_ODP) + defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_3_0_0_ODP) || defined(SAI_VERSION_11_7_0_0_DNX_ODP) #define BRCM_SAI_SDK_GTE_11_0 #endif -#if defined BRCM_SAI_SDK_DNX_GTE_12_0 || \ - defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ - defined(SAI_VERSION_11_3_0_0_DNX_ODP) +#if defined BRCM_SAI_SDK_DNX_GTE_12_0 || \ + defined(SAI_VERSION_11_0_EA_DNX_ODP) || \ + defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) #define BRCM_SAI_SDK_DNX_GTE_11_0 #endif @@ -110,19 +113,19 @@ * - TAJO_SDK_GTE_24_4_90: Flags for SDK >= 24.4.90 * - TAJO_SDK: Flags for all TAJO SDK */ -#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_6_1) || \ - defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) +#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_7_0) || \ + defined(TAJO_SDK_VERSION_24_8_3001) || defined(TAJO_SDK_VERSION_24_10_0) #define TAJO_P4_WB_SDK #endif -#if defined(TAJO_SDK_VERSION_1_42_8) || defined(TAJO_SDK_VERSION_24_4_90) || \ - defined(TAJO_SDK_VERSION_24_6_1) || defined(TAJO_SDK_VERSION_24_7_0) || \ - defined(TAJO_SDK_VERSION_24_8_3001) +#if defined(TAJO_SDK_VERSION_1_42_8) || defined(TAJO_SDK_VERSION_24_4_90) || \ + defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) || \ + defined(TAJO_SDK_VERSION_24_10_0) #define TAJO_SDK_EBRO #endif -#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_6_1) || \ - defined(TAJO_SDK_VERSION_24_7_0) || defined(TAJO_SDK_VERSION_24_8_3001) +#if defined(TAJO_SDK_VERSION_24_4_90) || defined(TAJO_SDK_VERSION_24_7_0) || \ + defined(TAJO_SDK_VERSION_24_8_3001) || defined(TAJO_SDK_VERSION_24_10_0) #define TAJO_SDK_GTE_24_4_90 #endif diff --git a/fboss/agent/hw/sai/api/SwitchApi.h b/fboss/agent/hw/sai/api/SwitchApi.h index 8765be8415012..1158ef643399a 100644 --- a/fboss/agent/hw/sai/api/SwitchApi.h +++ b/fboss/agent/hw/sai/api/SwitchApi.h @@ -552,6 +552,32 @@ struct SaiSwitchTraits { std::vector, AttributeReachabilityGroupList, SaiU32ListDefault>; + struct AttributeFabricLinkLayerFlowControlThreshold { + std::optional operator()(); + }; + using FabricLinkLayerFlowControlThreshold = SaiExtensionAttribute< + std::vector, + AttributeFabricLinkLayerFlowControlThreshold, + SaiU32ListDefault>; + struct AttributeSramFreePercentXoffThWrapper { + std::optional operator()(); + }; + using SramFreePercentXoffTh = SaiExtensionAttribute< + sai_uint8_t, + AttributeSramFreePercentXoffThWrapper, + SaiIntDefault>; + struct AttributeSramFreePercentXonThWrapper { + std::optional operator()(); + }; + using SramFreePercentXonTh = SaiExtensionAttribute< + sai_uint8_t, + AttributeSramFreePercentXonThWrapper, + SaiIntDefault>; + struct AttributeNoAclsForTrapsWrapper { + std::optional operator()(); + }; + using NoAclsForTraps = + SaiExtensionAttribute; }; using AdapterKey = SwitchSaiId; using AdapterHostKey = std::monostate; @@ -619,7 +645,11 @@ struct SaiSwitchTraits { std::optional, #endif std::optional, - std::optional>; + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; #if SAI_API_VERSION >= SAI_VERSION(1, 12, 0) static constexpr std::array CounterIdsToRead = { @@ -751,6 +781,10 @@ SAI_ATTRIBUTE_NAME(Switch, VoqLatencyMaxLevel2Ns); SAI_ATTRIBUTE_NAME(Switch, ArsProfile) #endif SAI_ATTRIBUTE_NAME(Switch, ReachabilityGroupList); +SAI_ATTRIBUTE_NAME(Switch, FabricLinkLayerFlowControlThreshold); +SAI_ATTRIBUTE_NAME(Switch, SramFreePercentXoffTh); +SAI_ATTRIBUTE_NAME(Switch, SramFreePercentXonTh); +SAI_ATTRIBUTE_NAME(Switch, NoAclsForTraps) template <> struct SaiObjectHasStats : public std::true_type {}; diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index 2cd0edd816b17..e53161f722d49 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -2,6 +2,9 @@ #pragma once +#include +#include + #include "fboss/agent/hw/sai/api/SaiApi.h" #include "fboss/agent/hw/sai/api/SaiAttribute.h" #include "fboss/agent/hw/sai/api/SaiAttributeDataTypes.h" @@ -16,6 +19,87 @@ namespace facebook::fboss { class TamApi; +struct SaiTamCollectorTraits { + static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_COLLECTOR; + using SaiApiT = TamApi; + struct Attributes { + using EnumType = sai_tam_collector_attr_t; + using SrcIp = + SaiAttribute; + using DstIp = + SaiAttribute; + using TruncateSize = SaiAttribute< + EnumType, + SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE, + sai_uint16_t>; + using Transport = SaiAttribute< + EnumType, + SAI_TAM_COLLECTOR_ATTR_TRANSPORT, + sai_object_id_t>; + using DscpValue = + SaiAttribute; + }; + using AdapterKey = TamCollectorSaiId; + using AdapterHostKey = std::tuple< + Attributes::SrcIp, + Attributes::DstIp, + std::optional, + Attributes::Transport, + std::optional>; + using CreateAttributes = AdapterHostKey; +}; + +SAI_ATTRIBUTE_NAME(TamCollector, SrcIp) +SAI_ATTRIBUTE_NAME(TamCollector, DstIp) +SAI_ATTRIBUTE_NAME(TamCollector, TruncateSize) +SAI_ATTRIBUTE_NAME(TamCollector, Transport) +SAI_ATTRIBUTE_NAME(TamCollector, DscpValue) + +struct SaiTamTransportTraits { + static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_TRANSPORT; + using SaiApiT = TamApi; + struct Attributes { + using EnumType = sai_tam_transport_attr_t; + using Type = SaiAttribute< + EnumType, + SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE, + sai_int32_t>; + using SrcPort = + SaiAttribute; + using DstPort = + SaiAttribute; + using Mtu = + SaiAttribute; + /* extension attributes */ + struct AttributeSrcMacAddress { + std::optional operator()(); + }; + using SrcMacAddress = + SaiExtensionAttribute; + struct AttributeDstMacAddress { + std::optional operator()(); + }; + using DstMacAddress = + SaiExtensionAttribute; + }; + using AdapterKey = TamTransportSaiId; + using AdapterHostKey = std::tuple< + Attributes::Type, + Attributes::SrcPort, + Attributes::DstPort, + Attributes::Mtu, + std::optional, + std::optional>; + using CreateAttributes = AdapterHostKey; +}; + +SAI_ATTRIBUTE_NAME(TamTransport, Type) +SAI_ATTRIBUTE_NAME(TamTransport, SrcPort) +SAI_ATTRIBUTE_NAME(TamTransport, DstPort) +SAI_ATTRIBUTE_NAME(TamTransport, Mtu) +SAI_ATTRIBUTE_NAME(TamTransport, SrcMacAddress) +SAI_ATTRIBUTE_NAME(TamTransport, DstMacAddress) + struct SaiTamReportTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM_REPORT; using SaiApiT = TamApi; @@ -69,18 +153,43 @@ struct SaiTamEventTraits { using SwitchEventType = SaiExtensionAttribute< std::vector, AttributeSwitchEventType>; - + struct AttributeDeviceId { + std::optional operator()(); + }; + using DeviceId = SaiExtensionAttribute; struct AttributeEventId { std::optional operator()(); }; using SwitchEventId = SaiExtensionAttribute; + struct AttributeExtensionsCollectorList { + std::optional operator()(); + }; + using ExtensionsCollectorList = SaiExtensionAttribute< + std::vector, + AttributeExtensionsCollectorList>; + struct AttributePacketDropTypeMmu { + std::optional operator()(); + }; + using PacketDropTypeMmu = SaiExtensionAttribute< + std::vector, + AttributePacketDropTypeMmu>; + struct AttributeAgingGroup { + std::optional operator()(); + }; + using AgingGroup = + SaiExtensionAttribute; }; using AdapterKey = TamEventSaiId; using AdapterHostKey = std::tuple< Attributes::Type, Attributes::ActionList, Attributes::CollectorList, - Attributes::SwitchEventType>; + std::optional, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; using CreateAttributes = AdapterHostKey; }; @@ -88,6 +197,11 @@ SAI_ATTRIBUTE_NAME(TamEvent, Type) SAI_ATTRIBUTE_NAME(TamEvent, ActionList) SAI_ATTRIBUTE_NAME(TamEvent, CollectorList) SAI_ATTRIBUTE_NAME(TamEvent, SwitchEventType) +SAI_ATTRIBUTE_NAME(TamEvent, DeviceId) +SAI_ATTRIBUTE_NAME(TamEvent, SwitchEventId) +SAI_ATTRIBUTE_NAME(TamEvent, ExtensionsCollectorList) +SAI_ATTRIBUTE_NAME(TamEvent, PacketDropTypeMmu) +SAI_ATTRIBUTE_NAME(TamEvent, AgingGroup) struct SaiTamTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM; @@ -212,8 +326,78 @@ class TamApi : public SaiApi { return api_->set_tam_report_attribute(id, attr); } + // TAM Transport + sai_status_t _create( + TamTransportSaiId* id, + sai_object_id_t switch_id, + size_t count, + sai_attribute_t* attr_list) const { + return api_->create_tam_transport( + rawSaiId(id), switch_id, count, attr_list); + } + + sai_status_t _remove(TamTransportSaiId id) const { + return api_->remove_tam_transport(id); + } + + sai_status_t _getAttribute(TamTransportSaiId id, sai_attribute_t* attr) + const { + return api_->get_tam_transport_attribute(id, 1, attr); + } + + sai_status_t _setAttribute(TamTransportSaiId id, const sai_attribute_t* attr) + const { + return api_->set_tam_transport_attribute(id, attr); + } + + // TAM Collector + sai_status_t _create( + TamCollectorSaiId* id, + sai_object_id_t switch_id, + size_t count, + sai_attribute_t* attr_list) const { + return api_->create_tam_collector( + rawSaiId(id), switch_id, count, attr_list); + } + + sai_status_t _remove(TamCollectorSaiId id) const { + return api_->remove_tam_collector(id); + } + + sai_status_t _getAttribute(TamCollectorSaiId id, sai_attribute_t* attr) + const { + return api_->get_tam_collector_attribute(id, 1, attr); + } + + sai_status_t _setAttribute(TamCollectorSaiId id, const sai_attribute_t* attr) + const { + return api_->set_tam_collector_attribute(id, attr); + } + sai_tam_api_t* api_; friend class SaiApi; }; } // namespace facebook::fboss + +namespace std { + +template <> +struct hash { + size_t operator()( + const facebook::fboss::SaiTamTransportTraits::Attributes::SrcMacAddress& + key) const { + return std::hash()(key.value()); + } +}; + +template <> +struct hash { + size_t operator()( + const facebook::fboss::SaiTamTransportTraits::Attributes::DstMacAddress& + key) const { + return std::hash()(key.value()); + } +}; + +} // namespace std diff --git a/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h b/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h new file mode 100644 index 0000000000000..a27844c30b91f --- /dev/null +++ b/fboss/agent/hw/sai/api/TamEventAgingGroupApi.h @@ -0,0 +1,98 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#pragma once + +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + +#include "fboss/agent/hw/sai/api/SaiApi.h" +#include "fboss/agent/hw/sai/api/SaiAttribute.h" +#include "fboss/agent/hw/sai/api/SaiAttributeDataTypes.h" +#include "fboss/agent/hw/sai/api/SaiVersion.h" +#include "fboss/agent/hw/sai/api/Types.h" + +extern "C" { +#include +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} + +namespace facebook::fboss { + +class TamEventAgingGroupApi; + +struct SaiTamEventAgingGroupTraits { + // IMPORTANT: Cast to sai_object_type_t so that all our infrastructure works. + static constexpr sai_object_type_t ObjectType = + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP); + + using SaiApiT = TamEventAgingGroupApi; + struct Attributes { + using EnumType = sai_tam_event_aging_group_attr_t; + using Type = SaiAttribute< + EnumType, + SAI_TAM_EVENT_AGING_GROUP_ATTR_TYPE, + sai_int32_t>; + using AgingTime = SaiAttribute< + EnumType, + SAI_TAM_EVENT_AGING_GROUP_ATTR_AGING_TIME, + sai_uint16_t>; // in microseconds + }; + using AdapterKey = TamEventAgingGroupSaiId; + using AdapterHostKey = std::tuple; + using CreateAttributes = AdapterHostKey; +}; +// Workaround for CS00012373477: sai_get_object_count() INVALID_PARAMETER +template <> +struct GetObjectKeySupported : std::false_type {}; + +SAI_ATTRIBUTE_NAME(TamEventAgingGroup, Type) +SAI_ATTRIBUTE_NAME(TamEventAgingGroup, AgingTime) + +class TamEventAgingGroupApi : public SaiApi { + public: + static constexpr sai_api_t ApiType = + static_cast(SAI_API_TAM_EVENT_AGING_GROUP); + TamEventAgingGroupApi() { + sai_status_t status = + sai_api_query(ApiType, reinterpret_cast(&api_)); + saiApiCheckError( + status, ApiType, "Failed to query for TAM event aging group api"); + } + + private: + // TAM Event Aging Group + sai_status_t _create( + TamEventAgingGroupSaiId* id, + sai_object_id_t switch_id, + size_t count, + sai_attribute_t* attr_list) const { + return api_->create_tam_event_aging_group( + rawSaiId(id), switch_id, count, attr_list); + } + + sai_status_t _remove(TamEventAgingGroupSaiId id) const { + return api_->remove_tam_event_aging_group(id); + } + + sai_status_t _getAttribute(TamEventAgingGroupSaiId id, sai_attribute_t* attr) + const { + return api_->get_tam_event_aging_group_attribute(id, 1, attr); + } + + sai_status_t _setAttribute( + TamEventAgingGroupSaiId id, + const sai_attribute_t* attr) const { + return api_->set_tam_event_aging_group_attribute(id, attr); + } + + sai_tam_event_aging_group_api_t* api_; + friend class SaiApi; +}; + +} // namespace facebook::fboss + +#endif diff --git a/fboss/agent/hw/sai/api/Traits.h b/fboss/agent/hw/sai/api/Traits.h index 5f15befc7eb72..ff5dfea9ef260 100644 --- a/fboss/agent/hw/sai/api/Traits.h +++ b/fboss/agent/hw/sai/api/Traits.h @@ -174,7 +174,7 @@ class AclEntryField { public: AclEntryField(){}; AclEntryField(T dataAndMask) : dataAndMask_(dataAndMask) {} - T getDataAndMask() const { + const T& getDataAndMask() const { return dataAndMask_; } @@ -183,8 +183,30 @@ class AclEntryField { } std::string str() const { - return folly::to( - "data: ", dataAndMask_.first, " mask: ", dataAndMask_.second); + if constexpr ( + std::is_same_v< + T, + std::pair, std::vector>>) { + std::ostringstream retStr; + + if (!dataAndMask_.first.empty()) { + retStr << "data: "; + std::copy( + dataAndMask_.first.begin(), + dataAndMask_.first.end(), + std::ostream_iterator(retStr, ", ")); + retStr << "mask: "; + std::copy( + dataAndMask_.second.begin(), + dataAndMask_.second.end(), + std::ostream_iterator(retStr, ", ")); + } + + return retStr.str(); + } else { + return folly::to( + "data: ", dataAndMask_.first, " mask: ", dataAndMask_.second); + } } private: @@ -232,6 +254,8 @@ using AclEntryFieldIpV4 = AclEntryField>; using AclEntryFieldMac = AclEntryField>; +using AclEntryFieldU8List = AclEntryField< + std::pair, std::vector>>; /* * Mask is not needed for sai_object_id_t Acl Entry field. diff --git a/fboss/agent/hw/sai/api/Types.h b/fboss/agent/hw/sai/api/Types.h index 17276b7524311..e8cc9456dde73 100644 --- a/fboss/agent/hw/sai/api/Types.h +++ b/fboss/agent/hw/sai/api/Types.h @@ -58,8 +58,11 @@ FBOSS_STRONG_TYPE(sai_object_id_t, VirtualRouterSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, VlanSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, VlanMemberSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, WredSaiId); +FBOSS_STRONG_TYPE(sai_object_id_t, TamCollectorSaiId); +FBOSS_STRONG_TYPE(sai_object_id_t, TamTransportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamReportSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventActionSaiId); +FBOSS_STRONG_TYPE(sai_object_id_t, TamEventAgingGroupSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamEventSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TamSaiId); FBOSS_STRONG_TYPE(sai_object_id_t, TunnelSaiId); diff --git a/fboss/agent/hw/sai/api/UdfApi.h b/fboss/agent/hw/sai/api/UdfApi.h index 634a2521eb2ee..bf80454cc8804 100644 --- a/fboss/agent/hw/sai/api/UdfApi.h +++ b/fboss/agent/hw/sai/api/UdfApi.h @@ -101,7 +101,9 @@ struct SaiUdfGroupTraits { using AdapterKey = UdfGroupSaiId; using CreateAttributes = std::tuple, Attributes::Length>; - using AdapterHostKey = CreateAttributes; + // there can more than 1 UDF group with same type and length + // Use name from switchState as adapterHostKey + using AdapterHostKey = std::string; }; SAI_ATTRIBUTE_NAME(UdfGroup, Type); diff --git a/fboss/agent/hw/sai/api/api.bzl b/fboss/agent/hw/sai/api/api.bzl deleted file mode 100644 index 007f387da38f1..0000000000000 --- a/fboss/agent/hw/sai/api/api.bzl +++ /dev/null @@ -1,151 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_impl_lib_name", "to_impl_suffix", "to_versions") - -# The SAI API library depends on a specific SAI Adapter's implementation -# of SAI for the definitions of symbols declared in the header only "sai" -# library. We can try to make the whole implementation of sai api and sai -# switch a huge header only library, but it seems preferable to solve this -# in TARGETS and parameterize building the library by the library that provides -# the crucial sai symbols. - -common_srcs = [ - "AddressUtil.cpp", - "FdbApi.cpp", - "HashApi.cpp", - "LoggingUtil.cpp", - "MplsApi.cpp", - "NeighborApi.cpp", - "NextHopGroupApi.cpp", - "PortApi.cpp", - "QosMapApi.cpp", - "RouteApi.cpp", - "SaiApiLock.cpp", - "SaiApiTable.cpp", - "SwitchApi.cpp", - "SystemPortApi.cpp", - "Types.cpp", -] - -fake_srcs = common_srcs + [ - "fake/FakeSaiExtensions.cpp", -] - -brcm_srcs = common_srcs + [ - "bcm/DebugCounterApi.cpp", - "bcm/PortApi.cpp", - "bcm/SwitchApi.cpp", - "bcm/TamApi.cpp", - "bcm/BufferApi.cpp", - "bcm/QueueApi.cpp", -] - -tajo_srcs = common_srcs + [ - "tajo/DebugCounterApi.cpp", - "tajo/PortApi.cpp", - "tajo/TamApi.cpp", - "tajo/SwitchApi.cpp", - "tajo/BufferApi.cpp", - "tajo/QueueApi.cpp", -] - -credo_srcs = common_srcs + [ - "oss/DebugCounterApi.cpp", - "oss/PortApi.cpp", - "oss/SwitchApi.cpp", - "oss/TamApi.cpp", - "oss/BufferApi.cpp", - "oss/QueueApi.cpp", -] - -common_headers = [ - "AclApi.h", - "AdapterKeySerializers.h", - "ArsApi.h", - "ArsProfileApi.h", - "BridgeApi.h", - "BufferApi.h", - "CounterApi.h", - "DebugCounterApi.h", - "FdbApi.h", - "HashApi.h", - "HostifApi.h", - "LagApi.h", - "MacsecApi.h", - "MirrorApi.h", - "MplsApi.h", - "NextHopApi.h", - "NextHopGroupApi.h", - "PortApi.h", - "QueueApi.h", - "RouteApi.h", - "RouterInterfaceApi.h", - "SaiApi.h", - "SaiApiError.h", - "SaiAttribute.h", - "SaiAttributeDataTypes.h", - "SaiDefaultAttributeValues.h", - "SaiObjectApi.h", - "SaiVersion.h", - "SamplePacketApi.h", - "SchedulerApi.h", - "SwitchApi.h", - "TamApi.h", - "Traits.h", - "TunnelApi.h", - "Types.h", - "UdfApi.h", - "VirtualRouterApi.h", - "VlanApi.h", - "WredApi.h", -] - -common_deps = [ - "fbsource//third-party/fmt:fmt", - "//fboss/agent:constants", - "//fboss/agent:fboss-error", - "//fboss/agent:fboss-types", - "//fboss/lib:hw_write_behavior", - "//fboss/lib:function_call_time_reporter", - "//fboss/lib:tuple_utils", - "//folly:format", - "//folly:network_address", - "//folly:singleton", - "//folly/logging:logging", -] - -common_external_deps = [ - ("boost", None), - ("boost", None, "boost_variant"), -] - -def sai_api_libs(): - all_api_libs = [] - api_srcs = { - "brcm": brcm_srcs, - "credo": credo_srcs, - "fake": fake_srcs, - "leaba": tajo_srcs, - } - for sai_impl in SAI_IMPLS: - deps = common_deps + [ - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ] - major, minor, release = sai_impl.sai_version.split(".") - pp_flags = [ - "-DSAI_API_VERSION=(100000 * ({}) + 1000 * ({}) + ({}))".format(major, minor, release), - ] - - impl_suffix = to_impl_suffix(sai_impl) - all_api_libs.extend([cpp_library( - name = "sai_api{}".format(impl_suffix), - propagated_pp_flags = pp_flags, - srcs = api_srcs.get(sai_impl.name), - auto_headers = AutoHeaders.SOURCES, - headers = common_headers, - exported_deps = deps, - exported_external_deps = common_external_deps, - versions = to_versions(sai_impl), - )]) - - return all_api_libs diff --git a/fboss/agent/hw/sai/api/bcm/BufferApi.cpp b/fboss/agent/hw/sai/api/bcm/BufferApi.cpp index bc35a2e8185a0..32aa79ee7616d 100644 --- a/fboss/agent/hw/sai/api/bcm/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/BufferApi.cpp @@ -22,4 +22,44 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { #endif } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_BUFFER_PROFILE_ATTR_SHARED_FADT_MIN_TH; +#else + return std::nullopt; +#endif +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_MIN_TH; +#else + return std::nullopt; +#endif +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_MAX_TH; +#else + return std::nullopt; +#endif +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_BUFFER_PROFILE_ATTR_SRAM_FADT_XON_OFFSET; +#else + return std::nullopt; +#endif +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp b/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp new file mode 100644 index 0000000000000..3b06c27e2abbf --- /dev/null +++ b/fboss/agent/hw/sai/api/bcm/MirrorApi.cpp @@ -0,0 +1,29 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/MirrorApi.h" + +// TODO: Add support for 12.0 as well +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) +extern "C" { + +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} +#endif + +namespace facebook::fboss { + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { +// TODO: Add support for 12.0 as well +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_MIRROR_SESSION_ATTR_TC_BUFFER_LIMIT; +#else + return std::nullopt; +#endif +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/bcm/PortApi.cpp b/fboss/agent/hw/sai/api/bcm/PortApi.cpp index d7d5908c7a8f0..b2dcccffa822c 100644 --- a/fboss/agent/hw/sai/api/bcm/PortApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/PortApi.cpp @@ -112,4 +112,161 @@ SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { return std::nullopt; #endif } + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_PORT_ATTR_COND_ENTROPY_REHASH_ENABLE; +#else + return std::nullopt; +#endif +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + // TODO: Fix this properly as SAI_PORT_ATTR_COND_ENTROPY_REHASH_PERIOD_US + // port extension attribute is removed and no longer supported. + // This is just a workaround to integrate BRCM SAI 11.7 GA + return std::nullopt; +#else + return std::nullopt; +#endif +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_PORT_ATTR_COND_ENTROPY_REHASH_SEED; +#else + return std::nullopt; +#endif +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp index 733ca496e7f40..2317473220db3 100644 --- a/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/SwitchApi.cpp @@ -72,6 +72,26 @@ SaiSwitchTraits::Attributes::AttributeSdkBootTimeWrapper::operator()() { return SAI_SWITCH_ATTR_CUSTOM_RANGE_START + 1; } +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH; +#else + return std::nullopt; +#endif +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH; +#else + return std::nullopt; +#endif +} + const std::vector& SaiSwitchTraits::dramStats() { #if defined(BRCM_SAI_SDK_DNX) static const std::vector stats{ @@ -152,13 +172,14 @@ void SwitchApi::registerSwitchEventCallback( // Register switch events #if defined BRCM_SAI_SDK_GTE_11_0 - std::array events = { + std::array events = { SAI_SWITCH_EVENT_TYPE_PARITY_ERROR, SAI_SWITCH_EVENT_TYPE_STABLE_FULL, SAI_SWITCH_EVENT_TYPE_STABLE_ERROR, SAI_SWITCH_EVENT_TYPE_UNCONTROLLED_SHUTDOWN, SAI_SWITCH_EVENT_TYPE_WARM_BOOT_DOWNGRADE, - SAI_SWITCH_EVENT_TYPE_INTERRUPT}; + SAI_SWITCH_EVENT_TYPE_INTERRUPT, + SAI_SWITCH_EVENT_TYPE_FABRIC_AUTO_ISOLATE}; #else std::array events = { SAI_SWITCH_EVENT_TYPE_PARITY_ERROR, @@ -295,4 +316,22 @@ SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { #endif return std::nullopt; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { +#if defined(BRCM_SAI_SDK_DNX) && defined(BRCM_SAI_SDK_GTE_12_0) + return SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD; +#endif + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { +#if defined(BRCM_SAI_SDK_GTE_11_0) + return SAI_SWITCH_ATTR_NO_ACLS_FOR_TRAPS; +#else + return std::nullopt; +#endif +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/bcm/TamApi.cpp b/fboss/agent/hw/sai/api/bcm/TamApi.cpp index 2fca285c2f203..d25a93b568587 100644 --- a/fboss/agent/hw/sai/api/bcm/TamApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/TamApi.cpp @@ -2,7 +2,6 @@ #include "fboss/agent/hw/sai/api/TamApi.h" -#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) extern "C" { #ifndef IS_OSS_BRCM_SAI #include @@ -10,26 +9,62 @@ extern "C" { #include #endif } -#endif namespace facebook::fboss { std::optional SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { -#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) - return SAI_TAM_EVENT_ATTR_SWITCH_EVENT_TYPE; -#else return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_TAM_EVENT_ATTR_DEVICE_ID; #endif + return std::nullopt; } std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { -#if !defined(BRCM_SAI_SDK_XGS_AND_DNX) +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) return SAI_TAM_EVENT_ATTR_EVENT_ID; -#else +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_TAM_EVENT_ATTR_EXTENSIONS_COLLECTOR_LIST; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_TAM_EVENT_ATTR_PACKET_DROP_TYPE_MMU; +#endif return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + return SAI_TAM_EVENT_ATTR_AGING_GROUP; #endif + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_SRC_MAC_ADDRESS; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_DST_MAC_ADDRESS; } } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index d1f0e12a87518..0cdffb0310a68 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -2,6 +2,7 @@ #include "fboss/agent/hw/sai/api/BufferApi.h" #include "fboss/agent/hw/sai/api/DebugCounterApi.h" +#include "fboss/agent/hw/sai/api/MirrorApi.h" #include "fboss/agent/hw/sai/api/PortApi.h" #include "fboss/agent/hw/sai/api/QueueApi.h" #include "fboss/agent/hw/sai/api/SwitchApi.h" @@ -53,11 +54,41 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS; +} + std::optional SaiSwitchTraits::Attributes::AttributeAclFieldListWrapper::operator()() { return SAI_SWITCH_ATTR_EXT_FAKE_ACL_FIELD_LIST; @@ -186,6 +217,36 @@ std::optional SaiSwitchTraits::Attributes:: return std::nullopt; } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { + return std::nullopt; +} + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { + return std::nullopt; +} + +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; @@ -256,4 +317,159 @@ std::optional SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { return SAI_SWITCH_ATTR_REACHABILITY_GROUP_LIST; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { + return SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { + return SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + return SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index 8123c80561e06..1b29e78d8cbf8 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -20,6 +20,31 @@ typedef enum _sai_port_serdes_extensions_attr_t { SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_TABLE_START_ROW, SAI_PORT_SERDES_ATTR_EXT_RX_PARITY_ENCODER_EN, SAI_PORT_SERDES_ATTR_EXT_RX_THP_EN, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN, + SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_EN, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_STEP_COARSE_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_STEP_FINE_OV_VAL, + SAI_PORT_SERDES_ATTR_EXT_RX_DCW_OV_EN, + SAI_PORT_SERDES_ATTR_EXT_TX_PARITY_ENCODER_EN, + SAI_PORT_SERDES_ATTR_EXT_TX_THP_EN, + SAI_PORT_SERDES_ATTR_EXT_TX_LUT_MODE, SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN, SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN, SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0, @@ -27,9 +52,7 @@ typedef enum _sai_port_serdes_extensions_attr_t { SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2, SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3, SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4, - SAI_PORT_SERDES_ATTR_EXT_TX_PARITY_ENCODER_EN, - SAI_PORT_SERDES_ATTR_EXT_TX_THP_EN, - SAI_PORT_SERDES_ATTR_EXT_TX_LUT_MODE, + SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING } sai_port_serdes_extensions_attr_t; typedef enum _sai_switch_extensions_attr_t { @@ -50,11 +73,20 @@ typedef enum _sai_switch_extensions_attr_t { SAI_SWITCH_ATTR_VOQ_LATENCY_MIN_LEVEL_2, SAI_SWITCH_ATTR_VOQ_LATENCY_MAX_LEVEL_2, SAI_SWITCH_ATTR_REACHABILITY_GROUP_LIST, + SAI_SWITCH_ATTR_FABRIC_LLFC_THRESHOLD, + SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XOFF_TH, + SAI_SWITCH_ATTR_SRAM_FREE_PERCENT_XON_TH, } sai_switch_extensions_attr_t; typedef enum _sai_tam_event_extensions_attr_t { SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE = SAI_TAM_EVENT_ATTR_END, + SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID, SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID, + SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST, + SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU, + SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP, + SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS = SAI_TAM_TRANSPORT_ATTR_END, + SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS, } sai_tam_event_extensions_attr_t; typedef enum _sai_port_extensions_attr_t { diff --git a/fboss/agent/hw/sai/api/oss/BufferApi.cpp b/fboss/agent/hw/sai/api/oss/BufferApi.cpp index 5aeb313135b2c..0e2682dd7f447 100644 --- a/fboss/agent/hw/sai/api/oss/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/oss/BufferApi.cpp @@ -9,4 +9,24 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { return std::nullopt; } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/oss/MirrorApi.cpp b/fboss/agent/hw/sai/api/oss/MirrorApi.cpp new file mode 100644 index 0000000000000..923ba68da9566 --- /dev/null +++ b/fboss/agent/hw/sai/api/oss/MirrorApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/MirrorApi.h" + +namespace facebook::fboss { + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { + return std::nullopt; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/oss/PortApi.cpp b/fboss/agent/hw/sai/api/oss/PortApi.cpp index cb942624d1db9..769eba114bff1 100644 --- a/fboss/agent/hw/sai/api/oss/PortApi.cpp +++ b/fboss/agent/hw/sai/api/oss/PortApi.cpp @@ -68,4 +68,143 @@ std::optional SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { return std::nullopt; } + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + return std::nullopt; +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + return std::nullopt; +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + return std::nullopt; +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + return std::nullopt; +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp index b63773b352d0b..7bbcd6bf8fe8f 100644 --- a/fboss/agent/hw/sai/api/oss/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/oss/SwitchApi.cpp @@ -88,6 +88,11 @@ std::optional SaiSwitchTraits::Attributes:: return std::nullopt; } +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; @@ -157,4 +162,20 @@ std::optional SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { return std::nullopt; } + +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/oss/TamApi.cpp b/fboss/agent/hw/sai/api/oss/TamApi.cpp index 695754203903c..d3e406f73d2cc 100644 --- a/fboss/agent/hw/sai/api/oss/TamApi.cpp +++ b/fboss/agent/hw/sai/api/oss/TamApi.cpp @@ -9,9 +9,39 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/BufferApi.cpp b/fboss/agent/hw/sai/api/tajo/BufferApi.cpp index 5aeb313135b2c..0e2682dd7f447 100644 --- a/fboss/agent/hw/sai/api/tajo/BufferApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/BufferApi.cpp @@ -9,4 +9,24 @@ SaiBufferProfileTraits::Attributes::AttributeSharedFadtMaxTh::operator()() { return std::nullopt; } +std::optional +SaiBufferProfileTraits::Attributes::AttributeSharedFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMinTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtMaxTh::operator()() { + return std::nullopt; +} + +std::optional +SaiBufferProfileTraits::Attributes::AttributeSramFadtXonOffset::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/MirrorApi.cpp b/fboss/agent/hw/sai/api/tajo/MirrorApi.cpp new file mode 100644 index 0000000000000..923ba68da9566 --- /dev/null +++ b/fboss/agent/hw/sai/api/tajo/MirrorApi.cpp @@ -0,0 +1,12 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/api/MirrorApi.h" + +namespace facebook::fboss { + +std::optional +SaiSflowMirrorTraits::Attributes::AttributeTcBufferLimit::operator()() { + return std::nullopt; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/PortApi.cpp b/fboss/agent/hw/sai/api/tajo/PortApi.cpp index e9a62eada3fef..28e50027cdc91 100644 --- a/fboss/agent/hw/sai/api/tajo/PortApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/PortApi.cpp @@ -8,6 +8,12 @@ extern "C" { #include } +#if defined(TAJO_SDK_GTE_24_4_90) +#define RETURN_SUPPORTED_ATTR(attr) return (attr); +#else +#define RETURN_SUPPORTED_ATTR(attr) return std::nullopt; +#endif + namespace facebook::fboss { std::optional SaiPortSerdesTraits::Attributes::AttributeTxLutModeIdWrapper::operator()() { @@ -72,4 +78,147 @@ std::optional SaiPortTraits::Attributes::AttributeReachabilityGroup::operator()() { return std::nullopt; } + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDiffEncoderEnWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDigGainWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff0Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff1Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff2Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff3Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxFfeCoeff4Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4); +} + +std::optional +SaiPortSerdesTraits::Attributes::AttributeTxDriverSwingWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StartWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StepWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost1StopWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStartWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStepWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgBoost2OrHrStopWrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Start1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Step1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgC1Stop1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStart1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStep1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgDfeStop1p7Wrapper::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7); +} + +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxEnableScanSelectionWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxInstgScanUseSrSettingsWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS); +} +std::optional +SaiPortSerdesTraits::Attributes::AttributeRxCdrCfgOvEnWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet1stOrdStepOvValWrapper ::operator()() { + RETURN_SUPPORTED_ATTR( + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdet2ndOrdStepOvValWrapper ::operator()() { + RETURN_SUPPORTED_ATTR( + SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL); +} +std::optional SaiPortSerdesTraits::Attributes:: + AttributeRxCdrTdetFineStepOvValWrapper ::operator()() { + RETURN_SUPPORTED_ATTR(SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL); +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashEnable::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashPeriodUS::operator()() { + return std::nullopt; +} + +std::optional +SaiPortTraits::Attributes::AttributeCondEntropyRehashSeed::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp index 2865254e1189e..7675d7812fcb5 100644 --- a/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/SwitchApi.cpp @@ -110,6 +110,11 @@ std::optional SaiSwitchTraits::Attributes:: return std::nullopt; } +std::optional +SaiSwitchTraits::Attributes::AttributeNoAclsForTrapsWrapper::operator()() { + return std::nullopt; +} + const std::vector& SaiSwitchTraits::dramStats() { static const std::vector stats; return stats; @@ -179,4 +184,18 @@ std::optional SaiSwitchTraits::Attributes::AttributeReachabilityGroupList::operator()() { return std::nullopt; } +std::optional SaiSwitchTraits::Attributes:: + AttributeFabricLinkLayerFlowControlThreshold::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXoffThWrapper::operator()() { + return std::nullopt; +} + +std::optional SaiSwitchTraits::Attributes:: + AttributeSramFreePercentXonThWrapper::operator()() { + return std::nullopt; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tajo/TamApi.cpp b/fboss/agent/hw/sai/api/tajo/TamApi.cpp index c9f672464149a..d72d802183b02 100644 --- a/fboss/agent/hw/sai/api/tajo/TamApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/TamApi.cpp @@ -13,9 +13,39 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return SAI_TAM_EVENT_ATTR_SWITCH_EVENT_TYPE; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { + return std::nullopt; +} + +std::optional +SaiTamTransportTraits::Attributes::AttributeDstMacAddress::operator()() { + return std::nullopt; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp b/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp index 8564aee4cbc19..2d096c26e66c9 100644 --- a/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/BufferApiTest.cpp @@ -54,6 +54,8 @@ class BufferApiTest : public ::testing::Test { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynamicThresh{ 24}; + std::optional + staticThresh; SaiBufferProfileTraits::Attributes::XoffTh xoffTh{0}; SaiBufferProfileTraits::Attributes::XonTh xonTh{0}; SaiBufferProfileTraits::Attributes::XonOffsetTh xonOffsetTh{0}; @@ -66,9 +68,14 @@ class BufferApiTest : public ::testing::Test { reservedBytes, mode, dynamicThresh, + staticThresh, xoffTh, xonTh, xonOffsetTh, + std::nullopt, + std::nullopt, + std::nullopt, + std::nullopt, std::nullopt}; return bufferApi->create(c, 0); } diff --git a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp index 79435c38ce5f5..eea55e665d8f5 100644 --- a/fboss/agent/hw/sai/api/tests/PortApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/PortApiTest.cpp @@ -41,6 +41,7 @@ class PortApiTest : public ::testing::Test { #endif std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, + std::nullopt, // TAM object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet @@ -78,6 +79,9 @@ class PortApiTest : public ::testing::Test { std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; return portApi->create(a, 0); } @@ -110,7 +114,34 @@ class PortApiTest : public ::testing::Test { rxDspMode, rxAfeTrim, rxAcCouplingByPass, - rxAfeAdaptiveEnable}; + rxAfeAdaptiveEnable, + std::nullopt, // txDiffEncoderEn + std::nullopt, // txDigGain + std::nullopt, // txFfeCoeff0 + std::nullopt, // txFfeCoeff1 + std::nullopt, // txFfeCoeff2 + std::nullopt, // txFfeCoeff3 + std::nullopt, // txFfeCoeff4 + std::nullopt, // txDriverSwing + std::nullopt, // rxInstgBoost1Start + std::nullopt, // rxInstgBoost1Step + std::nullopt, // rxInstgBoost1Stop + std::nullopt, // rxInstgBoost2OrHrStart + std::nullopt, // rxInstgBoost2OrHrStep + std::nullopt, // rxInstgBoost2OrHrStop + std::nullopt, // rxInstgC1Start1p7 + std::nullopt, // rxInstgC1Step1p7 + std::nullopt, // rxInstgC1Stop1p7 + std::nullopt, // rxInstgDfeStart1p7 + std::nullopt, // rxInstgDfeStep1p7 + std::nullopt, // rxInstgDfeStop1p7 + std::nullopt, // rxEnableScanSelection + std::nullopt, // rxInstgScanUseSrSettings + std::nullopt, // rxCdrCfgOvEn + std::nullopt, // rxCdrTdet1stOrdStepOvVal + std::nullopt, // rxCdrTdet2ndOrdStepOvVal + std::nullopt, // rxCdrTdetFineStepOvVal + }; return portApi->create(a, 0 /*switch id*/); } diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index d4a0a54fb52d3..a8f75303da3b1 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -1,13 +1,13 @@ // Copyright 2004-present Facebook. All Rights Reserved. -#include "fboss/agent/hw/sai/api/TamApi.h" -#include "fboss/agent/hw/sai/api/SaiObjectApi.h" -#include "fboss/agent/hw/sai/fake/FakeSai.h" - +#include #include - #include +#include "fboss/agent/hw/sai/api/SaiObjectApi.h" +#include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/fake/FakeSai.h" + using namespace facebook::fboss; class TamApiTest : public ::testing::Test { @@ -24,6 +24,87 @@ class TamApiTest : public ::testing::Test { std::unique_ptr tamApi; }; +TEST_F(TamApiTest, TamCollectorV4) { + folly::IPAddress srcIp{"1.1.1.1"}; + folly::IPAddress dstIp{"2.2.2.2"}; + sai_object_id_t transportSaiObjectId = 100; + + SaiTamCollectorTraits::CreateAttributes collectorAttr; + std::get(collectorAttr) = srcIp; + std::get(collectorAttr) = dstIp; + std::get>( + collectorAttr) = 128; + std::get(collectorAttr) = + transportSaiObjectId; + std::get>( + collectorAttr) = 0; + + auto collectorSaiId = + tamApi->create(collectorAttr, switchId); + EXPECT_EQ( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + collectorAttr); + tamApi->remove(collectorSaiId); + EXPECT_THROW( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + std::exception); +} + +TEST_F(TamApiTest, TamCollectorV6) { + folly::IPAddress srcIp{"2401::1"}; + folly::IPAddress dstIp{"2401::2"}; + sai_object_id_t transportSaiObjectId = 100; + + SaiTamCollectorTraits::CreateAttributes collectorAttr; + std::get(collectorAttr) = srcIp; + std::get(collectorAttr) = dstIp; + std::get>( + collectorAttr) = 128; + std::get(collectorAttr) = + transportSaiObjectId; + std::get>( + collectorAttr) = 0; + + auto collectorSaiId = + tamApi->create(collectorAttr, switchId); + EXPECT_EQ( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + collectorAttr); + tamApi->remove(collectorSaiId); + EXPECT_THROW( + tamApi->getAttribute( + collectorSaiId, SaiTamCollectorTraits::CreateAttributes{}), + std::exception); +} + +TEST_F(TamApiTest, TamTransport) { + SaiTamTransportTraits::CreateAttributes transportAttr; + std::get(transportAttr) = + SAI_TAM_TRANSPORT_TYPE_UDP; + std::get(transportAttr) = 10001; + std::get(transportAttr) = 10002; + std::get(transportAttr) = 1500; + std::get>( + transportAttr) = folly::MacAddress("00:00:00:00:00:01"); + std::get>( + transportAttr) = folly::MacAddress("00:00:00:00:00:02"); + + auto transportSaiId = + tamApi->create(transportAttr, switchId); + EXPECT_EQ( + tamApi->getAttribute( + transportSaiId, SaiTamTransportTraits::CreateAttributes{}), + transportAttr); + tamApi->remove(transportSaiId); + EXPECT_THROW( + tamApi->getAttribute( + transportSaiId, SaiTamTransportTraits::CreateAttributes{}), + std::exception); +} + TEST_F(TamApiTest, TamReport) { SaiTamReportTraits::CreateAttributes reportAttr; // for call back @@ -61,14 +142,31 @@ TEST_F(TamApiTest, TamEvent) { std::vector eventCollectors{SAI_NULL_OBJECT_ID}; std::vector eventTypes{1, 2, 3, 4}; // parity error e.g. + sai_int32_t deviceId = 0; + sai_int32_t eventId = 1; + std::vector extensionsCollectorList{10}; + std::vector packetDropTypeMmu = {3, 4}; + sai_object_id_t agingGroup = 20; + SaiTamEventTraits::CreateAttributes eventAttr; std::get(eventAttr) = SAI_TAM_EVENT_TYPE_PACKET_DROP; // type of Event std::get(eventAttr) = eventActions; std::get(eventAttr) = eventCollectors; - std::get(eventAttr) = - eventTypes; + std::get>( + eventAttr) = eventTypes; + std::get>(eventAttr) = + deviceId; + std::get>( + eventAttr) = eventId; + std::get< + std::optional>( + eventAttr) = extensionsCollectorList; + std::get>( + eventAttr) = packetDropTypeMmu; + std::get>( + eventAttr) = agingGroup; auto eventSaiId = tamApi->create(eventAttr, switchId); EXPECT_EQ( diff --git a/fboss/agent/hw/sai/api/tests/api_test.bzl b/fboss/agent/hw/sai/api/tests/api_test.bzl deleted file mode 100644 index 7f55c81969db8..0000000000000 --- a/fboss/agent/hw/sai/api/tests/api_test.bzl +++ /dev/null @@ -1,18 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_FAKE_IMPLS", "to_impl_lib_name", "to_impl_suffix") - -def api_unittest(name, srcs, deps = None, supports_static_listing = True): - if deps == None: - deps = [] - for sai_impl in SAI_FAKE_IMPLS: - api_suffix = to_impl_suffix(sai_impl) - cpp_unittest( - name = "{}-{}".format(name, sai_impl.name), - srcs = srcs, - supports_static_listing = supports_static_listing, - deps = [ - "fbsource//third-party/googletest:gtest", - "//fboss/agent/hw/sai/api:sai_api{}".format(api_suffix), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ] + deps, - ) diff --git a/fboss/agent/hw/sai/benchmarks/BUCK b/fboss/agent/hw/sai/benchmarks/BUCK index 499c863a7a7ec..05b0fe97fa3e4 100644 --- a/fboss/agent/hw/sai/benchmarks/BUCK +++ b/fboss/agent/hw/sai/benchmarks/BUCK @@ -37,6 +37,7 @@ sai_mono_agent_benchmark( "//fboss/agent/hw/benchmarks:hw_tx_slow_path_rate", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_add_speed", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_del_speed", + "//fboss/agent/hw/benchmarks:hw_voq_sys_port_programming", "//fboss/agent/test:route_scale_gen", ], ) @@ -61,6 +62,7 @@ sai_multi_switch_agent_benchmark( "//fboss/agent/hw/benchmarks:hw_tx_slow_path_rate", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_add_speed", "//fboss/agent/hw/benchmarks:hw_voq_scale_route_del_speed", + "//fboss/agent/hw/benchmarks:hw_voq_sys_port_programming", "//fboss/agent/test:route_scale_gen", ], ) diff --git a/fboss/agent/hw/sai/benchmarks/benchmarks.bzl b/fboss/agent/hw/sai/benchmarks/benchmarks.bzl deleted file mode 100644 index 3eb2208a918d4..0000000000000 --- a/fboss/agent/hw/sai/benchmarks/benchmarks.bzl +++ /dev/null @@ -1,56 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -def _mono_sai_agent_benchmark_binary(name, srcs, sai_impl, **kwargs): - impl_suffix = to_impl_suffix(sai_impl) - name = "{}-{}-{}".format(name, sai_impl.name, sai_impl.version) - main_name = "mono_sai_agent_benchmarks_main" - sai_agent_benchmarks_main = sai_switch_dependent_name(main_name, sai_impl, True) - agent_hw_test_thrift_handler = sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True) - deps = list(kwargs.get("deps", [])) - deps += [ - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:sai_acl_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_copp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_packet_trap_helper{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_port_utils{}".format(impl_suffix), - "//fboss/agent/benchmarks:{}".format(sai_agent_benchmarks_main), - "//fboss/agent/hw/sai/hw_test:{}".format(agent_hw_test_thrift_handler), - "//fboss/agent/test:linkstate_toggler", - ] - kwargs["deps"] = deps - return cpp_binary( - name = name, - srcs = srcs, - versions = to_versions(sai_impl), - **kwargs - ) - -def _multi_switch_agent_benchmark_binary(name, srcs, **kwargs): - name = "multi_switch-{}".format(name) - main_name = "multi_switch_sai_agent_benchmarks_main" - sai_agent_benchmarks_main = main_name - deps = list(kwargs.get("deps", [])) - deps += [ - "//fboss/agent/benchmarks:{}".format(sai_agent_benchmarks_main), - "//fboss/agent/test:linkstate_toggler", - ] - kwargs["deps"] = deps - return cpp_binary( - name = name, - srcs = srcs, - **kwargs - ) - -def sai_mono_agent_benchmark(name, srcs, **kwargs): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - if sai_impl.name == "fake": - continue - _mono_sai_agent_benchmark_binary(name, srcs, sai_impl, **kwargs) - -def sai_multi_switch_agent_benchmark(name, srcs, **kwargs): - _multi_switch_agent_benchmark_binary(name, srcs, **kwargs) diff --git a/fboss/agent/hw/sai/diag/DiagShell.cpp b/fboss/agent/hw/sai/diag/DiagShell.cpp index d272c6ac9f72b..e4ed57eb74dc1 100644 --- a/fboss/agent/hw/sai/diag/DiagShell.cpp +++ b/fboss/agent/hw/sai/diag/DiagShell.cpp @@ -163,6 +163,7 @@ std::unique_ptr DiagShell::makeRepl() const { case PlatformType::PLATFORM_DARWIN: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: @@ -188,6 +189,8 @@ std::unique_ptr DiagShell::makeRepl() const { case PlatformType::PLATFORM_FAKE_WEDGE40: case PlatformType::PLATFORM_FAKE_SAI: throw FbossError("Shell not supported for fake platforms"); + case PlatformType::PLATFORM_YANGRA: + throw FbossError("Shell still not supported for Yangra platforms"); } CHECK(0) << " Should never get here"; return nullptr; @@ -395,6 +398,7 @@ std::string DiagCmdServer::getDelimiterDiagCmd(const std::string& UUID) const { case PlatformType::PLATFORM_DARWIN: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: @@ -420,6 +424,8 @@ std::string DiagCmdServer::getDelimiterDiagCmd(const std::string& UUID) const { case PlatformType::PLATFORM_FAKE_WEDGE40: case PlatformType::PLATFORM_FAKE_SAI: throw FbossError("Shell not supported for fake platforms"); + case PlatformType::PLATFORM_YANGRA: + throw FbossError("Shell still not supported for Yangra platforms"); } CHECK(0) << " Should never get here"; return ""; @@ -442,6 +448,7 @@ std::string& DiagCmdServer::cleanUpOutput( case PlatformType::PLATFORM_DARWIN: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: @@ -483,6 +490,8 @@ std::string& DiagCmdServer::cleanUpOutput( case PlatformType::PLATFORM_FAKE_WEDGE40: case PlatformType::PLATFORM_FAKE_SAI: throw FbossError("Shell not supported for fake platforms"); + case PlatformType::PLATFORM_YANGRA: + throw FbossError("Shell still not supported for Yangra platforms"); } CHECK(0) << " Should never get here"; return output; diff --git a/fboss/agent/hw/sai/diag/DiagShellClient.cpp b/fboss/agent/hw/sai/diag/DiagShellClient.cpp index 4d2fe67a91441..ff4443e972b89 100644 --- a/fboss/agent/hw/sai/diag/DiagShellClient.cpp +++ b/fboss/agent/hw/sai/diag/DiagShellClient.cpp @@ -177,8 +177,8 @@ class SignalHandler : public AsyncSignalHandler { int main(int argc, char* argv[]) { folly::init(&argc, &argv); - facebook::fboss::FbossEventBase streamEvb; - facebook::fboss::FbossEventBase stdinEvb; + facebook::fboss::FbossEventBase streamEvb{"DiagShellClientStreamEventBase"}; + facebook::fboss::FbossEventBase stdinEvb{"DiagShellClientStdinEventBase"}; bool stopThread = false; // Converts the host to IP address if a hostname is given diff --git a/fboss/agent/hw/sai/diag/diag.bzl b/fboss/agent/hw/sai/diag/diag.bzl deleted file mode 100644 index 03d680abca4f0..0000000000000 --- a/fboss/agent/hw/sai/diag/diag.bzl +++ /dev/null @@ -1,109 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls", "get_all_npu_impls", "get_all_phy_impls", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -def _py_repl_lib(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - subdir = "oss" - if sai_impl.name == "leaba": - subdir = "facebook/tajo" - - cpp_library( - name = "python_repl{}".format(impl_suffix), - srcs = [ - "PythonRepl.cpp", - "{}/PythonRepl.cpp".format(subdir), - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - ":diag_lib", - "//folly:file", - "//folly:format", - "//folly/logging:logging", - ], - exported_external_deps = [ - ("python", None, "python"), - ], - ) - -def _diag_lib(sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = "{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - srcs = [ - "DiagShell.cpp", - "facebook/DiagShell.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/agent/hw/sai/switch:if-cpp2-services", - "//fboss/agent/hw/sai/switch:if-cpp2-types", - ":sai_repl{}".format(impl_suffix), - ":python_repl{}".format(impl_suffix), - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//folly:file", - "//folly:file_util", - "//folly/logging:logging", - "//thrift/lib/cpp2/async:server_stream", - ], - exported_external_deps = [("boost", None, "boost_uuid")], - ) - -def _sai_repl(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - return cpp_library( - name = "sai_repl{}".format(impl_suffix), - srcs = [ - "SaiRepl.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - exported_deps = [ - ":diag_lib", - "//fboss/agent/hw/sai/api:sai_api{}".format(impl_suffix), - "//folly:file", - "//folly/logging:logging", - ], - ) - -def all_diag_libs(): - for sai_impl in get_all_impls(): - _py_repl_lib(sai_impl) - - for sai_impl in get_all_npu_impls(): - _diag_lib(sai_impl, True) - - for sai_impl in get_all_phy_impls(): - _diag_lib(sai_impl, False) - -def all_repl_libs(): - all_impls = get_all_impls() - for sai_impl in all_impls: - _sai_repl(sai_impl) - -def _diag_shell_client_bins(): - return cpp_binary( - name = "diag_shell_client", - srcs = [ - "DiagShellClient.cpp", - "facebook/DiagShellClient.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - deps = [ - "//fboss/agent:fboss-event-base", - "//fboss/agent/hw/sai/switch:if-cpp2-clients", - "//folly/init:init", - "//folly/io/async:async_base", - "//folly/io/async:async_signal_handler", - "//folly/logging:init", - "//folly/logging:logging", - "//servicerouter/client/cpp2:cpp2", - ], - ) - -def all_diag_bins(): - _diag_shell_client_bins() diff --git a/fboss/agent/hw/sai/fake/FakeSai.cpp b/fboss/agent/hw/sai/fake/FakeSai.cpp index e6315c3acc735..1888dfd83661e 100644 --- a/fboss/agent/hw/sai/fake/FakeSai.cpp +++ b/fboss/agent/hw/sai/fake/FakeSai.cpp @@ -64,6 +64,8 @@ void FakeSai::clear() { fs->tamEventManager.clear(); fs->tamEventActionManager.clear(); fs->tamReportManager.clear(); + fs->tamTransportManager.clear(); + fs->tamCollectorManager.clear(); fs->tunnelManager.clear(); fs->tunnelTermManager.clear(); fs->systemPortManager.clear(); diff --git a/fboss/agent/hw/sai/fake/FakeSai.h b/fboss/agent/hw/sai/fake/FakeSai.h index c2ed68b671b3a..35cdc16b0b625 100644 --- a/fboss/agent/hw/sai/fake/FakeSai.h +++ b/fboss/agent/hw/sai/fake/FakeSai.h @@ -97,9 +97,11 @@ struct FakeSai { FakeTamManager tamManager; FakeTamEventManager tamEventManager; FakeTamEventActionManager tamEventActionManager; + FakeTamReportManager tamReportManager; + FakeTamTransportManager tamTransportManager; + FakeTamCollectorManager tamCollectorManager; FakeTunnelManager tunnelManager; FakeTunnelTermManager tunnelTermManager; - FakeTamReportManager tamReportManager; FakeMacsecManager macsecManager; FakeMacsecPortManager macsecPortManager; FakeMacsecSAManager macsecSAManager; diff --git a/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp b/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp index 09b4e2a2cf1ca..4466766ab1238 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiAcl.cpp @@ -75,6 +75,12 @@ bool FakeAclTable::entryFieldSupported(const sai_attribute_t& attr) const { return fieldBthOpcode; case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: return fieldIpv6NextHeader; + case SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + return true; // Actions case SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION: case SAI_ACL_ENTRY_ATTR_ACTION_COUNTER: @@ -129,6 +135,11 @@ sai_status_t create_acl_table_fn( bool fieldOuterVlanId = 0; bool fieldBthOpcode = 0; bool fieldIpv6NextHeader = 0; + sai_object_id_t userDefinedFieldGroupMin = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin1 = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin2 = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin3 = SAI_NULL_OBJECT_ID; + sai_object_id_t userDefinedFieldGroupMin4 = SAI_NULL_OBJECT_ID; for (int i = 0; i < attr_count; ++i) { switch (attr_list[i].id) { @@ -225,6 +236,21 @@ sai_status_t create_acl_table_fn( case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: fieldIpv6NextHeader = attr_list[i].value.booldata; break; + case SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + userDefinedFieldGroupMin = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + userDefinedFieldGroupMin1 = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + userDefinedFieldGroupMin2 = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + userDefinedFieldGroupMin3 = attr_list[i].value.oid; + break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + userDefinedFieldGroupMin4 = attr_list[i].value.oid; + break; default: return SAI_STATUS_INVALID_PARAMETER; break; @@ -264,7 +290,12 @@ sai_status_t create_acl_table_fn( fieldEthertype, fieldOuterVlanId, fieldBthOpcode, - fieldIpv6NextHeader); + fieldIpv6NextHeader, + userDefinedFieldGroupMin, + userDefinedFieldGroupMin1, + userDefinedFieldGroupMin2, + userDefinedFieldGroupMin3, + userDefinedFieldGroupMin4); return SAI_STATUS_SUCCESS; } @@ -451,6 +482,26 @@ sai_status_t get_acl_table_attribute_fn( const auto& aclTable = fs->aclTableManager.get(acl_table_id); attr[i].value.booldata = aclTable.fieldIpv6NextHeader; } break; + case SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN: { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin1; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin2; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin3; + } break; + case (SAI_ACL_TABLE_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): { + const auto& aclTable = fs->aclTableManager.get(acl_table_id); + attr[i].value.oid = aclTable.userDefinedFieldGroupMin4; + } break; case SAI_ACL_TABLE_ATTR_AVAILABLE_ACL_ENTRY: case SAI_ACL_TABLE_ATTR_AVAILABLE_ACL_COUNTER: attr[i].value.u32 = 1000; @@ -463,6 +514,25 @@ sai_status_t get_acl_table_attribute_fn( return SAI_STATUS_SUCCESS; } +void acl_entry_copy_u8list_from_attr( + std::vector& data, + std::vector& mask, + const sai_attribute_t* attr) { + data.resize(attr->value.aclfield.data.u8list.count); + std::copy( + attr->value.aclfield.data.u8list.list, + attr->value.aclfield.data.u8list.list + + attr->value.aclfield.data.u8list.count, + std::begin(data)); + mask.resize(attr->value.aclfield.mask.u8list.count); + std::copy( + attr->value.aclfield.mask.u8list.list, + attr->value.aclfield.mask.u8list.list + + attr->value.aclfield.mask.u8list.count, + std::begin(mask)); + return; +} + sai_status_t set_acl_entry_attribute_fn( sai_object_id_t acl_entry_id, const sai_attribute_t* attr) { @@ -638,30 +708,70 @@ sai_status_t set_acl_entry_attribute_fn( aclEntry.fieldNeighborDstUserMetaMask = attr->value.aclfield.mask.u32; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE: + case SAI_ACL_ENTRY_ATTR_FIELD_ETHER_TYPE: aclEntry.fieldEtherTypeEnable = attr->value.aclfield.enable; aclEntry.fieldEtherTypeData = attr->value.aclfield.data.u16; aclEntry.fieldEtherTypeMask = attr->value.aclfield.mask.u16; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID: + case SAI_ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_ID: aclEntry.fieldOuterVlanIdEnable = attr->value.aclfield.enable; aclEntry.fieldOuterVlanIdData = attr->value.aclfield.data.u16; aclEntry.fieldOuterVlanIdMask = attr->value.aclfield.mask.u16; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_BTH_OPCODE: + case SAI_ACL_ENTRY_ATTR_FIELD_BTH_OPCODE: aclEntry.fieldBthOpcodeEnable = attr->value.aclfield.enable; aclEntry.fieldBthOpcodeData = attr->value.aclfield.data.u8; aclEntry.fieldBthOpcodeMask = attr->value.aclfield.mask.u8; res = SAI_STATUS_SUCCESS; break; - case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: + case SAI_ACL_ENTRY_ATTR_FIELD_IPV6_NEXT_HEADER: aclEntry.fieldIpv6NextHeaderEnable = attr->value.aclfield.enable; aclEntry.fieldIpv6NextHeaderData = attr->value.aclfield.data.u8; aclEntry.fieldIpv6NextHeaderMask = attr->value.aclfield.mask.u8; res = SAI_STATUS_SUCCESS; break; + case SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + aclEntry.userDefinedFieldGroupMinEnable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMinData, + aclEntry.userDefinedFieldGroupMinMask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + aclEntry.userDefinedFieldGroupMin1Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin1Data, + aclEntry.userDefinedFieldGroupMin1Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + aclEntry.userDefinedFieldGroupMin2Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin2Data, + aclEntry.userDefinedFieldGroupMin2Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + aclEntry.userDefinedFieldGroupMin3Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin3Data, + aclEntry.userDefinedFieldGroupMin3Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + aclEntry.userDefinedFieldGroupMin4Enable = attr->value.aclfield.enable; + acl_entry_copy_u8list_from_attr( + aclEntry.userDefinedFieldGroupMin4Data, + aclEntry.userDefinedFieldGroupMin4Mask, + attr); + res = SAI_STATUS_SUCCESS; + break; case SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION: aclEntry.actionPacketActionEnable = attr->value.aclaction.enable; @@ -880,26 +990,86 @@ sai_status_t get_acl_entry_attribute_fn( attr_list[i].value.aclfield.mask.u32 = aclEntry.fieldNeighborDstUserMetaMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE: + case SAI_ACL_ENTRY_ATTR_FIELD_ETHER_TYPE: attr_list[i].value.aclfield.enable = aclEntry.fieldEtherTypeEnable; attr_list[i].value.aclfield.data.u16 = aclEntry.fieldEtherTypeData; attr_list[i].value.aclfield.mask.u16 = aclEntry.fieldEtherTypeMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID: + case SAI_ACL_ENTRY_ATTR_FIELD_OUTER_VLAN_ID: attr_list[i].value.aclfield.enable = aclEntry.fieldOuterVlanIdEnable; attr_list[i].value.aclfield.data.u16 = aclEntry.fieldOuterVlanIdData; attr_list[i].value.aclfield.mask.u16 = aclEntry.fieldOuterVlanIdMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_BTH_OPCODE: + case SAI_ACL_ENTRY_ATTR_FIELD_BTH_OPCODE: attr_list[i].value.aclfield.enable = aclEntry.fieldBthOpcodeEnable; attr_list[i].value.aclfield.data.u8 = aclEntry.fieldBthOpcodeData; attr_list[i].value.aclfield.mask.u8 = aclEntry.fieldBthOpcodeMask; break; - case SAI_ACL_TABLE_ATTR_FIELD_IPV6_NEXT_HEADER: + case SAI_ACL_ENTRY_ATTR_FIELD_IPV6_NEXT_HEADER: attr_list[i].value.aclfield.enable = aclEntry.fieldIpv6NextHeaderEnable; attr_list[i].value.aclfield.data.u8 = aclEntry.fieldIpv6NextHeaderData; attr_list[i].value.aclfield.mask.u8 = aclEntry.fieldIpv6NextHeaderMask; break; + case SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN: + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMinEnable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMinData.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMinMask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMinData.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMinMask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 1): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin1Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin1Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin1Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin1Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin1Mask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 2): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin2Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin2Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin2Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin2Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin2Mask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 3): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin3Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin3Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin3Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin3Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin3Mask.data(); + break; + case (SAI_ACL_ENTRY_ATTR_USER_DEFINED_FIELD_GROUP_MIN + 4): + attr_list[i].value.aclfield.enable = + aclEntry.userDefinedFieldGroupMin4Enable; + attr_list[i].value.aclfield.data.u8list.count = + aclEntry.userDefinedFieldGroupMin4Data.size(); + attr_list[i].value.aclfield.mask.u8list.count = + aclEntry.userDefinedFieldGroupMin4Mask.size(); + attr_list[i].value.aclfield.data.u8list.list = + aclEntry.userDefinedFieldGroupMin4Data.data(); + attr_list[i].value.aclfield.mask.u8list.list = + aclEntry.userDefinedFieldGroupMin4Mask.data(); + break; case SAI_ACL_ENTRY_ATTR_ACTION_PACKET_ACTION: attr_list[i].value.aclaction.enable = aclEntry.actionPacketActionEnable; diff --git a/fboss/agent/hw/sai/fake/FakeSaiAcl.h b/fboss/agent/hw/sai/fake/FakeSaiAcl.h index 84b0133a3d3be..ebad13622e554 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiAcl.h +++ b/fboss/agent/hw/sai/fake/FakeSaiAcl.h @@ -183,6 +183,26 @@ class FakeAclEntry { sai_uint8_t fieldIpv6NextHeaderData; sai_uint8_t fieldIpv6NextHeaderMask; + bool userDefinedFieldGroupMinEnable{false}; + std::vector userDefinedFieldGroupMinData; + std::vector userDefinedFieldGroupMinMask; + + bool userDefinedFieldGroupMin1Enable{false}; + std::vector userDefinedFieldGroupMin1Data; + std::vector userDefinedFieldGroupMin1Mask; + + bool userDefinedFieldGroupMin2Enable{false}; + std::vector userDefinedFieldGroupMin2Data; + std::vector userDefinedFieldGroupMin2Mask; + + bool userDefinedFieldGroupMin3Enable{false}; + std::vector userDefinedFieldGroupMin3Data; + std::vector userDefinedFieldGroupMin3Mask; + + bool userDefinedFieldGroupMin4Enable{false}; + std::vector userDefinedFieldGroupMin4Data; + std::vector userDefinedFieldGroupMin4Mask; + bool actionPacketActionEnable{false}; sai_uint32_t actionPacketActionData; @@ -243,7 +263,12 @@ class FakeAclTable { bool fieldEthertype, bool fieldOuterVlanId, bool fieldBthOpcode, - bool fieldIpv6NextHeader) + bool fieldIpv6NextHeader, + sai_object_id_t userDefinedFieldGroupMin, + sai_object_id_t userDefinedFieldGroupMin1, + sai_object_id_t userDefinedFieldGroupMin2, + sai_object_id_t userDefinedFieldGroupMin3, + sai_object_id_t userDefinedFieldGroupMin4) : stage(stage), bindPointTypeList(bindPointTypeList), actionTypeList(actionTypeList), @@ -272,7 +297,12 @@ class FakeAclTable { fieldEthertype(fieldEthertype), fieldOuterVlanId(fieldOuterVlanId), fieldBthOpcode(fieldBthOpcode), - fieldIpv6NextHeader(fieldIpv6NextHeader) {} + fieldIpv6NextHeader(fieldIpv6NextHeader), + userDefinedFieldGroupMin(userDefinedFieldGroupMin), + userDefinedFieldGroupMin1(userDefinedFieldGroupMin1), + userDefinedFieldGroupMin2(userDefinedFieldGroupMin2), + userDefinedFieldGroupMin3(userDefinedFieldGroupMin3), + userDefinedFieldGroupMin4(userDefinedFieldGroupMin4) {} bool entryFieldSupported(const sai_attribute_t& attr) const; static sai_acl_api_t* kApi(); @@ -308,6 +338,11 @@ class FakeAclTable { bool fieldOuterVlanId; bool fieldBthOpcode; bool fieldIpv6NextHeader; + sai_object_id_t userDefinedFieldGroupMin; + sai_object_id_t userDefinedFieldGroupMin1; + sai_object_id_t userDefinedFieldGroupMin2; + sai_object_id_t userDefinedFieldGroupMin3; + sai_object_id_t userDefinedFieldGroupMin4; }; class FakeAclCounter { diff --git a/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp b/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp index 5bde6d73d566e..fc5b42687b95b 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiBuffer.cpp @@ -139,7 +139,7 @@ sai_status_t create_buffer_profile_fn( std::optional reservedBytes; std::optional threshMode; std::optional dynamicThreshold; - std::optional staticThreshold; + std::optional staticThreshold; std::optional xoffTh; std::optional xonTh; std::optional xonOffsetTh; @@ -158,6 +158,9 @@ sai_status_t create_buffer_profile_fn( case SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH: dynamicThreshold = attr_list[i].value.s8; break; + case SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH: + staticThreshold = attr_list[i].value.u64; + break; case SAI_BUFFER_PROFILE_ATTR_XOFF_TH: xoffTh = attr_list[i].value.u64; break; @@ -179,6 +182,7 @@ sai_status_t create_buffer_profile_fn( reservedBytes, threshMode, dynamicThreshold, + staticThreshold, xoffTh, xonTh, xonOffsetTh); @@ -201,6 +205,9 @@ sai_status_t set_buffer_profile_attribute_fn( case SAI_BUFFER_PROFILE_ATTR_SHARED_DYNAMIC_TH: profile.dynamicThreshold = attr->value.s8; break; + case SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH: + profile.staticThreshold = attr->value.u64; + break; case SAI_BUFFER_PROFILE_ATTR_XOFF_TH: profile.xoffTh = attr->value.u64; break; @@ -244,6 +251,10 @@ sai_status_t get_buffer_profile_attribute_fn( attr[i].value.s8 = profile.dynamicThreshold ? profile.dynamicThreshold.value() : 0; break; + case SAI_BUFFER_PROFILE_ATTR_SHARED_STATIC_TH: + attr[i].value.u64 = + profile.staticThreshold ? profile.staticThreshold.value() : 0; + break; case SAI_BUFFER_PROFILE_ATTR_XOFF_TH: attr[i].value.u64 = profile.xoffTh ? profile.xoffTh.value() : 0; break; diff --git a/fboss/agent/hw/sai/fake/FakeSaiBuffer.h b/fboss/agent/hw/sai/fake/FakeSaiBuffer.h index ecb11e6e30b01..7df6a05e18754 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiBuffer.h +++ b/fboss/agent/hw/sai/fake/FakeSaiBuffer.h @@ -46,6 +46,7 @@ class FakeBufferProfile { std::optional reservedBytes, std::optional threshMode, std::optional dynamicThreshold, + std::optional staticThreshold, std::optional xoffTh, std::optional xonTh, std::optional xonOffsetTh) @@ -53,6 +54,7 @@ class FakeBufferProfile { reservedBytes(reservedBytes), threshMode(threshMode), dynamicThreshold(dynamicThreshold), + staticThreshold(staticThreshold), xoffTh(xoffTh), xonTh(xonTh), xonOffsetTh(xonOffsetTh) {} @@ -61,6 +63,7 @@ class FakeBufferProfile { std::optional reservedBytes; std::optional threshMode; std::optional dynamicThreshold; + std::optional staticThreshold; std::optional xoffTh; std::optional xonTh; std::optional xonOffsetTh; diff --git a/fboss/agent/hw/sai/fake/FakeSaiObject.cpp b/fboss/agent/hw/sai/fake/FakeSaiObject.cpp index b3c46cb552f37..d2b7c8573243d 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiObject.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiObject.cpp @@ -149,6 +149,12 @@ sai_status_t sai_get_object_count( case SAI_OBJECT_TYPE_WRED: *count = fs->wredManager.map().size(); break; + case SAI_OBJECT_TYPE_TAM_COLLECTOR: + *count = fs->tamCollectorManager.map().size(); + break; + case SAI_OBJECT_TYPE_TAM_TRANSPORT: + *count = fs->tamTransportManager.map().size(); + break; case SAI_OBJECT_TYPE_TAM_REPORT: *count = fs->tamReportManager.map().size(); break; @@ -482,6 +488,18 @@ sai_status_t sai_get_object_key( } break; } + case SAI_OBJECT_TYPE_TAM_COLLECTOR: { + for (const auto& ob : fs->tamCollectorManager.map()) { + object_list[i++].key.object_id = ob.second.id; + } + break; + } + case SAI_OBJECT_TYPE_TAM_TRANSPORT: { + for (const auto& ob : fs->tamTransportManager.map()) { + object_list[i++].key.object_id = ob.second.id; + } + break; + } case SAI_OBJECT_TYPE_TAM_REPORT: { for (const auto& ob : fs->tamReportManager.map()) { object_list[i++].key.object_id = ob.second.id; diff --git a/fboss/agent/hw/sai/fake/FakeSaiPort.cpp b/fboss/agent/hw/sai/fake/FakeSaiPort.cpp index 85f2577479bf7..c861c8d70d36e 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiPort.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiPort.cpp @@ -54,6 +54,7 @@ sai_status_t create_port_fn( bool disableTtlDecrement{false}; sai_port_interface_type_t interface_type{SAI_PORT_INTERFACE_TYPE_NONE}; bool txEnable{true}; + std::vector tamObjectList; std::optional prbsPolynomial; std::optional prbsConfig; std::optional ingressMacsecAcl; @@ -156,6 +157,11 @@ sai_status_t create_port_fn( case SAI_PORT_ATTR_PKT_TX_ENABLE: txEnable = attr_list[i].value.booldata; break; + case SAI_PORT_ATTR_TAM_OBJECT: + for (int j = 0; j < attr_list[i].value.objlist.count; ++j) { + tamObjectList.push_back(attr_list[i].value.objlist.list[j]); + } + break; case SAI_PORT_ATTR_INGRESS_MIRROR_SESSION: { for (int j = 0; j < attr_list[i].value.objlist.count; ++j) { ingressMirrorList.push_back(attr_list[i].value.objlist.list[j]); @@ -349,6 +355,7 @@ sai_status_t create_port_fn( port.egressSamplePacket = egressSamplePacket; port.disableTtlDecrement = disableTtlDecrement; port.txEnable = txEnable; + port.tamObjectList = tamObjectList; // TODO: Use number of queues by querying SAI_SWITCH_ATTR_NUMBER_OF_QUEUES for (uint8_t queueId = 0; queueId < 8; queueId++) { auto saiQueueId = fs->queueManager.create( @@ -514,6 +521,13 @@ sai_status_t set_port_attribute_fn( case SAI_PORT_ATTR_PKT_TX_ENABLE: port.txEnable = attr->value.booldata; break; + case SAI_PORT_ATTR_TAM_OBJECT: { + auto& tamObjectList = port.tamObjectList; + tamObjectList.clear(); + for (int j = 0; j < attr->value.objlist.count; ++j) { + tamObjectList.push_back(attr->value.objlist.list[j]); + } + } break; case SAI_PORT_ATTR_INGRESS_MIRROR_SESSION: { auto& ingressMirrorList = port.ingressMirrorList; ingressMirrorList.clear(); @@ -860,6 +874,16 @@ sai_status_t get_port_attribute_fn( case SAI_PORT_ATTR_PKT_TX_ENABLE: attr->value.booldata = port.txEnable; break; + case SAI_PORT_ATTR_TAM_OBJECT: + if (port.tamObjectList.size() > attr[i].value.objlist.count) { + attr[i].value.objlist.count = port.tamObjectList.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (int j = 0; j < port.tamObjectList.size(); ++j) { + attr[i].value.objlist.list[j] = port.tamObjectList[j]; + } + attr[i].value.objlist.count = port.tamObjectList.size(); + break; case SAI_PORT_ATTR_INGRESS_MIRROR_SESSION: if (port.ingressMirrorList.size() > attr[i].value.objlist.count) { attr[i].value.objlist.count = port.ingressMirrorList.size(); @@ -1332,6 +1356,240 @@ sai_status_t set_port_serdes_attribute_fn( return SAI_STATUS_INVALID_ATTRIBUTE_0; } break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN: + fillVec( + portSerdes.txDiffEncoderEn, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txDiffEncoderEn)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN: + fillVec( + portSerdes.txDigGain, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txDigGain)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0: + fillVec( + portSerdes.txFfeCoeff0, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff0)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1: + fillVec( + portSerdes.txFfeCoeff1, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff1)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2: + fillVec( + portSerdes.txFfeCoeff2, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff2)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3: + fillVec( + portSerdes.txFfeCoeff3, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff3)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4: + fillVec( + portSerdes.txFfeCoeff4, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txFfeCoeff4)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING: + fillVec( + portSerdes.txDriverSwing, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.txDriverSwing)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT: + fillVec( + portSerdes.rxInstgBoost1Start, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost1Start)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP: + fillVec( + portSerdes.rxInstgBoost1Step, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost1Step)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP: + fillVec( + portSerdes.rxInstgBoost1Stop, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost1Stop)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT: + fillVec( + portSerdes.rxInstgBoost2OrHrStart, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost2OrHrStart)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP: + fillVec( + portSerdes.rxInstgBoost2OrHrStep, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost2OrHrStep)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP: + fillVec( + portSerdes.rxInstgBoost2OrHrStop, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgBoost2OrHrStop)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7: + fillVec( + portSerdes.rxInstgC1Start1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgC1Start1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7: + fillVec( + portSerdes.rxInstgC1Step1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgC1Step1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7: + fillVec( + portSerdes.rxInstgC1Stop1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgC1Stop1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7: + fillVec( + portSerdes.rxInstgDfeStart1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgDfeStart1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7: + fillVec( + portSerdes.rxInstgDfeStep1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgDfeStep1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7: + fillVec( + portSerdes.rxInstgDfeStop1p7, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgDfeStop1p7)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN: + fillVec( + portSerdes.rxEnableScanSelection, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxEnableScanSelection)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS: + fillVec( + portSerdes.rxInstgScanUseSrSettings, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxInstgScanUseSrSettings)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN: + fillVec( + portSerdes.rxCdrCfgOvEn, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrCfgOvEn)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL: + fillVec( + portSerdes.rxCdrTdet1stOrdStepOvVal, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrTdet1stOrdStepOvVal)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL: + fillVec( + portSerdes.rxCdrTdet2ndOrdStepOvVal, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrTdet2ndOrdStepOvVal)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL: + fillVec( + portSerdes.rxCdrTdetFineStepOvVal, + attr->value.s32list.list, + attr->value.s32list.count); + if (!checkLanes(portSerdes.rxCdrTdetFineStepOvVal)) { + return SAI_STATUS_INVALID_ATTRIBUTE_0; + } + break; default: return SAI_STATUS_NOT_SUPPORTED; } @@ -1472,6 +1730,243 @@ sai_status_t get_port_serdes_attribute_fn( copyVecToList( portSerdes.rxAfeTrimAdaptiveEnable, attr_list[i].value.s32list); break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIFF_ENCODER_EN: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txDiffEncoderEn)) { + attr_list[i].value.s32list.count = portSerdes.txDiffEncoderEn.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txDiffEncoderEn, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DIG_GAIN: + if (!checkListSize(attr_list[i].value.s32list, portSerdes.txDigGain)) { + attr_list[i].value.s32list.count = portSerdes.txDigGain.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txDigGain, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_0: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff0)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff0.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff0, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_1: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff1)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff1.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff1, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_2: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff2)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff2.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff2, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_3: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff3)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff3.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff3, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_FFE_COEFF_4: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txFfeCoeff4)) { + attr_list[i].value.s32list.count = portSerdes.txFfeCoeff4.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txFfeCoeff4, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_TX_DRIVER_SWING: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.txDriverSwing)) { + attr_list[i].value.s32list.count = portSerdes.txDriverSwing.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.txDriverSwing, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STRT: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost1Start)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost1Start.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost1Start, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STEP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost1Step)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost1Step.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgBoost1Step, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST1_STOP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost1Stop)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost1Stop.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgBoost1Stop, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STRT: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxInstgBoost2OrHrStart)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost2OrHrStart.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost2OrHrStart, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STEP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost2OrHrStep)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost2OrHrStep.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost2OrHrStep, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_BOOST2_OR_HR_STOP: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgBoost2OrHrStop)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgBoost2OrHrStop.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgBoost2OrHrStop, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_START_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgC1Start1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgC1Start1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgC1Start1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STEP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgC1Step1p7)) { + attr_list[i].value.s32list.count = portSerdes.rxInstgC1Step1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgC1Step1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_C1_STOP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgC1Stop1p7)) { + attr_list[i].value.s32list.count = portSerdes.rxInstgC1Stop1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgC1Stop1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_START_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgDfeStart1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgDfeStart1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgDfeStart1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STEP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgDfeStep1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgDfeStep1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgDfeStep1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_DFE_STOP_1P7: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxInstgDfeStop1p7)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgDfeStop1p7.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxInstgDfeStop1p7, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_ENABLE_SCAN: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxEnableScanSelection)) { + attr_list[i].value.s32list.count = + portSerdes.rxEnableScanSelection.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxEnableScanSelection, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_INSTG_SCAN_USE_SR_SETTINGS: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxInstgScanUseSrSettings)) { + attr_list[i].value.s32list.count = + portSerdes.rxInstgScanUseSrSettings.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxInstgScanUseSrSettings, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_CFG_OV_EN: + if (!checkListSize( + attr_list[i].value.s32list, portSerdes.rxCdrCfgOvEn)) { + attr_list[i].value.s32list.count = portSerdes.rxCdrCfgOvEn.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList(portSerdes.rxCdrCfgOvEn, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_1ST_ORD_STEP_OV_VAL: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxCdrTdet1stOrdStepOvVal)) { + attr_list[i].value.s32list.count = + portSerdes.rxCdrTdet1stOrdStepOvVal.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxCdrTdet1stOrdStepOvVal, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_2ND_ORD_STEP_OV_VAL: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxCdrTdet2ndOrdStepOvVal)) { + attr_list[i].value.s32list.count = + portSerdes.rxCdrTdet2ndOrdStepOvVal.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxCdrTdet2ndOrdStepOvVal, attr_list[i].value.s32list); + break; + case SAI_PORT_SERDES_ATTR_EXT_RX_CDR_TDET_FINE_STEP_OV_VAL: + if (!checkListSize( + attr_list[i].value.s32list, + portSerdes.rxCdrTdetFineStepOvVal)) { + attr_list[i].value.s32list.count = + portSerdes.rxCdrTdetFineStepOvVal.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + copyVecToList( + portSerdes.rxCdrTdetFineStepOvVal, attr_list[i].value.s32list); + break; default: return SAI_STATUS_NOT_IMPLEMENTED; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiPort.h b/fboss/agent/hw/sai/fake/FakeSaiPort.h index c872f32116b0f..0a7c2a81cea4a 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiPort.h +++ b/fboss/agent/hw/sai/fake/FakeSaiPort.h @@ -53,6 +53,7 @@ struct FakePort { bool disableTtlDecrement{false}; sai_port_interface_type_t interface_type{SAI_PORT_INTERFACE_TYPE_NONE}; bool txEnable{true}; + std::vector tamObjectList; std::vector ingressMirrorList; std::vector egressMirrorList; sai_object_id_t ingressSamplePacket{SAI_NULL_OBJECT_ID}; @@ -123,6 +124,32 @@ struct FakePortSerdes { std::vector rxAfeTrim; std::vector rxCouplingByPass; std::vector rxAfeTrimAdaptiveEnable; + std::vector txDiffEncoderEn; + std::vector txDigGain; + std::vector txFfeCoeff0; + std::vector txFfeCoeff1; + std::vector txFfeCoeff2; + std::vector txFfeCoeff3; + std::vector txFfeCoeff4; + std::vector txDriverSwing; + std::vector rxInstgBoost1Start; + std::vector rxInstgBoost1Step; + std::vector rxInstgBoost1Stop; + std::vector rxInstgBoost2OrHrStart; + std::vector rxInstgBoost2OrHrStep; + std::vector rxInstgBoost2OrHrStop; + std::vector rxInstgC1Start1p7; + std::vector rxInstgC1Step1p7; + std::vector rxInstgC1Stop1p7; + std::vector rxInstgDfeStart1p7; + std::vector rxInstgDfeStep1p7; + std::vector rxInstgDfeStop1p7; + std::vector rxEnableScanSelection; + std::vector rxInstgScanUseSrSettings; + std::vector rxCdrCfgOvEn; + std::vector rxCdrTdet1stOrdStepOvVal; + std::vector rxCdrTdet2ndOrdStepOvVal; + std::vector rxCdrTdetFineStepOvVal; }; struct FakePortConnector { diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp index 60139f06b7d50..c23b3e72a9c31 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp @@ -2,6 +2,7 @@ #include "fboss/agent/hw/sai/fake/FakeSaiTam.h" +#include "fboss/agent/hw/sai/api/AddressUtil.h" #include "fboss/agent/hw/sai/fake/FakeSai.h" namespace { @@ -124,6 +125,12 @@ sai_status_t create_tam_event( std::vector collectors{}; std::vector switchEvents{}; + sai_int32_t deviceId{}; + sai_int32_t eventId{}; + std::vector extensionsCollectorList{}; + std::vector packetDropTypeMmu{}; + sai_object_id_t agingGroup{}; + for (auto i = 0; i < attr_count; i++) { switch (attr_list[i].id) { case SAI_TAM_EVENT_ATTR_TYPE: @@ -151,13 +158,47 @@ sai_status_t create_tam_event( std::back_inserter(switchEvents)); break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + deviceId = attr_list[i].value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + eventId = attr_list[i].value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + std::copy( + attr_list[i].value.objlist.list, + attr_list[i].value.objlist.list + attr_list[i].value.objlist.count, + std::back_inserter(extensionsCollectorList)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + std::copy( + attr_list[i].value.s32list.list, + attr_list[i].value.s32list.list + attr_list[i].value.s32list.count, + std::back_inserter(packetDropTypeMmu)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + agingGroup = attr_list[i].value.oid; + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } } auto fs = FakeSai::getInstance(); - *id = - fs->tamEventManager.create(eventType, actions, collectors, switchEvents); + *id = fs->tamEventManager.create( + eventType, + actions, + collectors, + switchEvents, + deviceId, + eventId, + extensionsCollectorList, + packetDropTypeMmu, + agingGroup); return SAI_STATUS_SUCCESS; } @@ -210,6 +251,44 @@ sai_status_t get_tam_event_attribute( } break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + attr_list[i].value.s32 = eventAction.deviceId_; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + attr_list[i].value.s32 = eventAction.eventId_; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + if (attr_list[i].value.objlist.count < + eventAction.extensionsCollectorList_.size()) { + attr_list[i].value.objlist.count = + eventAction.extensionsCollectorList_.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (auto j = 0; j < attr_list[i].value.objlist.count; j++) { + attr_list[i].value.objlist.list[j] = + eventAction.extensionsCollectorList_[j]; + } + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + if (attr_list[i].value.s32list.count < + eventAction.packetDropTypeMmu_.size()) { + attr_list[i].value.s32list.count = + eventAction.packetDropTypeMmu_.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (auto j = 0; j < attr_list[i].value.s32list.count; j++) { + attr_list[i].value.s32list.list[j] = + eventAction.packetDropTypeMmu_[j]; + } + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + attr_list[i].value.oid = eventAction.agingGroup_; + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } @@ -219,48 +298,70 @@ sai_status_t get_tam_event_attribute( sai_status_t set_tam_event_attribute( sai_object_id_t id, - const sai_attribute_t* attr_list) { - sai_int32_t eventType{}; - std::vector actions{}; - std::vector collectors{}; - std::vector switchEvents{}; + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& tamEvent = fs->tamEventManager.get(id); + switch (attr->id) { + case SAI_TAM_EVENT_ATTR_TYPE: + tamEvent.eventType_ = attr->value.s32; + break; - switch (attr_list[0].id) { - case SAI_TAM_EVENT_ATTR_TYPE: - eventType = attr_list[0].value.s32; - break; + case SAI_TAM_EVENT_ATTR_ACTION_LIST: + tamEvent.actions_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.actions_)); + break; - case SAI_TAM_EVENT_ATTR_ACTION_LIST: - std::copy( - attr_list[0].value.objlist.list, - attr_list[0].value.objlist.list + attr_list[0].value.objlist.count, - std::back_inserter(actions)); - break; + case SAI_TAM_EVENT_ATTR_COLLECTOR_LIST: + tamEvent.collectors_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.collectors_)); + break; - case SAI_TAM_EVENT_ATTR_COLLECTOR_LIST: - std::copy( - attr_list[0].value.objlist.list, - attr_list[0].value.objlist.list + attr_list[0].value.objlist.count, - std::back_inserter(collectors)); - break; + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE: + tamEvent.switchEvents_.clear(); + std::copy( + attr->value.s32list.list, + attr->value.s32list.list + attr->value.s32list.count, + std::back_inserter(tamEvent.switchEvents_)); + break; - case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE: - std::copy( - attr_list[0].value.s32list.list, - attr_list[0].value.s32list.list + attr_list[0].value.s32list.count, - std::back_inserter(switchEvents)); - break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + tamEvent.deviceId_ = attr->value.s32; + break; - default: - return SAI_STATUS_ATTR_NOT_SUPPORTED_0; - } - try { - auto fs = FakeSai::getInstance(); - auto& tamEvent = fs->tamEventManager.get(id); - tamEvent.eventType_ = eventType; - tamEvent.actions_ = actions; - tamEvent.collectors_ = collectors; - tamEvent.switchEvents_ = switchEvents; + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + tamEvent.eventId_ = attr->value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + tamEvent.extensionsCollectorList_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.extensionsCollectorList_)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + tamEvent.packetDropTypeMmu_.clear(); + std::copy( + attr->value.s32list.list, + attr->value.s32list.list + attr->value.s32list.count, + std::back_inserter(tamEvent.packetDropTypeMmu_)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + tamEvent.agingGroup_ = attr->value.oid; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } } catch (...) { return SAI_STATUS_ITEM_NOT_FOUND; } @@ -396,6 +497,267 @@ sai_status_t set_tam_report_attribute( } return SAI_STATUS_SUCCESS; } + +sai_status_t create_tam_transport( + sai_object_id_t* id, + sai_object_id_t /*switch_id*/, + uint32_t attr_count, + const sai_attribute_t* attr_list) { + sai_int32_t transportType{}; + sai_uint32_t srcPort{}; + sai_uint32_t dstPort{}; + sai_uint32_t mtu{}; + std::optional srcMac; + std::optional dstMac; + + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE: + transportType = attr_list[i].value.s32; + break; + + case SAI_TAM_TRANSPORT_ATTR_SRC_PORT: + srcPort = attr_list[i].value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_DST_PORT: + dstPort = attr_list[i].value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_MTU: + mtu = attr_list[i].value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS: + srcMac = facebook::fboss::fromSaiMacAddress(attr_list[i].value.mac); + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS: + dstMac = facebook::fboss::fromSaiMacAddress(attr_list[i].value.mac); + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + auto fs = FakeSai::getInstance(); + *id = fs->tamTransportManager.create( + transportType, srcPort, dstPort, mtu, srcMac, dstMac); + return SAI_STATUS_SUCCESS; +} + +sai_status_t remove_tam_transport(sai_object_id_t id) { + auto fs = FakeSai::getInstance(); + fs->tamTransportManager.remove(id); + return SAI_STATUS_SUCCESS; +} + +sai_status_t get_tam_transport_attribute( + sai_object_id_t id, + uint32_t attr_count, + sai_attribute_t* attr_list) { + auto fs = FakeSai::getInstance(); + auto& transport = fs->tamTransportManager.get(id); + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE: + attr_list[i].value.s32 = transport.transportType_; + break; + + case SAI_TAM_TRANSPORT_ATTR_SRC_PORT: + attr_list[i].value.u32 = transport.srcPort_; + break; + + case SAI_TAM_TRANSPORT_ATTR_DST_PORT: + attr_list[i].value.u32 = transport.dstPort_; + break; + + case SAI_TAM_TRANSPORT_ATTR_MTU: + attr_list[i].value.u32 = transport.mtu_; + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS: + facebook::fboss::toSaiMacAddress( + transport.srcMac_.value(), attr_list[i].value.mac); + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS: + facebook::fboss::toSaiMacAddress( + transport.dstMac_.value(), attr_list[i].value.mac); + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + return SAI_STATUS_SUCCESS; +} + +sai_status_t set_tam_transport_attribute( + sai_object_id_t id, + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& transport = fs->tamTransportManager.get(id); + switch (attr->id) { + case SAI_TAM_TRANSPORT_ATTR_TRANSPORT_TYPE: + transport.transportType_ = attr->value.s32; + break; + + case SAI_TAM_TRANSPORT_ATTR_SRC_PORT: + transport.srcPort_ = attr->value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_DST_PORT: + transport.dstPort_ = attr->value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_MTU: + transport.mtu_ = attr->value.u32; + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS: + transport.srcMac_ = facebook::fboss::fromSaiMacAddress(attr->value.mac); + break; + + case SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS: + transport.dstMac_ = facebook::fboss::fromSaiMacAddress(attr->value.mac); + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } + } catch (...) { + return SAI_STATUS_ITEM_NOT_FOUND; + } + return SAI_STATUS_SUCCESS; +} + +sai_status_t create_tam_collector( + sai_object_id_t* id, + sai_object_id_t /*switch_id*/, + uint32_t attr_count, + const sai_attribute_t* attr_list) { + folly::IPAddress srcIp{}; + folly::IPAddress dstIp{}; + std::optional truncateSize{}; + sai_object_id_t transport{}; + std::optional dscp{}; + + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_COLLECTOR_ATTR_SRC_IP: + srcIp = facebook::fboss::fromSaiIpAddress(attr_list[i].value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_DST_IP: + dstIp = facebook::fboss::fromSaiIpAddress(attr_list[i].value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE: + truncateSize = attr_list[i].value.u16; + break; + + case SAI_TAM_COLLECTOR_ATTR_TRANSPORT: + transport = attr_list[i].value.oid; + break; + + case SAI_TAM_COLLECTOR_ATTR_DSCP_VALUE: + dscp = attr_list[i].value.u8; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + auto fs = FakeSai::getInstance(); + *id = fs->tamCollectorManager.create( + srcIp, dstIp, truncateSize, transport, dscp); + return SAI_STATUS_SUCCESS; +} + +sai_status_t remove_tam_collector(sai_object_id_t id) { + auto fs = FakeSai::getInstance(); + fs->tamCollectorManager.remove(id); + return SAI_STATUS_SUCCESS; +} + +sai_status_t get_tam_collector_attribute( + sai_object_id_t id, + uint32_t attr_count, + sai_attribute_t* attr_list) { + auto fs = FakeSai::getInstance(); + auto& collector = fs->tamCollectorManager.get(id); + for (auto i = 0; i < attr_count; i++) { + switch (attr_list[i].id) { + case SAI_TAM_COLLECTOR_ATTR_SRC_IP: + attr_list[i].value.ipaddr = + facebook::fboss::toSaiIpAddress(folly::IPAddress(collector.srcIp_)); + break; + + case SAI_TAM_COLLECTOR_ATTR_DST_IP: + attr_list[i].value.ipaddr = + facebook::fboss::toSaiIpAddress(folly::IPAddress(collector.dstIp_)); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE: + attr_list[i].value.u16 = collector.truncateSize_.value(); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRANSPORT: + attr_list[i].value.oid = collector.transport_; + break; + + case SAI_TAM_COLLECTOR_ATTR_DSCP_VALUE: + attr_list[i].value.u8 = collector.dscp_.value(); + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; + } + } + return SAI_STATUS_SUCCESS; +} + +sai_status_t set_tam_collector_attribute( + sai_object_id_t id, + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& collector = fs->tamCollectorManager.get(id); + + switch (attr->id) { + case SAI_TAM_COLLECTOR_ATTR_SRC_IP: + collector.srcIp_ = + facebook::fboss::fromSaiIpAddress(attr->value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_DST_IP: + collector.dstIp_ = + facebook::fboss::fromSaiIpAddress(attr->value.ipaddr); + break; + + case SAI_TAM_COLLECTOR_ATTR_TRUNCATE_SIZE: + collector.truncateSize_ = attr->value.u16; + break; + + case SAI_TAM_COLLECTOR_ATTR_TRANSPORT: + collector.transport_ = attr->value.oid; + break; + + case SAI_TAM_COLLECTOR_ATTR_DSCP_VALUE: + collector.dscp_ = attr->value.u8; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } + } catch (...) { + return SAI_STATUS_ITEM_NOT_FOUND; + } + return SAI_STATUS_SUCCESS; +} + } // namespace namespace facebook::fboss { @@ -422,6 +784,16 @@ void populate_tam_api(sai_tam_api_t** tam_api) { _tam_api.set_tam_report_attribute = &set_tam_report_attribute; _tam_api.get_tam_report_attribute = &get_tam_report_attribute; + _tam_api.create_tam_transport = &create_tam_transport; + _tam_api.remove_tam_transport = &remove_tam_transport; + _tam_api.set_tam_transport_attribute = &set_tam_transport_attribute; + _tam_api.get_tam_transport_attribute = &get_tam_transport_attribute; + + _tam_api.create_tam_collector = &create_tam_collector; + _tam_api.remove_tam_collector = &remove_tam_collector; + _tam_api.set_tam_collector_attribute = &set_tam_collector_attribute; + _tam_api.get_tam_collector_attribute = &get_tam_collector_attribute; + *tam_api = &_tam_api; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.h b/fboss/agent/hw/sai/fake/FakeSaiTam.h index 5149fe37bbe34..c480a096ce307 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.h +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.h @@ -4,6 +4,9 @@ #include "fboss/agent/hw/sai/fake/FakeManager.h" +#include +#include + extern "C" { #include } @@ -28,16 +31,31 @@ class FakeSaiTamEvent { sai_int32_t eventType, const std::vector& actions, const std::vector& collectors, - const std::vector& switchEvents) + const std::vector& switchEvents, + sai_int32_t deviceId, + sai_int32_t eventId, + std::vector extensionsCollectorList, + std::vector packetDropTypeMmu, + sai_object_id_t agingGroup) : eventType_(eventType), actions_(actions), collectors_(collectors), - switchEvents_(switchEvents) {} + switchEvents_(switchEvents), + deviceId_(deviceId), + eventId_(eventId), + extensionsCollectorList_(std::move(extensionsCollectorList)), + packetDropTypeMmu_(std::move(packetDropTypeMmu)), + agingGroup_(agingGroup) {} sai_object_id_t id; sai_int32_t eventType_; std::vector actions_; std::vector collectors_; std::vector switchEvents_; + sai_int32_t deviceId_; + sai_int32_t eventId_; + std::vector extensionsCollectorList_; + std::vector packetDropTypeMmu_; + sai_object_id_t agingGroup_; }; class FakeSaiTamEventAction { @@ -54,11 +72,60 @@ class FakeSaiTamReport { sai_int32_t type_; }; +class FakeSaiTamTransport { + public: + FakeSaiTamTransport( + sai_int32_t transportType, + sai_uint32_t srcPort, + sai_uint32_t dstPort, + sai_uint32_t mtu, + std::optional srcMac, + std::optional dstMac) + : transportType_(transportType), + srcPort_(srcPort), + dstPort_(dstPort), + mtu_(mtu), + srcMac_(srcMac), + dstMac_(dstMac) {} + sai_object_id_t id; + sai_int32_t transportType_; + sai_uint32_t srcPort_; + sai_uint32_t dstPort_; + sai_uint32_t mtu_; + std::optional srcMac_; + std::optional dstMac_; +}; + +class FakeSaiTamCollector { + public: + FakeSaiTamCollector( + const folly::IPAddress& srcIp, + const folly::IPAddress& dstIp, + std::optional truncateSize, + sai_object_id_t transport, + std::optional dscp) + : srcIp_(srcIp), + dstIp_(dstIp), + truncateSize_(truncateSize), + transport_(transport), + dscp_(dscp) {} + sai_object_id_t id; + folly::IPAddress srcIp_; + folly::IPAddress dstIp_; + std::optional truncateSize_; + sai_object_id_t transport_; + std::optional dscp_; +}; + using FakeTamManager = FakeManager; using FakeTamEventManager = FakeManager; using FakeTamEventActionManager = FakeManager; using FakeTamReportManager = FakeManager; +using FakeTamTransportManager = + FakeManager; +using FakeTamCollectorManager = + FakeManager; void populate_tam_api(sai_tam_api_t** tam_api); diff --git a/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp b/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp index 10ad2b5f0de76..72db67b8de271 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestAclUtils.cpp @@ -477,11 +477,15 @@ void checkAclEntryAndStatCount( } #if SAI_API_VERSION >= SAI_VERSION(1, 10, 2) - auto aclCounterNameGot = SaiApiTable::getInstance()->aclApi().getAttribute( - AclCounterSaiId(aclCounterIdGot), - SaiAclCounterTraits::Attributes::Label()); - XLOG(DBG2) << "checkAclEntryAndStatCount:: aclCounterNameGot: " - << aclCounterNameGot.data(); + if (hwSwitch->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::ACL_COUNTER_LABEL)) { + auto aclCounterNameGot = + SaiApiTable::getInstance()->aclApi().getAttribute( + AclCounterSaiId(aclCounterIdGot), + SaiAclCounterTraits::Attributes::Label()); + XLOG(DBG2) << "checkAclEntryAndStatCount:: aclCounterNameGot: " + << aclCounterNameGot.data(); + } #endif XLOG(DBG2) << " enablePacketCount: " << enablePacketCount @@ -525,11 +529,15 @@ void checkAclStat( #if SAI_API_VERSION >= SAI_VERSION(1, 10, 2) // Counter name must match what was previously configured - auto aclCounterNameGot = SaiApiTable::getInstance()->aclApi().getAttribute( - AclCounterSaiId(aclCounterIdGot), - SaiAclCounterTraits::Attributes::Label()); - std::string aclCounterNameGotStr(aclCounterNameGot.data()); - EXPECT_EQ(statName, aclCounterNameGotStr); + if (hw->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::ACL_COUNTER_LABEL)) { + auto aclCounterNameGot = + SaiApiTable::getInstance()->aclApi().getAttribute( + AclCounterSaiId(aclCounterIdGot), + SaiAclCounterTraits::Attributes::Label()); + std::string aclCounterNameGotStr(aclCounterNameGot.data()); + EXPECT_EQ(statName, aclCounterNameGotStr); + } // Verify that only the configured 'types' (byte/packet) of counters are // configured. @@ -611,6 +619,10 @@ void checkAclStatDeleted( SaiAclEntryTraits::Attributes::ActionCounter()) .getData(); // Counter name must match what was previously configured + if (!hwSwitch->getPlatform()->getAsic()->isSupported( + HwAsic::Feature::ACL_COUNTER_LABEL)) { + continue; + } auto aclCounterNameGot = SaiApiTable::getInstance()->aclApi().getAttribute( AclCounterSaiId(aclCounterIdGot), SaiAclCounterTraits::Attributes::Label()); diff --git a/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp b/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp index 272b721ed24ac..f6e5e629a5227 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp @@ -11,6 +11,15 @@ namespace facebook { namespace fboss { namespace utility { +namespace { +SaiPortTraits::AdapterKey getPortAdapterKey(const HwSwitch* hw, PortID port) { + auto saiSwitch = static_cast(hw); + auto handle = saiSwitch->managerTable()->portManager().getPortHandle(port); + CHECK(handle); + return handle->port->adapterKey(); +} +} // namespace + void HwTestThriftHandler::injectFecError( std::unique_ptr> hwPorts, bool injectCorrectable) { @@ -62,6 +71,27 @@ void HwTestThriftHandler::injectFecError( std::make_unique(clientInfo)); } +void HwTestThriftHandler::getPortInfo( + ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, + std::unique_ptr<::std::vector<::std::int32_t>> portIds) { + for (const auto& portId : *portIds) { + PortInfo portInfo; + auto key = getPortAdapterKey(hwSwitch_, PortID(portId)); +#if SAI_API_VERSION >= SAI_VERSION(1, 12, 0) + SaiPortTraits::Attributes::PortLoopbackMode loopbackMode; + SaiApiTable::getInstance()->portApi().getAttribute(key, loopbackMode); + portInfo.loopbackMode() = loopbackMode.value(); +#else + SaiPortTraits::Attributes::InternalLoopbackMode internalLoopbackMode; + SaiApiTable::getInstance()->portApi().getAttribute( + key, internalLoopbackMode); + portInfo.loopbackMode() = internalLoopbackMode.value(); +#endif + portInfos.push_back(portInfo); + } + return; +} + } // namespace utility } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp new file mode 100644 index 0000000000000..643e6692347dc --- /dev/null +++ b/fboss/agent/hw/sai/hw_test/HwTestRouteUtilsThriftHandler.cpp @@ -0,0 +1,431 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/hw/test/HwTestThriftHandler.h" + +#include "fboss/agent/FbossError.h" +#include "fboss/agent/hw/sai/api/RouteApi.h" +#include "fboss/agent/hw/sai/api/SaiApiTable.h" +#include "fboss/agent/hw/sai/switch/SaiCounterManager.h" +#include "fboss/agent/hw/sai/switch/SaiManagerTable.h" +#include "fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.h" +#include "fboss/agent/hw/sai/switch/SaiSwitch.h" +#include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" +#include "fboss/agent/hw/sai/switch/SaiVirtualRouterManager.h" +#include "fboss/agent/types.h" + +using facebook::fboss::HwSwitch; +using facebook::fboss::RouterID; +using facebook::fboss::SaiApiTable; +using facebook::fboss::SaiNextHopTraitsT; +using facebook::fboss::SaiRouteTraits; +using facebook::fboss::SaiSwitch; +using facebook::fboss::SaiSwitchTraits; +using facebook::fboss::cfg::AclLookupClass; + +namespace { +bool isEgressToIp(folly::IPAddress addr, sai_object_id_t adapterKey) { + try { + auto ipAttr = SaiApiTable::getInstance()->nextHopApi().getAttribute( + static_cast(adapterKey), + SaiNextHopTraitsT::Attributes::Ip()); + return ipAttr == addr; + } catch (const facebook::fboss::SaiApiError&) { + return false; + } +} + +template +sai_object_id_t getNextHopId( + const HwSwitch* hwSwitch, + typename facebook::fboss::Route::Prefix prefix) { + auto saiSwitch = static_cast(hwSwitch); + // Query the nexthop ID given the route prefix + folly::IPAddress prefixNetwork{prefix.network()}; + folly::CIDRNetwork follyPrefix{prefixNetwork, prefix.mask()}; + auto virtualRouterHandle = + saiSwitch->managerTable()->virtualRouterManager().getVirtualRouterHandle( + RouterID(0)); + CHECK(virtualRouterHandle); + auto routeEntry = SaiRouteTraits::RouteEntry( + saiSwitch->getSaiSwitchId(), + virtualRouterHandle->virtualRouter->adapterKey(), + follyPrefix); + return SaiApiTable::getInstance()->routeApi().getAttribute( + routeEntry, SaiRouteTraits::Attributes::NextHopId()); +} + +template +facebook::fboss::NextHopSaiId getNextHopSaiId( + const facebook::fboss::HwSwitch* hwSwitch, + typename facebook::fboss::Route::Prefix prefix) { + return static_cast( + getNextHopId(hwSwitch, prefix)); +} + +facebook::fboss::NextHopSaiId getNextHopSaiIdForMember( + facebook::fboss::NextHopGroupMemberSaiId member) { + return static_cast( + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + member, + facebook::fboss::SaiNextHopGroupMemberTraits::Attributes:: + NextHopId{})); +} + +std::vector getNextHopMembers( + facebook::fboss::NextHopGroupSaiId group) { + auto members = SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + group, + facebook::fboss::SaiNextHopGroupTraits::Attributes::NextHopMemberList{}); + std::vector nexthops{}; + for (auto member : members) { + auto nexthop = getNextHopSaiIdForMember( + static_cast(member)); + nexthops.push_back(nexthop); + } + return nexthops; +} + +std::vector getNextHops(sai_object_id_t id) { + auto type = sai_object_type_query(id); + if (type == SAI_OBJECT_TYPE_NEXT_HOP) { + return {static_cast(id)}; + } + EXPECT_EQ(type, SAI_OBJECT_TYPE_NEXT_HOP_GROUP); + return getNextHopMembers(static_cast(id)); +} + +SaiRouteTraits::RouteEntry getSaiRouteAdapterKey( + const SaiSwitch* saiSwitch, + RouterID rid, + const folly::CIDRNetwork& prefix) { + auto virtualRouterHandle = + saiSwitch->managerTable()->virtualRouterManager().getVirtualRouterHandle( + rid); + if (!virtualRouterHandle) { + throw facebook::fboss::FbossError("No virtual router with id 0"); + } + + return SaiRouteTraits::RouteEntry( + saiSwitch->getSaiSwitchId(), + virtualRouterHandle->virtualRouter->adapterKey(), + prefix); +} + +std::optional getHwRouteClassID( + const HwSwitch* hw, + RouterID rid, + const folly::CIDRNetwork& prefix) { + const auto saiSwitch = static_cast(hw); + + try { + auto r = getSaiRouteAdapterKey(saiSwitch, rid, prefix); + auto metadata = SaiApiTable::getInstance()->routeApi().getAttribute( + r, SaiRouteTraits::Attributes::Metadata()); + return metadata == 0 ? std::nullopt : std::optional(metadata); + } catch (const std::exception& e) { + return std::nullopt; + } +} + +bool isHwRouteToCpu( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + try { + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + + facebook::fboss::SwitchSaiId switchId = + saiSwitch->managerTable()->switchManager().getSwitchSaiId(); + sai_object_id_t cpuPortId{ + SaiApiTable::getInstance()->switchApi().getAttribute( + switchId, SaiSwitchTraits::Attributes::CpuPort{})}; + + return nhop == cpuPortId; + } catch (const facebook::fboss::SaiApiError&) { + return false; + } +} + +bool isHwRouteHit( + [[maybe_unused]] const HwSwitch* hwSwitch, + [[maybe_unused]] RouterID /*rid*/, + [[maybe_unused]] const folly::CIDRNetwork& cidrNetwork) { + throw facebook::fboss::FbossError("L3 entry hitbit is unsupported for SAI"); +} + +void clearHwRouteHit( + [[maybe_unused]] const HwSwitch* hwSwitch, + [[maybe_unused]] RouterID /*rid*/, + [[maybe_unused]] const folly::CIDRNetwork& cidrNetwork) { + throw facebook::fboss::FbossError("L3 entry hitbit is unsupported for SAI"); +} + +bool isHwRouteMultiPath( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + try { + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + sai_object_id_t nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(nhop), + facebook::fboss::SaiNextHopGroupTraits::Attributes:: + NextHopMemberList{}); + } catch (const facebook::fboss::SaiApiError&) { + // its not next hop group + return false; + } + return true; +} + +bool isHwRouteToNextHop( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork, + folly::IPAddress ip, + std::optional weight) { + const auto saiSwitch = static_cast(hwSwitch); + auto classId = getHwRouteClassID(hwSwitch, rid, cidrNetwork); + if (classId.has_value() && + (AclLookupClass(classId.value()) == + AclLookupClass::DST_CLASS_L3_LOCAL_1 || + AclLookupClass(classId.value()) == + AclLookupClass::DST_CLASS_L3_LOCAL_2)) { + XLOG(DBG2) << "resolved route has class ID 1 or 2"; + return false; + } + + sai_object_id_t nhop; + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + try { + nhop = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + } catch (const facebook::fboss::SaiApiError&) { + return false; + } + + try { + auto members = SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(nhop), + facebook::fboss::SaiNextHopGroupTraits::Attributes:: + NextHopMemberList{}); + for (auto member : members) { + sai_object_id_t nextHopId = + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(member), + facebook::fboss::SaiNextHopGroupMemberTraits::Attributes:: + NextHopId{}); + if (!isEgressToIp(ip, nextHopId)) { + continue; + } + if (!weight) { + return true; + } + return weight.value() == + SaiApiTable::getInstance()->nextHopGroupApi().getAttribute( + static_cast(member), + facebook::fboss::SaiNextHopGroupMemberTraits::Attributes:: + Weight{}); + } + } catch (const facebook::fboss::SaiApiError&) { + return isEgressToIp(ip, nhop); + } + return false; +} + +bool isRoutePresent( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + try { + SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::NextHopId()); + } catch (const facebook::fboss::SaiApiError&) { + return false; + } + + return true; +} + +bool isRouteSetToDrop( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + const auto saiSwitch = static_cast(hwSwitch); + + auto routeAdapterKey = getSaiRouteAdapterKey(saiSwitch, rid, cidrNetwork); + auto packetAction = SaiApiTable::getInstance()->routeApi().getAttribute( + routeAdapterKey, SaiRouteTraits::Attributes::PacketAction()); + + return packetAction == SAI_PACKET_ACTION_DROP; +} + +bool isRouteUnresolvedToCpuClassId( + const HwSwitch* hwSwitch, + RouterID rid, + const folly::CIDRNetwork& cidrNetwork) { + auto classId = getHwRouteClassID(hwSwitch, rid, cidrNetwork); + return classId.has_value() && + facebook::fboss::cfg::AclLookupClass(classId.value()) == + facebook::fboss::cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2; +} + +// Verifies that the stack is programmed correctly. +// Reference count has no meaning in SAI and we assume that there always is a +// labelStack programmed for nexthop when this function is called. +template +bool verifyProgrammedStack( + const HwSwitch* hwSwitch, + typename facebook::fboss::Route::Prefix prefix, + const facebook::fboss::InterfaceID& intfID, + const facebook::fboss::LabelForwardingAction::LabelStack& stack, + long /* unused */) { + auto* saiSwitch = static_cast(hwSwitch); + auto& nextHopApi = SaiApiTable::getInstance()->nextHopApi(); + sai_object_id_t nexthopId = + static_cast(getNextHopSaiId(hwSwitch, prefix)); + auto nexthopIds = getNextHops(nexthopId); + auto intfHandle = saiSwitch->managerTable() + ->routerInterfaceManager() + .getRouterInterfaceHandle(intfID); + auto intfKey = intfHandle->adapterKey(); + bool found = false; + bool verified = true; + for (auto nextHopId : nexthopIds) { + auto intfObjId = nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::RouterInterfaceId()); + if (intfObjId != intfKey) { + continue; + } + found = true; + // If stack is empty, simply check if the labelStack is programmed + // If the stack is empty, check if the labelstack has a label with MPLS + // Else, check that the stacks match + if (stack.empty()) { + if (nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::Type()) != + SAI_NEXT_HOP_TYPE_IP) { + XLOG(DBG2) << "nexthop is not of type IP"; + verified = false; + } + } else { + if (nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::Type()) != + SAI_NEXT_HOP_TYPE_MPLS) { + XLOG(DBG2) << "nexthop is not of type MPLS"; + verified = false; + } + auto labelStack = nextHopApi.getAttribute( + nextHopId, + facebook::fboss::SaiMplsNextHopTraits::Attributes::LabelStack{}); + if (labelStack.size() != stack.size()) { + XLOG(DBG2) << "label stack size mismatch " << labelStack.size() << " " + << stack.size(); + verified = false; + } + for (int i = 0; i < labelStack.size(); i++) { + if (labelStack[i] != stack[i]) { + XLOG(DBG2) << "label stack mismatch " << labelStack[i] << " " + << stack[i]; + verified = false; + } + } + } + break; + } + XLOG(DBG2) << "found " << found << " verified " << verified; + return found && verified; +} + +} // namespace + +namespace facebook { +namespace fboss { +namespace utility { + +void HwTestThriftHandler::getRouteInfo( + RouteInfo& routeInfo, + std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + routeInfo.exists() = isRoutePresent(hwSwitch_, RouterID(0), routePrefix); + if (*routeInfo.exists() && + !isRouteSetToDrop(hwSwitch_, RouterID(0), routePrefix)) { + auto classID = getHwRouteClassID(hwSwitch_, RouterID(0), routePrefix); + if (classID.has_value()) { + routeInfo.classId() = classID.value(); + } + routeInfo.isProgrammedToCpu() = + isHwRouteToCpu(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isMultiPath() = + isHwRouteMultiPath(hwSwitch_, RouterID(0), routePrefix); + routeInfo.isRouteUnresolvedToClassId() = + isRouteUnresolvedToCpuClassId(hwSwitch_, RouterID(0), routePrefix); + } +} + +bool HwTestThriftHandler::isRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +void HwTestThriftHandler::clearRouteHit(std::unique_ptr prefix) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + clearHwRouteHit(hwSwitch_, RouterID(0), routePrefix); +} + +bool HwTestThriftHandler::isRouteToNexthop( + std::unique_ptr prefix, + std::unique_ptr nexthop) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + return isHwRouteToNextHop( + hwSwitch_, + RouterID(0), + routePrefix, + network::toIPAddress(*nexthop), + std::nullopt); +} + +bool HwTestThriftHandler::isProgrammedInHw( + int intfID, + std::unique_ptr prefix, + std::unique_ptr labelStack, + int refCount) { + auto routePrefix = folly::CIDRNetwork( + network::toIPAddress(*prefix->ip()), *prefix->prefixLength()); + if (routePrefix.first.isV4()) { + auto pfx = RoutePrefix{ + network::toIPAddress(*prefix->ip()).asV4(), + static_cast(*prefix->prefixLength())}; + return verifyProgrammedStack( + hwSwitch_, pfx, InterfaceID(intfID), *labelStack, refCount); + } else { + auto pfx = RoutePrefix{ + network::toIPAddress(*prefix->ip()).asV6(), + static_cast(*prefix->prefixLength())}; + return verifyProgrammedStack( + hwSwitch_, pfx, InterfaceID(intfID), *labelStack, refCount); + } + return true; +} + +} // namespace utility +} // namespace fboss +} // namespace facebook diff --git a/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp b/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp index ada7fe4bb2ec3..0cd4f49e7c94c 100644 --- a/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp +++ b/fboss/agent/hw/sai/hw_test/HwTestTamUtils.cpp @@ -100,6 +100,7 @@ void triggerParityError(HwSwitchEnsemble* ensemble) { case cfg::AsicType::ASIC_TYPE_MOCK: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: + case cfg::AsicType::ASIC_TYPE_CHENAB: XLOG(FATAL) << "Unsupported HwAsic: " << ensemble->getPlatform()->getAsic()->getAsicTypeStr(); case cfg::AsicType::ASIC_TYPE_RAMON: diff --git a/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp b/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp index 22aaa707c9e36..192e01a539469 100644 --- a/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp +++ b/fboss/agent/hw/sai/hw_test/SaiSwitchEnsemble.cpp @@ -78,7 +78,8 @@ SaiSwitchEnsemble::SaiSwitchEnsemble( std::unique_ptr SaiSwitchEnsemble::createThriftThread( const SaiSwitch* hwSwitch) { return std::make_unique([hwSwitch] { - FbossEventBase* eventBase = new FbossEventBase(); + FbossEventBase* eventBase = + new FbossEventBase("SaiSwitchEnsembleSignalHandler"); auto handler = std::make_shared(hwSwitch); auto server = setupThriftServer( *eventBase, handler, {FLAGS_thrift_port}, true /* setupSSL*/); diff --git a/fboss/agent/hw/sai/hw_test/hw_test.bzl b/fboss/agent/hw/sai/hw_test/hw_test.bzl deleted file mode 100644 index 4e4751e2e65d5..0000000000000 --- a/fboss/agent/hw/sai/hw_test/hw_test.bzl +++ /dev/null @@ -1,468 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "get_all_npu_impls", "get_link_group_map", "impl_category_suffix", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -def _sai_switch_ensemble(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - thrift_test_handler = sai_switch_dependent_name("thrift_test_handler", sai_impl, is_npu) - return cpp_library( - name = "{}".format(get_switch_ensemble_name(sai_impl, is_npu)), - srcs = [ - "HwSwitchEnsembleFactory.cpp", - "SaiSwitchEnsemble.cpp", - ], - # Link whole (--whole_archive), since ensemble may get used - # in contexts where we are just combining libs - e.g. a h/w - # switch agnostic benchmark lib and a sai_switch_ensemble to - # plugin the right ensemble. Without whole_archive, depending - # on the linking order symbols from sai_switch_ensemble which - # are needed by the hw switch agnostic benchmark lib maybe - # dropped. - link_whole = True, - exported_deps = [ - "//fboss/agent:core", - "//fboss/agent:setup_thrift", - "//fboss/agent/hw/test:hw_switch_ensemble_factory", - "//fboss/agent/test:linkstate_toggler", - "//fboss/agent/hw/sai/switch:{}".format( - switch_lib_name, - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - thrift_test_handler, - ), - "//fboss/agent/hw/test:config_factory", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, is_npu), - ), - "//folly/io/async:async_signal_handler", - ], - versions = to_versions(sai_impl), - ) - -def _sai_phy_capabilities(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = "{}".format(get_switch_phy_capabilities_name(sai_impl, is_npu)), - srcs = [ - "PhyCapabilities.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/test:phy_capabilities", - "//fboss/agent/hw/sai/switch:{}".format( - switch_lib_name, - ), - ], - versions = to_versions(sai_impl), - ) - -def get_switch_ensemble_name(sai_impl, is_npu): - return sai_switch_dependent_name("sai_switch_ensemble", sai_impl, is_npu) - -def _switch_ensembles(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _sai_switch_ensemble(sai_impl, is_npu) - -def get_switch_phy_capabilities_name(sai_impl, is_npu): - return sai_switch_dependent_name("sai_switch_phy_capabilities", sai_impl, is_npu) - -def _switch_phy_capabilities(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _sai_phy_capabilities(sai_impl, is_npu) - -def all_switch_ensembles(): - _switch_ensembles(is_npu = True) - _switch_ensembles(is_npu = False) - -def all_phy_capabilities(): - _switch_phy_capabilities(is_npu = True) - _switch_phy_capabilities(is_npu = False) - -def all_acl_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_acl_utils{}".format(impl_suffix), - srcs = [ - "HwTestAclUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/test/utils:queue_per_host_test_utils", - "//fboss/agent/hw/test:hw_test_acl_utils", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - ], - versions = to_versions(sai_impl), - ) - -def all_port_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_port_utils{}".format(impl_suffix), - srcs = [ - "HwTestPortUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_port_utils", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - ], - versions = to_versions(sai_impl), - ) - -def all_ecmp_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_ecmp_utils{}".format(impl_suffix), - srcs = [ - "HwTestEcmpUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_ecmp_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_fabric_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_fabric_utils{}".format(impl_suffix), - srcs = [ - "HwTestFabricUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_fabric_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_teflow_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_teflow_utils{}".format(impl_suffix), - srcs = [ - "HwTestTeFlowUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_te_flow_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_trunk_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_trunk_utils{}".format(impl_suffix), - srcs = [ - "HwTestTrunkUtils.cpp", - ], - headers = [ - "SaiSwitchEnsemble.h", - ], - exported_deps = [ - "//fboss/agent/hw/sai/diag:diag_lib", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/sai/switch:if-cpp2-types", - "//fboss/agent/hw/test:hw_test_trunk_utils", - "//fboss/agent/hw/test:config_factory", - "//fboss/agent/hw/sai/switch:if-cpp2-services", - ], - versions = to_versions(sai_impl), - ) - -def all_ptp_tc_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_ptp_tc_utils{}".format(impl_suffix), - srcs = [ - "HwTestPtpTcUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_ptp_tc_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_udf_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_udf_utils{}".format(impl_suffix), - srcs = [ - "HwTestUdfUtils.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_udf_utils", - ], - versions = to_versions(sai_impl), - ) - -def all_packet_trap_helper(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_packet_trap_helper{}".format(impl_suffix), - srcs = [ - "HwTestPacketTrapEntry.cpp", - ], - exported_deps = [ - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/test:hw_test_packet_trap_entry", - ], - versions = to_versions(sai_impl), - ) - -def all_copp_utils(): - all_impls = get_all_npu_impls() - for sai_impl in all_impls: - impl_suffix = to_impl_suffix(sai_impl) - switch_lib_name = sai_switch_lib_name(sai_impl, True) - cpp_library( - name = "sai_copp_utils{}".format(impl_suffix), - srcs = [ - "HwTestCoppUtils.cpp", - ], - link_whole = True, # T76171234 - exported_deps = [ - "//fboss/agent/hw/test:hw_copp_utils", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - ], - versions = to_versions(sai_impl), - ) - -def _sai_test_binary(sai_impl, is_npu): - test_deps = [ - "//fboss/agent/hw/sai/hw_test:{}".format(get_switch_ensemble_name(sai_impl, is_npu)), - "//fboss/agent/hw/test:hw_switch_test", - "//fboss/agent/hw/test:hw_test_main", - "//fboss/lib:ref_map", - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:{}".format(get_switch_phy_capabilities_name(sai_impl, is_npu)), - ] - binary_name = "sai_test{}-{}-{}".format(impl_category_suffix(is_npu), sai_impl.name, sai_impl.version) - return cpp_binary( - name = binary_name, - srcs = [ - "dataplane_tests/SaiAclTableGroupTrafficTests.cpp", - "HwTestEcmpUtils.cpp", - "HwTestFabricUtils.cpp", - "HwTestNeighborUtils.cpp", - "HwTestPtpTcUtils.cpp", - "HwVlanUtils.cpp", - "HwTestTamUtils.cpp", - "HwTestAclUtils.cpp", - "HwTestPfcUtils.cpp", - "HwTestAqmUtils.cpp", - "HwTestCoppUtils.cpp", - "HwTestUdfUtils.cpp", - "HwTestFlowletSwitchingUtils.cpp", - "HwTestMirrorUtils.cpp", - "HwTestMplsUtils.cpp", - "HwTestPortUtils.cpp", - "HwTestPacketTrapEntry.cpp", - "HwTestRouteUtils.cpp", - "HwTestTeFlowUtils.cpp", - "HwTestTrunkUtils.cpp", - "SaiAclTableTests.cpp", - "SaiAclTableGroupTests.cpp", - "SaiLinkStateRollbackTests.cpp", - "SaiNeighborRollbackTests.cpp", - "SaiNextHopGroupTest.cpp", - "SaiPortUtils.cpp", - "SaiPortAdminStateTests.cpp", - "SaiRollbackTest.cpp", - "SaiRouteRollbackTests.cpp", - "SaiQPHRollbackTests.cpp", - ], - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ], - deps = test_deps, - link_group_map = get_link_group_map(binary_name, sai_impl), - headers = [ - "SaiLinkStateDependentTests.h", - ], - versions = to_versions(sai_impl), - ) - -def _sai_multinode_test_binary(sai_impl): - test_deps = [ - "//fboss/agent/test:multinode_tests", - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_ecmp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_trunk_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_copp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_acl_utils", sai_impl, True), - ), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - binary_name = "sai_multinode_test-{}-{}".format(sai_impl.name, sai_impl.version) - return cpp_binary( - name = binary_name, - srcs = [ - "SaiMultiNodeTest.cpp", - ], - link_group_map = get_link_group_map(binary_name, sai_impl), - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def _sai_macsec_multinode_test_binary(sai_impl): - test_deps = [ - "//fboss/agent/test:macsec_multinode_tests", - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_ecmp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_trunk_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_copp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_acl_utils", sai_impl, True), - ), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - binary_name = "sai_macsec_multinode_test-{}-{}".format(sai_impl.name, sai_impl.version) - return cpp_binary( - name = binary_name, - srcs = [ - "SaiMultiNodeTest.cpp", - ], - link_group_map = get_link_group_map(binary_name, sai_impl), - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def all_test_binaries(): - for sai_impl in get_all_impls_for(True): - _sai_test_binary(sai_impl, True) - _sai_multinode_test_binary(sai_impl) - _sai_macsec_multinode_test_binary(sai_impl) - - for sai_impl in get_all_impls_for(False): - _sai_test_binary(sai_impl, False) - -def _test_handlers(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _test_handler(sai_impl, is_npu) - -def all_test_handlers(): - _test_handlers(is_npu = True) - _test_handlers(is_npu = False) - -def _test_handler(sai_impl, is_npu): - return cpp_library( - name = "{}".format(sai_switch_dependent_name("thrift_test_handler", sai_impl, is_npu)), - srcs = [ - "SaiTestHandler.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - ":if-cpp2-services", - "//fboss/agent/hw/sai/diag:{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - ], - versions = to_versions(sai_impl), - ) - -def _test_thrift_handlers(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - _test_thrift_handler(sai_impl, is_npu) - -def all_test_thrift_handlers(): - _test_thrift_handlers(is_npu = True) - -def _test_thrift_handler(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = "{}".format(sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, is_npu)), - srcs = [ - "HwTestAclUtilsThriftHandler.cpp", - "HwTestMirrorUtilsThriftHandler.cpp", - "HwTestNeighborUtilsThriftHandler.cpp", - "HwTestEcmpUtilsThriftHandler.cpp", - "HwTestPortUtilsThriftHandler.cpp", - "HwTestVoqSwitchUtilsThriftHandler.cpp", - "HwTestThriftHandler.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "//fboss/agent/test/utils:acl_test_utils", - "//fboss/agent/hw/test:hw_test_thrift_handler_h", - "//fboss/agent/if:agent_hw_test_ctrl-cpp2-services", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/hw/sai/hw_test:{}".format( - sai_switch_dependent_name("sai_ecmp_utils", sai_impl, True), - ), - "//fboss/agent/hw/sai/diag:{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - ], - versions = to_versions(sai_impl), - ) - -def all_test_libs(): - all_acl_utils() - all_ecmp_utils() - all_fabric_utils() - all_port_utils() - all_packet_trap_helper() - all_copp_utils() - all_ptp_tc_utils() - all_trunk_utils() - all_udf_utils() - all_teflow_utils() - all_test_thrift_handlers() diff --git a/fboss/agent/hw/sai/impl/impl.bzl b/fboss/agent/hw/sai/impl/impl.bzl deleted file mode 100644 index e88479d99b805..0000000000000 --- a/fboss/agent/hw/sai/impl/impl.bzl +++ /dev/null @@ -1,211 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load( - "//fboss:THIRD-PARTY-VERSIONS.bzl", - "NATIVE_IMPLS", - "SAI_BRCM_IMPLS", - "SAI_CREDO_IMPLS", - "SAI_FAKE_IMPLS", - "SAI_IMPLS", - "SAI_LEABA_IMPLS", - "SAI_PHY_IMPLS", - "SAI_VENDOR_IMPLS", - "to_impl_suffix", - "to_versions", -) - -# TODO: re-exporting since this lib has a bunch of deps. Will remove deps and directly ref THIRD-PARTY-VERSIONS -NATIVE_IMPLS = NATIVE_IMPLS -SAI_BRCM_IMPLS = SAI_BRCM_IMPLS -SAI_CREDO_IMPLS = SAI_CREDO_IMPLS -SAI_FAKE_IMPLS = SAI_FAKE_IMPLS -SAI_IMPLS = SAI_IMPLS -SAI_LEABA_IMPLS = SAI_LEABA_IMPLS -SAI_VENDOR_IMPLS = SAI_VENDOR_IMPLS -SAI_PHY_IMPLS = SAI_PHY_IMPLS -to_versions = to_versions -to_sai_versions = to_versions -to_impl_suffix = to_impl_suffix -to_sdk_suffix = to_impl_suffix - -# TODO: reuse to_impl_suffix here as well (missing a dash) -def to_impl_lib_name(sai_impl): - return "{}-{}".format( - sai_impl.name, - sai_impl.version, - ) - -def to_impl_bin_name(sai_impl, prefix): - return "{}-{}-{}".format( - prefix, - sai_impl.name, - sai_impl.version, - ) - -def impl_category_suffix(is_npu): - return "" if is_npu else "-phy" - -def to_impl_external_deps(sai_impl): - _external_deps_map = { - ("brcm-sai", "8.2.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "8.2.0.0_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "9.2.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "9.0_ea_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.0_ea_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.0_ea_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.0_ea_dnx_sim_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "10.2.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "11.0_ea_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "11.3.0.0_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "11.3.0.0_dnx_odp"): [("brcm-sai", None, "sai")], - ("brcm-sai", "12.0_ea_dnx_odp"): [("brcm-sai", None, "sai")], - ("CredoB52SAI", "0.7.2"): [("CredoB52SAI", None, "saiowl")], - ("CredoB52SAI", "0.8.4"): [("CredoB52SAI", None, "saiowl")], - ("fake", "1.14.0"): [("sai", None)], - ("leaba-sdk", "1.42.8"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.4.90"): [("leaba-sdk", None, "dyn-sai"), ("leaba-sdk", None, "dyn-sdk")], - ("leaba-sdk", "24.4.90_yuba"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.6.1_yuba"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.7.0_yuba"): [("leaba-sdk", None, "sai-sdk")], - ("leaba-sdk", "24.8.3001"): [("leaba-sdk", None, "dyn-sai"), ("leaba-sdk", None, "dyn-sdk")], - } - return _external_deps_map[(sai_impl.sdk_name, sai_impl.version)] - -def _get_fake_impls(): - fake_impls = [] - for fake_impl in SAI_FAKE_IMPLS: - fake_impls.extend([fake_impl]) - return fake_impls - -def get_all_impls(): - all_impls = [] - all_impls.extend(_get_fake_impls()) - for sai_impl in SAI_VENDOR_IMPLS: - all_impls.extend([sai_impl]) - return all_impls - -def get_all_npu_impls(): - return _get_fake_impls() + [ - sai_impl - for sai_impl in SAI_BRCM_IMPLS + SAI_LEABA_IMPLS - ] - -def get_all_phy_impls(): - return [sai_impl for sai_impl in SAI_PHY_IMPLS] + _get_fake_impls() - -def get_all_native_phy_impls(): - return [impl for impl in NATIVE_IMPLS] - -def get_all_impls_for(npu): - return get_all_npu_impls() if npu else get_all_phy_impls() - -def sai_fake_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "//fboss/agent/hw/sai/fake:fake_sai", - ], - ) for sai_impl in SAI_FAKE_IMPLS] - -def sai_leaba_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - linker_flags = [ - # When we use the leaba python debug shell, it will dynamically - # load a shared library built with SWIG. We need that library - # to consider the symbols it depends on resolved so that it - # doesn't load them again. - # see: - # https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html - # for more details - "--export-dynamic", - ], - exported_deps = [ - "//fboss/agent/hw/sai/tracer:sai_tracer{}".format(to_impl_suffix(sai_impl)), - ], - ) for sai_impl in SAI_LEABA_IMPLS] - -def get_link_group_map(binary_name, sai_impl): - if sai_impl.is_dyn: - shared_libs = [] - for (_, _, libname) in to_impl_external_deps(sai_impl): - shared_libs.append(("fbcode//third-party-buck/platform010-compat/build/{}/{}:{}".format(sai_impl.name, sai_impl.version, libname), "node", None, "shared")) - return [ - ( - binary_name, - shared_libs, - ), - ] - else: - return [] - -def sai_brcm_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - linker_flags = [ - # Brcm SDK ISSU needs these flags when linking with DLL library - "--export-dynamic", - ], - exported_deps = [ - "//fboss/agent/hw/sai/tracer:sai_tracer{}".format(to_impl_suffix(sai_impl)), - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) for sai_impl in SAI_BRCM_IMPLS] - -def sai_credo_impl_lib(): - return [cpp_library( - name = to_impl_lib_name(sai_impl), - srcs = [ - ], - link_whole = True, - exported_deps = [ - "//fboss/agent/hw/sai/tracer:sai_tracer{}".format(to_impl_suffix(sai_impl)), - ], - auto_headers = AutoHeaders.SOURCES, - ) for sai_impl in SAI_CREDO_IMPLS] - -def sai_impl_libs(): - sai_fake_impl_lib() - sai_leaba_impl_lib() - sai_brcm_impl_lib() - sai_credo_impl_lib() - -def _sai_impl_version_lib(sai_impl, srcs = []): - external_deps = to_impl_external_deps(sai_impl) - if not srcs: - srcs = ["util.cpp", "facebook/{}/version.cpp".format(sai_impl.name)] - return cpp_library( - name = "{}-version".format(to_impl_lib_name(sai_impl)), - srcs = srcs, - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "fbsource//third-party/fmt:fmt", - ":impl-version", - ], - exported_external_deps = external_deps + ["re2", "glog"], - ) - -def sai_impl_version_libs(): - cpp_library( - name = "impl-version", - srcs = [ - ], - headers = [ - "util.h", - "version.h", - ], - ) - for sai_impl in SAI_IMPLS: - if (sai_impl.name == "fake"): - _sai_impl_version_lib(sai_impl, ["version.cpp"]) - else: - _sai_impl_version_lib(sai_impl, []) diff --git a/fboss/agent/hw/sai/store/SaiObject.cpp b/fboss/agent/hw/sai/store/SaiObject.cpp index 00acc1012e353..6abb8fab5b170 100644 --- a/fboss/agent/hw/sai/store/SaiObject.cpp +++ b/fboss/agent/hw/sai/store/SaiObject.cpp @@ -222,5 +222,17 @@ SaiObject::follyDynamicToAdapterHostKey( folly::dynamic json) { return json.asString(); } + +template <> +folly::dynamic SaiObject::adapterHostKeyToFollyDynamic() { + return adapterHostKey_; +} + +template <> +typename SaiUdfGroupTraits::AdapterHostKey +SaiObject::follyDynamicToAdapterHostKey( + folly::dynamic json) { + return json.asString(); +} } // namespace fboss } // namespace facebook diff --git a/fboss/agent/hw/sai/store/SaiStore.h b/fboss/agent/hw/sai/store/SaiStore.h index 7e43c5b49bd2a..6ca2abaa9cc91 100644 --- a/fboss/agent/hw/sai/store/SaiStore.h +++ b/fboss/agent/hw/sai/store/SaiStore.h @@ -47,6 +47,10 @@ template <> struct AdapterHostKeyWarmbootRecoverable : std::false_type { }; +template <> +struct AdapterHostKeyWarmbootRecoverable : std::false_type { +}; + #if defined(BRCM_SAI_SDK_XGS_AND_DNX) template <> struct AdapterHostKeyWarmbootRecoverable : std::false_type {}; @@ -441,6 +445,12 @@ class SaiObjectStore { // state. return ObjectType(key); } + if constexpr (std::is_same_v) { + // UDF groups are similar to ACL tables above where adapterHostKey is + // a string. This if condition is strictly not required and here only + // to allow build + return ObjectType(key, SaiUdfGroupTraits::AdapterHostKey{"udfGroup"}); + } #if defined(BRCM_SAI_SDK_XGS) if constexpr (std::is_same_v) { // Allow warm boot from version which doesn't save ahk @@ -624,10 +634,15 @@ class SaiStore { SaiObjectStore, SaiObjectStore, SaiObjectStore, + SaiObjectStore, SaiObjectStore, SaiObjectStore, +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + SaiObjectStore, +#endif SaiObjectStore, - SaiObjectStore, + SaiObjectStore, + SaiObjectStore, SaiObjectStore, SaiObjectStore, SaiObjectStore, diff --git a/fboss/agent/hw/sai/store/store.bzl b/fboss/agent/hw/sai/store/store.bzl deleted file mode 100644 index 5cbb8d80ec922..0000000000000 --- a/fboss/agent/hw/sai/store/store.bzl +++ /dev/null @@ -1,39 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls", "to_impl_suffix", "to_versions") - -def _sai_store_lib(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - return cpp_library( - name = "sai_store{}".format(impl_suffix), - srcs = [ - "SaiObjectEventPublisher.cpp", - "SaiObject.cpp", - "SaiStore.cpp", - ], - undefined_symbols = True, - headers = [ - "LoggingUtil.h", - "SaiObject.h", - "SaiObjectEventPublisher.h", - "SaiObjectEventSubscriber.h", - "SaiObjectEventSubscriber-defs.h", - "SaiObjectWithCounters.h", - "SaiStore.h", - "Traits.h", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "fbsource//third-party/fmt:fmt", - "//fboss/agent/hw/sai/api:sai_api{}".format(impl_suffix), - "//fboss/lib:ref_map", - "//fboss/lib:tuple_utils", - "//folly:singleton", - ], - versions = to_versions(sai_impl), - ) - -def sai_store_lib(): - all_impls = get_all_impls() - for sai_impl in all_impls: - _sai_store_lib(sai_impl) diff --git a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp index 3ef8e47f5ab15..815e57886f94d 100644 --- a/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/BufferStoreTest.cpp @@ -38,32 +38,48 @@ class BufferStoreTest : public SaiStoreTest { } SaiBufferProfileTraits::CreateAttributes createProfileAttrs( - BufferPoolSaiId _pool) const { + BufferPoolSaiId _pool, + bool dynamic = true) const { SaiBufferProfileTraits::Attributes::PoolId pool{_pool}; std::optional reservedBytes{42}; - std::optional mode{ - SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; + std::optional mode; std::optional - dynamicThresh{24}; + dynamicThresh{0}; + std::optional + staticThresh{0}; std::optional xoffTh{293624}; std::optional xonTh{0}; std::optional xonOffsetTh{ 4826}; + if (dynamic) { + dynamicThresh = 24; + mode = SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC; + } else { + staticThresh = 34; + mode = SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC; + } return SaiBufferProfileTraits::CreateAttributes{ pool, reservedBytes, mode, dynamicThresh, + staticThresh, xoffTh, xonTh, xonOffsetTh, + std::nullopt, + std::nullopt, + std::nullopt, + std::nullopt, std::nullopt}; } - BufferProfileSaiId createBufferProfile(BufferPoolSaiId _pool) { + BufferProfileSaiId createBufferProfile( + BufferPoolSaiId _pool, + bool dynamic = true) { auto& bufferApi = saiApiTable->bufferApi(); return bufferApi.create( - createProfileAttrs(_pool), 0); + createProfileAttrs(_pool, dynamic), 0); } SaiIngressPriorityGroupTraits::CreateAttributes createIngressPriorityGroupAttrs(BufferProfileSaiId profileId) const { @@ -113,6 +129,19 @@ TEST_F(BufferStoreTest, loadBufferProfile) { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC); } +TEST_F(BufferStoreTest, loadStaticBufferProfile) { + auto poolId = createBufferPool(); + auto profileId = createBufferProfile(poolId, false /* dynamic */); + SaiStore s(0); + s.reload(); + auto& store = s.get(); + auto got = store.get(createProfileAttrs(poolId, false /* dynamic */)); + EXPECT_EQ(got->adapterKey(), profileId); + EXPECT_EQ( + GET_OPT_ATTR(BufferProfile, ThresholdMode, got->attributes()), + SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC); +} + TEST_F(BufferStoreTest, loadBufferPoolFromJson) { auto poolId = createBufferPool(); SaiStore s(0); @@ -148,6 +177,22 @@ TEST_F(BufferStoreTest, loadBufferProfileFromJson) { SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC); } +TEST_F(BufferStoreTest, loadStaticBufferProfileFromJson) { + auto poolId = createBufferPool(); + auto profileId = createBufferProfile(poolId, false /* dynamic */); + SaiStore s(0); + s.reload(); + auto json = s.adapterKeysFollyDynamic(); + SaiStore s2(0); + s2.reload(&json); + auto& store = s2.get(); + auto got = store.get(createProfileAttrs(poolId, false /* dynamic */)); + EXPECT_EQ(got->adapterKey(), profileId); + EXPECT_EQ( + GET_OPT_ATTR(BufferProfile, ThresholdMode, got->attributes()), + SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC); +} + TEST_F(BufferStoreTest, bufferPoolLoadCtor) { auto poolId = createBufferPool(); SaiObject obj = createObj(poolId); @@ -164,6 +209,15 @@ TEST_F(BufferStoreTest, bufferProfileLoadCtor) { EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); } +TEST_F(BufferStoreTest, staticBufferProfileLoadCtor) { + auto poolId = createBufferPool(); + auto profileId = createBufferProfile(poolId, false /* dynamic */); + SaiObject obj = + createObj(profileId); + EXPECT_EQ(obj.adapterKey(), profileId); + EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); +} + TEST_F(BufferStoreTest, bufferPoolCreateCtor) { auto c = createPoolAttrs(); SaiBufferPoolTraits::AdapterHostKey k = tupleProjection< @@ -180,6 +234,13 @@ TEST_F(BufferStoreTest, bufferProfileCreateCtor) { EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); } +TEST_F(BufferStoreTest, staticBufferProfileCreateCtor) { + auto c = createProfileAttrs(createBufferPool(), false /* dynamic */); + SaiObject obj = + createObj(c, c, 0); + EXPECT_EQ(GET_OPT_ATTR(BufferProfile, ReservedBytes, obj.attributes()), 42); +} + TEST_F(BufferStoreTest, serDeserBufferPool) { auto poolId = createBufferPool(); verifyAdapterKeySerDeser({poolId}); diff --git a/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp b/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp index f80cdd9e062b6..1babf7f64c2ed 100644 --- a/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/PortStoreTest.cpp @@ -35,6 +35,7 @@ class PortStoreTest : public SaiStoreTest { #endif std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, + std::nullopt, // TAM object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet @@ -72,6 +73,9 @@ class PortStoreTest : public SaiStoreTest { std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index d0b4e6c4ab45a..67ddb9bef67df 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -1,5 +1,7 @@ // Copyright 2004-present Facebook. All Rights Reserved. +#include + #include "fboss/agent/hw/sai/api/TamApi.h" #include "fboss/agent/hw/sai/fake/FakeSai.h" #include "fboss/agent/hw/sai/store/SaiObject.h" @@ -14,6 +16,42 @@ class TamStoreTest : public SaiStoreTest { SaiStoreTest::SetUp(); } + const folly::IPAddress kTamCollectorSrcIpV4{"1.1.1.1"}; + const folly::IPAddress kTamCollectorDstIpV4{"2.2.2.2"}; + const folly::IPAddress kTamCollectorSrcIpV6{"2401::1"}; + const folly::IPAddress kTamCollectorDstIpV6{"2401::2"}; + + facebook::fboss::SaiTamCollectorTraits::CreateAttributes tamCollectorTraits( + facebook::fboss::TamTransportSaiId transportId, + bool ipV4) { + SaiTamCollectorTraits::CreateAttributes result; + std::get(result) = + ipV4 ? kTamCollectorSrcIpV4 : kTamCollectorSrcIpV6; + std::get(result) = + ipV4 ? kTamCollectorDstIpV4 : kTamCollectorDstIpV6; + std::get>( + result) = 128; + std::get(result) = + SaiTamCollectorTraits::Attributes::Transport{transportId}; + std::get>( + result) = 0; + return result; + } + + facebook::fboss::SaiTamTransportTraits::AdapterHostKey tamTransportTraits() { + SaiTamTransportTraits::AdapterHostKey result; + std::get(result) = + SAI_TAM_TRANSPORT_TYPE_UDP; + std::get(result) = 10001; + std::get(result) = 10002; + std::get(result) = 1500; + std::get>( + result) = folly::MacAddress("00:00:00:00:00:01"); + std::get>( + result) = folly::MacAddress("00:00:00:00:00:02"); + return result; + } + facebook::fboss::SaiTamReportTraits::CreateAttributes tamReportTraits() { return SaiTamReportTraits::CreateAttributes{ SAI_TAM_REPORT_TYPE_VENDOR_EXTN}; @@ -30,13 +68,30 @@ class TamStoreTest : public SaiStoreTest { std::vector collectors{SAI_NULL_OBJECT_ID}; std::vector eventTypes{1, 2, 3, 4}; + sai_int32_t deviceId = 0; + sai_int32_t eventId = 1; + std::vector extensionsCollectorList{10}; + std::vector packetDropTypeMmu = {3, 4}; + sai_object_id_t agingGroup = 20; + SaiTamEventTraits::CreateAttributes result; std::get(result) = SAI_TAM_EVENT_TYPE_PACKET_DROP; std::get(result) = actions; std::get(result) = collectors; - std::get(result) = - eventTypes; + std::get>( + result) = eventTypes; + std::get>(result) = + deviceId; + std::get>( + result) = eventId; + std::get< + std::optional>( + result) = extensionsCollectorList; + std::get>( + result) = packetDropTypeMmu; + std::get>(result) = + agingGroup; return result; } @@ -48,6 +103,18 @@ class TamStoreTest : public SaiStoreTest { return SaiTamTraits::CreateAttributes{events, bindpoints}; } + facebook::fboss::TamCollectorSaiId createCollector( + facebook::fboss::TamTransportSaiId transportId, + bool ipV4) { + return saiApiTable->tamApi().create( + tamCollectorTraits(transportId, ipV4), ipV4 ? 0 : 1); + } + + facebook::fboss::TamTransportSaiId createTransport() { + return saiApiTable->tamApi().create( + tamTransportTraits(), 0); + } + facebook::fboss::TamReportSaiId createReport() { return saiApiTable->tamApi().create( tamReportTraits(), 0); @@ -70,6 +137,9 @@ class TamStoreTest : public SaiStoreTest { }; TEST_F(TamStoreTest, loadTam) { + auto transport = createTransport(); + auto collectorV4 = createCollector(transport, true /* ipV4 */); + auto collectorV6 = createCollector(transport, false /* ipV4 */); auto report = createReport(); auto action = createEventAction(report); auto event = createEvent(action); @@ -78,10 +148,21 @@ TEST_F(TamStoreTest, loadTam) { SaiStore s(0); s.reload(); + auto& collectorStore = s.get(); + auto& transportStore = s.get(); auto& reportStore = s.get(); auto& actionStore = s.get(); auto& eventStore = s.get(); auto& tamStore = s.get(); + EXPECT_EQ( + collectorStore.get(tamCollectorTraits(transport, true /* ipV4 */)) + ->adapterKey(), + collectorV4); + EXPECT_EQ( + collectorStore.get(tamCollectorTraits(transport, false /* ipV4 */)) + ->adapterKey(), + collectorV6); + EXPECT_EQ(transportStore.get(tamTransportTraits())->adapterKey(), transport); EXPECT_EQ( reportStore .get(SaiTamReportTraits::AdapterHostKey{ @@ -97,11 +178,99 @@ TEST_F(TamStoreTest, loadTam) { } TEST_F(TamStoreTest, tamCtors) { + auto transport = createTransport(); + auto collectorV4 = createCollector(transport, true /* ipV4 */); + auto collectorV6 = createCollector(transport, false /* ipV4 */); auto report = createReport(); auto action = createEventAction(report); auto event = createEvent(action); auto tam = createTam(event); + auto transportObj = createObj(transport); + auto tamTransportAhk = tamTransportTraits(); + EXPECT_EQ( + GET_ATTR(TamTransport, Type, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, SrcPort, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, DstPort, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, Mtu, transportObj.attributes()), + std::get(tamTransportAhk) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, SrcMacAddress, transportObj.attributes()), + std::get>( + tamTransportAhk) + .value() + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, DstMacAddress, transportObj.attributes()), + std::get>( + tamTransportAhk) + .value() + .value()); + + auto collectorObjV4 = createObj(collectorV4); + auto tamCollectorAhkV4 = tamCollectorTraits(transport, true /* ipV4 */); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorObjV4.attributes()), + std::get(tamCollectorAhkV4) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorObjV4.attributes()), + std::get(tamCollectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorObjV4.attributes()), + std::get>( + tamCollectorAhkV4) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorObjV4.attributes()), + std::get(tamCollectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorObjV4.attributes()), + std::get>( + tamCollectorAhkV4) + .value() + .value()); + + auto collectorObjV6 = createObj(collectorV6); + auto tamCollectorAhkV6 = tamCollectorTraits(transport, false /* ipV6 */); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorObjV6.attributes()), + std::get(tamCollectorAhkV6) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorObjV6.attributes()), + std::get(tamCollectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorObjV6.attributes()), + std::get>( + tamCollectorAhkV6) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorObjV6.attributes()), + std::get(tamCollectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorObjV6.attributes()), + std::get>( + tamCollectorAhkV6) + .value() + .value()); + auto reportObj = createObj(report); EXPECT_EQ( GET_ATTR(TamReport, Type, reportObj.attributes()), @@ -124,8 +293,10 @@ TEST_F(TamStoreTest, tamCtors) { std::get(tamEventAhk) .value()); EXPECT_EQ( - GET_ATTR(TamEvent, SwitchEventType, eventObj.attributes()), - std::get(tamEventAhk) + GET_OPT_ATTR(TamEvent, SwitchEventType, eventObj.attributes()), + std::get>( + tamEventAhk) + .value() .value()); auto tamObj = createObj(tam); @@ -141,6 +312,95 @@ TEST_F(TamStoreTest, tamCtors) { TEST_F(TamStoreTest, setObject) { SaiStore s(0); s.reload(); + + auto transportAhk = tamTransportTraits(); + auto transport = + s.get().setObject(transportAhk, transportAhk); + EXPECT_EQ( + GET_ATTR(TamTransport, Type, transport->attributes()), + std::get(transportAhk).value()); + EXPECT_EQ( + GET_ATTR(TamTransport, SrcPort, transport->attributes()), + std::get(transportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, DstPort, transport->attributes()), + std::get(transportAhk) + .value()); + EXPECT_EQ( + GET_ATTR(TamTransport, Mtu, transport->attributes()), + std::get(transportAhk).value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, SrcMacAddress, transport->attributes()), + std::get>( + transportAhk) + .value() + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamTransport, DstMacAddress, transport->attributes()), + std::get>( + transportAhk) + .value() + .value()); + + auto collectorAhkV4 = + tamCollectorTraits(transport->adapterKey(), true /* ipV4 */); + auto collectorV4 = + s.get().setObject(collectorAhkV4, collectorAhkV4); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorV4->attributes()), + std::get(collectorAhkV4) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorV4->attributes()), + std::get(collectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorV4->attributes()), + std::get>( + collectorAhkV4) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorV4->attributes()), + std::get(collectorAhkV4) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorV4->attributes()), + std::get>( + collectorAhkV4) + .value() + .value()); + + auto collectorAhkV6 = + tamCollectorTraits(transport->adapterKey(), false /* ipV6 */); + auto collectorV6 = + s.get().setObject(collectorAhkV6, collectorAhkV6); + EXPECT_EQ( + GET_ATTR(TamCollector, SrcIp, collectorV6->attributes()), + std::get(collectorAhkV6) + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, DstIp, collectorV6->attributes()), + std::get(collectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, TruncateSize, collectorV6->attributes()), + std::get>( + collectorAhkV6) + .value() + .value()); + EXPECT_EQ( + GET_ATTR(TamCollector, Transport, collectorV6->attributes()), + std::get(collectorAhkV6) + .value()); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, collectorV6->attributes()), + std::get>( + collectorAhkV6) + .value() + .value()); + auto reportKey = tamReportTraits(); auto report = s.get().setObject(reportKey, reportKey); EXPECT_EQ( @@ -167,8 +427,10 @@ TEST_F(TamStoreTest, setObject) { GET_ATTR(TamEvent, CollectorList, event->attributes()), std::get(eventAhk).value()); EXPECT_EQ( - GET_ATTR(TamEvent, SwitchEventType, event->attributes()), - std::get(eventAhk) + GET_OPT_ATTR(TamEvent, SwitchEventType, event->attributes()), + std::get>( + eventAhk) + .value() .value()); auto tamAhk = tamTraits(event->adapterKey()); @@ -194,14 +456,51 @@ TEST_F(TamStoreTest, updateObject) { auto eventAhk = tamEventTraits(action->adapterKey()); auto event = s.get().setObject(eventAhk, eventAhk); + auto transportAhk = tamTransportTraits(); + auto transport = + s.get().setObject(transportAhk, transportAhk); + + auto collectorAhkV4 = + tamCollectorTraits(transport->adapterKey(), true /* ipV4 */); + auto collectorV4 = + s.get().setObject(collectorAhkV4, collectorAhkV4); + + auto collectorAhkV6 = + tamCollectorTraits(transport->adapterKey(), false /* ipV4 */); + auto collectorV6 = + s.get().setObject(collectorAhkV6, collectorAhkV6); + auto tamAhk = tamTraits(event->adapterKey()); auto tam = s.get().setObject(tamAhk, tamAhk); std::vector newEvents = {4, 5, 6}; - std::get(eventAhk) = - newEvents; + std::get>( + eventAhk) = newEvents; auto updatedEvent = s.get().setObject(eventAhk, eventAhk); EXPECT_EQ( - GET_ATTR(TamEvent, SwitchEventType, updatedEvent->attributes()), + GET_OPT_ATTR(TamEvent, SwitchEventType, updatedEvent->attributes()), newEvents); + + std::get(transportAhk) = 10003; + auto updatedTransport = + s.get().setObject(transportAhk, transportAhk); + EXPECT_EQ( + GET_ATTR(TamTransport, DstPort, updatedTransport->attributes()), 10003); + + std::get>( + collectorAhkV4) = 256; + auto updatedCollectorV4 = + s.get().setObject(collectorAhkV4, collectorAhkV4); + EXPECT_EQ( + GET_OPT_ATTR( + TamCollector, TruncateSize, updatedCollectorV4->attributes()), + 256); + + std::get>( + collectorAhkV6) = 2; + auto updatedCollectorV6 = + s.get().setObject(collectorAhkV6, collectorAhkV6); + EXPECT_EQ( + GET_OPT_ATTR(TamCollector, DscpValue, updatedCollectorV6->attributes()), + 2); } diff --git a/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp b/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp index 4d789d451e1ed..baf2b5c6f5035 100644 --- a/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/UdfStoreTest.cpp @@ -18,12 +18,19 @@ using namespace facebook::fboss; class UdfStoreTest : public SaiStoreTest { public: - UdfGroupSaiId createUdfGroup( + SaiUdfGroupTraits::CreateAttributes createAttributes( sai_udf_group_type_t udfGroupType, sai_uint16_t udfGroupLength) { SaiUdfGroupTraits::Attributes::Type type{udfGroupType}; SaiUdfGroupTraits::Attributes::Length length{udfGroupLength}; - return saiApiTable->udfApi().create({type, length}, 0); + return {type, length}; + } + + UdfGroupSaiId createUdfGroup( + sai_udf_group_type_t udfGroupType, + sai_uint16_t udfGroupLength) { + return saiApiTable->udfApi().create( + createAttributes(udfGroupType, udfGroupLength), 0); } UdfMatchSaiId createUdfMatch( @@ -56,14 +63,6 @@ class UdfStoreTest : public SaiStoreTest { {udfMatchIdAttr, udfGroupIdAttr, baseAttr, offsetAttr}, 0); } - SaiUdfGroupTraits::AdapterHostKey udfGroupAdapterHostKey( - sai_udf_group_type_t udfGroupType, - sai_uint16_t udfGroupLength) { - SaiUdfGroupTraits::Attributes::Type type{udfGroupType}; - SaiUdfGroupTraits::Attributes::Length length{udfGroupLength}; - return SaiUdfGroupTraits::AdapterHostKey{type, length}; - } - SaiUdfMatchTraits::AdapterHostKey udfMatchAdapterHostKey( const std::pair& l2TypePair, const std::pair& l3TypePair, @@ -129,31 +128,52 @@ class UdfStoreTest : public SaiStoreTest { }; TEST_F(UdfStoreTest, loadUdfGroup) { - auto udfGroupId0 = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto udfGroupId1 = - createUdfGroup(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1); + auto udfGroupId = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); SaiStore s(0); s.reload(); auto& store = s.get(); - auto k0 = udfGroupAdapterHostKey(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto k1 = - udfGroupAdapterHostKey(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1); + SaiUdfGroupTraits::AdapterHostKey k{"udfGroup"}; - EXPECT_EQ(store.get(k0)->adapterKey(), udfGroupId0); - EXPECT_EQ(store.get(k1)->adapterKey(), udfGroupId1); + EXPECT_EQ(store.get(k)->adapterKey(), udfGroupId); +} + +TEST_F(UdfStoreTest, loadUdfGroup2) { + SaiUdfGroupTraits::AdapterHostKey k0{"udfGroup0"}; + SaiUdfGroupTraits::AdapterHostKey k1{"udfGroup1"}; + + SaiStore s(0); + auto& store = s.get(); + auto obj0 = store.setObject( + k0, createAttributes(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength())); + auto obj1 = store.setObject( + k1, createAttributes(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1)); + + EXPECT_EQ(store.get(k0)->adapterKey(), obj0->adapterKey()); + EXPECT_EQ(store.get(k1)->adapterKey(), obj1->adapterKey()); + + auto adapterKeys = s.adapterKeysFollyDynamic(); + auto adapterKeys2AdapterHostKeys = + s.adapterKeys2AdapterHostKeysFollyDynamic(); + SaiStore s1(0); + s1.reload(&adapterKeys, &adapterKeys2AdapterHostKeys); + auto& store1 = s.get(); + + EXPECT_EQ(store1.get(k0)->adapterKey(), obj0->adapterKey()); + EXPECT_EQ(store1.get(k1)->adapterKey(), obj1->adapterKey()); } TEST_F(UdfStoreTest, udfGroupCtor) { auto udfGroupId = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto obj = createObj(udfGroupId); + SaiUdfGroupTraits::AdapterHostKey k{"udfGroup"}; + auto obj = createObj(udfGroupId, k); EXPECT_EQ(obj.adapterKey(), udfGroupId); } TEST_F(UdfStoreTest, udfGroupCreateCtor) { SaiUdfGroupTraits::CreateAttributes c{ SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()}; - auto k = udfGroupAdapterHostKey(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); + SaiUdfGroupTraits::AdapterHostKey k{"udfGroup"}; auto obj = createObj(k, c, 0); EXPECT_EQ( GET_OPT_ATTR(UdfGroup, Type, obj.attributes()), SAI_UDF_GROUP_TYPE_HASH); @@ -223,17 +243,15 @@ TEST_F(UdfStoreTest, toStrUdfMatchStore) { TEST_F(UdfStoreTest, loadUdf) { auto udfMatchId0 = createUdfMatch(kL2Type(), kL3Type(), kL4DstPort()); auto udfMatchId1 = createUdfMatch(kL2Type2(), kL3Type2(), kL4DstPort2()); - auto udfGroupId0 = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); - auto udfGroupId1 = - createUdfGroup(SAI_UDF_GROUP_TYPE_GENERIC, kUdfGroupLength() + 1); - auto udfId0 = createUdf(udfMatchId0, udfGroupId0); - auto udfId1 = createUdf(udfMatchId1, udfGroupId1); + auto udfGroupId = createUdfGroup(SAI_UDF_GROUP_TYPE_HASH, kUdfGroupLength()); + auto udfId0 = createUdf(udfMatchId0, udfGroupId); + auto udfId1 = createUdf(udfMatchId1, udfGroupId); SaiStore s(0); s.reload(); auto& store = s.get(); - auto k0 = udfAdapterHostKey(udfMatchId0, udfGroupId0); - auto k1 = udfAdapterHostKey(udfMatchId1, udfGroupId1); + auto k0 = udfAdapterHostKey(udfMatchId0, udfGroupId); + auto k1 = udfAdapterHostKey(udfMatchId1, udfGroupId); EXPECT_EQ(store.get(k0)->adapterKey(), udfId0); EXPECT_EQ(store.get(k1)->adapterKey(), udfId1); diff --git a/fboss/agent/hw/sai/store/tests/store_test.bzl b/fboss/agent/hw/sai/store/tests/store_test.bzl deleted file mode 100644 index 90fc6d1e95ac3..0000000000000 --- a/fboss/agent/hw/sai/store/tests/store_test.bzl +++ /dev/null @@ -1,19 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_FAKE_IMPLS", "to_impl_lib_name", "to_impl_suffix") - -def store_unittest(name, srcs, supports_static_listing = True, deps = []): - for sai_impl in SAI_FAKE_IMPLS: - impl_suffix = to_impl_suffix(sai_impl) - cpp_unittest( - name = "{}-{}".format(name, sai_impl.name), - srcs = srcs, - supports_static_listing = supports_static_listing, - headers = [ - "SaiStoreTest.h", - ], - deps = [ - "fbsource//third-party/googletest:gtest", - "//fboss/agent/hw/sai/store:sai_store{}".format(impl_suffix), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ] + deps, - ) diff --git a/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp b/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp index 120e12260677d..670b4b57e3d1a 100644 --- a/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiAclTableManager.cpp @@ -743,26 +743,34 @@ AclEntrySaiId SaiAclTableManager::addAclEntry( std::optional fieldIcmpV6Code{ std::nullopt}; if (addedAclEntry->getIcmpType()) { - if (addedAclEntry->getProto()) { - if (addedAclEntry->getProto().value() == AclEntry::kProtoIcmp) { - fieldIcmpV4Type = SaiAclEntryTraits::Attributes::FieldIcmpV4Type{ + if ((addedAclEntry->getProto() && + addedAclEntry->getProto().value() == AclEntry::kProtoIcmp) || + (addedAclEntry->getEtherType() && + addedAclEntry->getEtherType().value() == cfg::EtherType::IPv4)) { + fieldIcmpV4Type = SaiAclEntryTraits::Attributes::FieldIcmpV4Type{ + AclEntryFieldU8(std::make_pair( + addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; + if (addedAclEntry->getIcmpCode()) { + fieldIcmpV4Code = SaiAclEntryTraits::Attributes::FieldIcmpV4Code{ AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; - if (addedAclEntry->getIcmpCode()) { - fieldIcmpV4Code = SaiAclEntryTraits::Attributes::FieldIcmpV4Code{ - AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; - } - } else if (addedAclEntry->getProto().value() == AclEntry::kProtoIcmpv6) { - fieldIcmpV6Type = SaiAclEntryTraits::Attributes::FieldIcmpV6Type{ + addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; + } + } else if ( + (addedAclEntry->getProto() && + addedAclEntry->getProto().value() == AclEntry::kProtoIcmpv6) || + (addedAclEntry->getEtherType() && + addedAclEntry->getEtherType().value() == cfg::EtherType::IPv6)) { + fieldIcmpV6Type = SaiAclEntryTraits::Attributes::FieldIcmpV6Type{ + AclEntryFieldU8(std::make_pair( + addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; + if (addedAclEntry->getIcmpCode()) { + fieldIcmpV6Code = SaiAclEntryTraits::Attributes::FieldIcmpV6Code{ AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpType().value(), kIcmpTypeMask))}; - if (addedAclEntry->getIcmpCode()) { - fieldIcmpV6Code = SaiAclEntryTraits::Attributes::FieldIcmpV6Code{ - AclEntryFieldU8(std::make_pair( - addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; - } + addedAclEntry->getIcmpCode().value(), kIcmpCodeMask))}; } + } else { + throw FbossError( + "proto or etherType not sepcified in ACL when matching icmp type/code"); } } @@ -1410,6 +1418,8 @@ std::set SaiAclTableManager::getSupportedQualifierSet() platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3; bool isTomahawk5 = platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_TOMAHAWK5; + bool isChenab = + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB; if (isTajo) { std::set tajoQualifiers = { @@ -1482,6 +1492,24 @@ std::set SaiAclTableManager::getSupportedQualifierSet() cfg::AclTableQualifier::DST_MAC, cfg::AclTableQualifier::BTH_OPCODE}; return jericho3Qualifiers; + } else if (isChenab) { + /* TODO(pshaikh): review the qualifiers */ + std::set chenabQualifiers = { + cfg::AclTableQualifier::SRC_IPV6, + cfg::AclTableQualifier::DST_IPV6, + cfg::AclTableQualifier::SRC_IPV4, + cfg::AclTableQualifier::DST_IPV4, + cfg::AclTableQualifier::L4_SRC_PORT, + cfg::AclTableQualifier::L4_DST_PORT, + cfg::AclTableQualifier::IP_PROTOCOL, + cfg::AclTableQualifier::SRC_PORT, + cfg::AclTableQualifier::DSCP, + cfg::AclTableQualifier::TTL, + cfg::AclTableQualifier::OUTER_VLAN, + // TODO(pshaikh): Add UDF? + }; + + return chenabQualifiers; } else { std::set bcmQualifiers = { cfg::AclTableQualifier::SRC_IPV6, diff --git a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp index dfb5237ab6282..a6bd97742288c 100644 --- a/fboss/agent/hw/sai/switch/SaiBufferManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiBufferManager.cpp @@ -51,6 +51,9 @@ void assertMaxBufferPoolSize(const SaiPlatform* platform) { if (asic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { return; } + if (asic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_CHENAB) { + return; + } auto availableBuffer = getSwitchEgressPoolAvailableSize(platform); auto maxEgressPoolSize = SaiBufferManager::getMaxEgressPoolBytes(platform); switch (asic->getAsicType()) { @@ -61,6 +64,7 @@ void assertMaxBufferPoolSize(const SaiPlatform* platform) { case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_RAMON: case cfg::AsicType::ASIC_TYPE_RAMON3: + case cfg::AsicType::ASIC_TYPE_CHENAB: XLOG(FATAL) << " Not supported"; break; case cfg::AsicType::ASIC_TYPE_FAKE: @@ -101,6 +105,8 @@ uint64_t SaiBufferManager::getMaxEgressPoolBytes(const SaiPlatform* platform) { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: + /* TODO(pshaikh): Chenab, define pool size */ return asic->getMMUSizeBytes(); case cfg::AsicType::ASIC_TYPE_TOMAHAWK: { auto constexpr kNumXpes = 4; @@ -505,13 +511,27 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( SaiBufferProfileTraits::Attributes::ThresholdMode mode{ SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynThresh{0}; - if (platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported() && + SaiBufferProfileTraits::Attributes::SharedStaticThreshold staticThresh{0}; + if (queue.getSharedBytes()) { + // If staticBytes is explicitly set, then apply the queue limit! + staticThresh = queue.getSharedBytes().value(); + mode = SAI_BUFFER_PROFILE_THRESHOLD_MODE_STATIC; + } else if ( + platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported() && queue.getScalingFactor()) { dynThresh = platform_->getAsic()->getBufferDynThreshFromScalingFactor( queue.getScalingFactor().value()); } std::optional sharedFadtMaxTh; + std::optional + sharedFadtMinTh{}; + std::optional + sramFadtMaxTh{}; + std::optional + sramFadtMinTh{}; + std::optional + sramFadtXonOffset{}; #if defined(BRCM_SAI_SDK_DNX_GTE_11_0) if (queue.getMaxDynamicSharedBytes()) { sharedFadtMaxTh = queue.getMaxDynamicSharedBytes().value(); @@ -519,9 +539,33 @@ SaiBufferProfileTraits::CreateAttributes SaiBufferManager::profileCreateAttrs( // use default value 0 sharedFadtMaxTh = 0; } +#endif +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + // Unused, set default value as 0 + sharedFadtMinTh = 0; + sramFadtMaxTh = 0; + sramFadtMinTh = 0; + sramFadtXonOffset = 0; #endif return SaiBufferProfileTraits::CreateAttributes{ - pool, reservedBytes, mode, dynThresh, 0, 0, 0, sharedFadtMaxTh}; + pool, + reservedBytes, + mode, + dynThresh, +#if not defined(BRCM_SAI_SDK_XGS_AND_DNX) + // TODO(nivinl): Get rid of the check once support is + // available in SAI 8.2/11.3 - CS00012374846. + staticThresh, +#endif + 0, + 0, + 0, + sharedFadtMaxTh, + sharedFadtMinTh, + sramFadtMaxTh, + sramFadtMinTh, + sramFadtXonOffset}; } void SaiBufferManager::setupBufferPool( @@ -564,6 +608,7 @@ SaiBufferManager::ingressProfileCreateAttrs( SaiBufferProfileTraits::Attributes::ThresholdMode mode{ SAI_BUFFER_PROFILE_THRESHOLD_MODE_DYNAMIC}; SaiBufferProfileTraits::Attributes::SharedDynamicThreshold dynThresh{0}; + SaiBufferProfileTraits::Attributes::SharedStaticThreshold staticThresh{0}; if (config.scalingFactor() && platform_->getAsic()->scalingFactorBasedDynamicThresholdSupported()) { // If scalingFactor is specified, configure the same! @@ -581,20 +626,42 @@ SaiBufferManager::ingressProfileCreateAttrs( } std::optional sharedFadtMaxTh; + std::optional + sharedFadtMinTh; + std::optional + sramFadtMaxTh; + std::optional + sramFadtMinTh; + std::optional + sramFadtXonOffset; #if defined(BRCM_SAI_SDK_DNX_GTE_11_0) - // use default 0 since this attribute currently only used by profile for - // cpu/eventor/rcy port queues - sharedFadtMaxTh = 0; + sharedFadtMaxTh = config.maxSharedXoffThresholdBytes().value_or(0); +#endif +// TODO: Change to BRCM_SAI_SDK_DNX_GTE_11_0 once support is available in 12.0 +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + sharedFadtMinTh = config.minSharedXoffThresholdBytes().value_or(0); + sramFadtMaxTh = config.maxSramXoffThresholdBytes().value_or(0); + sramFadtMinTh = config.minSramXoffThresholdBytes().value_or(0); + sramFadtXonOffset = config.sramResumeOffsetBytes().value_or(0); #endif return SaiBufferProfileTraits::CreateAttributes{ pool, reservedBytes, mode, dynThresh, +#if not defined(BRCM_SAI_SDK_XGS_AND_DNX) + // TODO(nivinl): Get rid of the check once support is + // available in SAI 8.2/11.3 - CS00012374846. + staticThresh, +#endif xoffTh, xonTh, xonOffsetTh, - sharedFadtMaxTh}; + sharedFadtMaxTh, + sharedFadtMinTh, + sramFadtMaxTh, + sramFadtMinTh, + sramFadtXonOffset}; } std::shared_ptr SaiBufferManager::getOrCreateIngressProfile( diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp index 5dfa7b58c340d..806ef35c0f7f8 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.cpp @@ -21,6 +21,16 @@ #include +extern "C" { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif +} + using namespace std::chrono; namespace facebook::fboss { @@ -55,7 +65,7 @@ SaiHostifManager::~SaiHostifManager() { store.release(); } -std::pair +std::pair SaiHostifManager::packetReasonToHostifTrap( cfg::PacketRxReason reason, const SaiPlatform* platform) { @@ -128,6 +138,11 @@ SaiHostifManager::packetReasonToHostifTrap( SAI_HOSTIF_TRAP_TYPE_SAMPLEPACKET, SAI_PACKET_ACTION_TRAP); case cfg::PacketRxReason::EAPOL: return std::make_pair(SAI_HOSTIF_TRAP_TYPE_EAPOL, SAI_PACKET_ACTION_TRAP); + case cfg::PacketRxReason::PORT_MTU_ERROR: +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) + return std::make_pair( + SAI_HOSTIF_TRAP_TYPE_PORT_MTU_ERROR, SAI_PACKET_ACTION_TRAP); +#endif case cfg::PacketRxReason::MPLS_UNKNOWN_LABEL: case cfg::PacketRxReason::BPDU: case cfg::PacketRxReason::L3_SLOW_PATH: @@ -144,7 +159,7 @@ SaiHostifManager::makeHostifTrapAttributes( HostifTrapGroupSaiId trapGroupId, uint16_t priority, const SaiPlatform* platform) { - sai_hostif_trap_type_t hostifTrapId; + sai_int32_t hostifTrapId; sai_packet_action_t hostifPacketAction; std::tie(hostifTrapId, hostifPacketAction) = packetReasonToHostifTrap(trapId, platform); @@ -476,6 +491,10 @@ SaiHostifManager::getVoqHandle(const SaiQueueConfig& saiQueueConfig) { void SaiHostifManager::changeCpuQueue( const ControlPlane::PortQueues& oldQueueConfig, const ControlPlane::PortQueues& newQueueConfig) { + if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB) { + // Chenab-TODO(pshaikh): no way to configure queues on CPU port + return; + } cpuPortHandle_->configuredQueues.clear(); cpuPortHandle_->configuredVoqs.clear(); @@ -504,7 +523,8 @@ void SaiHostifManager::changeCpuQueue( ? *newPortQueue->getScalingFactor() : asic->getDefaultScalingFactor( newPortQueue->getStreamType(), true /*cpu port*/)); - managerTable_->queueManager().changeQueue(queueHandle, *portQueue); + managerTable_->queueManager().changeQueue( + queueHandle, *portQueue, nullptr /*swPort*/, cfg::PortType::CPU_PORT); if (platform_->getAsic()->isSupported( HwAsic::Feature::CPU_VOQ_BUFFER_PROFILE)) { auto voqHandle = getVoqHandle(saiQueueConfig); @@ -555,6 +575,10 @@ void SaiHostifManager::loadCpuPortQueues() { SaiPortTraits::Attributes::QosQueueList queueListAttribute{queueList}; auto queueSaiIdList = SaiApiTable::getInstance()->portApi().getAttribute( cpuPortHandle_->cpuPortId, queueListAttribute); + if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB) { + // Chenab-TODO(pshaikh): no way to load queues on CPU port + return; + } if (queueSaiIdList.size() == 0) { throw FbossError("no queues exist for cpu port "); } diff --git a/fboss/agent/hw/sai/switch/SaiHostifManager.h b/fboss/agent/hw/sai/switch/SaiHostifManager.h index 65b4a14854a27..c9de090aaebda 100644 --- a/fboss/agent/hw/sai/switch/SaiHostifManager.h +++ b/fboss/agent/hw/sai/switch/SaiHostifManager.h @@ -77,8 +77,7 @@ class SaiHostifManager { cfg::PacketRxReason trapId, uint32_t queueId, uint16_t priority); - static std::pair - packetReasonToHostifTrap( + static std::pair packetReasonToHostifTrap( cfg::PacketRxReason reason, const SaiPlatform* platform); static SaiHostifTrapTraits::CreateAttributes makeHostifTrapAttributes( diff --git a/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp b/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp index 383508deb6475..d87fcfe2a6e98 100644 --- a/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiMirrorManager.cpp @@ -69,6 +69,12 @@ SaiMirrorHandle::SaiMirror SaiMirrorManager::addNodeSflow( auto headerVersion = mirrorTunnel.srcIp.isV4() ? 4 : 6; auto truncateSize = mirror->getTruncate() ? platform_->getAsic()->getMirrorTruncateSize() : 0; + std::optional tcBufferLimit; +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + // TODO: Fix this to be picked up from eventor VoQ config. + // For now, defaulting to 1M. + tcBufferLimit = 1000000; +#endif SaiSflowMirrorTraits::CreateAttributes attributes{ SAI_MIRROR_SESSION_TYPE_SFLOW, monitorPort, @@ -82,7 +88,8 @@ SaiMirrorHandle::SaiMirror SaiMirrorManager::addNodeSflow( headerVersion, mirrorTunnel.ttl, truncateSize, - mirror->getSamplingRate()}; + mirror->getSamplingRate(), + tcBufferLimit}; SaiSflowMirrorTraits::AdapterHostKey k{ SAI_MIRROR_SESSION_TYPE_SFLOW, monitorPort, diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/SaiPortManager.cpp index d4bc533ea40b9..d562a43461b32 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiPortManager.cpp @@ -1502,6 +1502,20 @@ std::shared_ptr SaiPortManager::swPortFromAttributes( auto prbsPolynomial = GET_OPT_ATTR(Port, PrbsPolynomial, attributes); prbsState.polynominal() = prbsPolynomial; port->setAsicPrbs(prbsState); + +#if defined(BRCM_SAI_SDK_GTE_12_0) && defined(BRCM_SAI_SDK_DNX) + auto reachabilityGroupId = GET_OPT_ATTR(Port, ReachabilityGroup, attributes); + if (reachabilityGroupId > 0) { + port->setReachabilityGroupId(reachabilityGroupId); + } +#endif + port->setScope(platform_->getPlatformMapping()->getPortScope(port->getID())); + +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + port->setReachabilityGroupId( + GET_OPT_ATTR(Port, CondEntropyRehashEnable, attributes)); +#endif return port; } @@ -2194,6 +2208,19 @@ void SaiPortManager::changeQosPolicy( setQosPolicy(newPort->getID(), newPort->getQosPolicy()); } +void SaiPortManager::setTamObject( + PortID portId, + std::vector tamObjects) { + getPortHandle(portId)->port->setOptionalAttribute( + SaiPortTraits::Attributes::TamObject{std::move(tamObjects)}); +} + +void SaiPortManager::resetTamObject(PortID portId) { + getPortHandle(portId)->port->setOptionalAttribute( + SaiPortTraits::Attributes::TamObject{ + std::vector{SAI_NULL_OBJECT_ID}}); +} + void SaiPortManager::programSampling( PortID portId, SamplePacketDirection direction, @@ -2877,59 +2904,45 @@ void SaiPortManager::changeZeroPreemphasis( bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); #endif + if (!supportsZeroPreemphasis) { return; } - auto gotAttributes = portHandle->port->attributes(); - auto numLanes = - std::get(gotAttributes) - .value() - .size(); - auto serDesAttributes = serdesAttributesFromSwPinConfigs( portHandle->port->adapterKey(), newPort->getPinConfigs(), - portHandle->serdes); - - auto setTxRxAttr = [](auto& attrs, auto type, const auto& val) { - auto& attr = std::get>>(attrs); - if (!val.empty()) { - attr = val; - } - }; - auto zeroVal = std::vector(numLanes, static_cast(0)); - if (platform_->getAsic()->isSupported( - HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS)) { - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::Preemphasis{}, - zeroVal); - } else { - // Set three-tap values to zero - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirPre1{}, - zeroVal); - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirMain{}, - zeroVal); - setTxRxAttr( - serDesAttributes, - SaiPortSerdesTraits::Attributes::TxFirPost1{}, - zeroVal); - } + portHandle->serdes, + newPort->getZeroPreemphasis()); if (platform_->isSerdesApiSupported() && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_PORT_SERDES_PROGRAMMING)) { +#ifdef TAJO_SAI_SDK + // TAJO requires recreating serdes object to zero peremphasis. + SaiPortSerdesTraits::AdapterHostKey serdesKey{ + portHandle->port->adapterKey()}; + auto& store = saiStore_->get(); + auto serdes = store.get(serdesKey); + portHandle->serdes.reset(); + serdes.reset(); + portHandle->serdes = store.setObject(serdesKey, serDesAttributes); +#else + // Brcm enforces main tap to be greater than all attributes. + // Hence set other attributes first, and then set main to zero. + auto nonZeroMainAttribute = serDesAttributes; + auto txMain = + std::get>( + portHandle->serdes->attributes()); + if (txMain.has_value()) { + std::get>( + nonZeroMainAttribute) = txMain.value().value(); + } else { + std::get>( + nonZeroMainAttribute) = std::nullopt; + } + portHandle->serdes->setAttributes(nonZeroMainAttribute); portHandle->serdes->setAttributes(serDesAttributes); - - // Read from HW to see if six-tap attribute changes after setting - // preemphasis. Then update sai store only. - reloadSixTapAttributes(portHandle, serDesAttributes); - portHandle->serdes->setAttributes( - serDesAttributes, /* skipHwWrite */ true); +#endif } } } @@ -2949,4 +2962,19 @@ void SaiPortManager::changeTxEnable( : false}); } } + +void SaiPortManager::updateConditionalEntropySeed(PortID portID, uint32_t seed) + const { +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + auto portHandle = getPortHandle(portID); + if (!portHandle) { + throw FbossError( + "Cannot update conditional entropy seed on non existent port: ", + portID); + } + portHandle->port->setOptionalAttribute( + SaiPortTraits::Attributes::CondEntropyRehashSeed{seed}); +#endif +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiPortManager.h b/fboss/agent/hw/sai/switch/SaiPortManager.h index 4b38a2d0c8643..43a84b8f4d2e5 100644 --- a/fboss/agent/hw/sai/switch/SaiPortManager.h +++ b/fboss/agent/hw/sai/switch/SaiPortManager.h @@ -156,7 +156,8 @@ class SaiPortManager { SaiPortSerdesTraits::CreateAttributes serdesAttributesFromSwPinConfigs( PortSaiId portSaid, const std::vector& pinConfigs, - const std::shared_ptr& serdes); + const std::shared_ptr& serdes, + bool zeroPreemphasis = false); const SaiPortHandle* getPortHandle(PortID swId) const; SaiPortHandle* getPortHandle(PortID swId); @@ -200,6 +201,9 @@ class SaiPortManager { void clearQosPolicy(const std::shared_ptr& qosPolicy); void clearQosPolicy(); + void setTamObject(PortID portId, std::vector tamObject); + void resetTamObject(PortID portId); + std::shared_ptr reconstructPortsFromStore( cfg::SwitchType switchType) const; @@ -288,6 +292,8 @@ class SaiPortManager { bool rxFrequencyRPMSupported() const; bool rxSNRSupported() const; bool fecCodewordsStatsSupported(PortID portID) const; + // TODO(zecheng): Remove this once firmware support is ready + void updateConditionalEntropySeed(PortID portID, uint32_t seed) const; private: PortSaiId addPortImpl(const std::shared_ptr& swPort); @@ -424,6 +430,9 @@ class SaiPortManager { double calculateRate(uint32_t speed); void updatePrbsStatsEntryRate(const std::shared_ptr& swPort); void resetCableLength(PortID portId); + void createSerdesWithZeroPreemphasis( + SaiPortHandle* portHandle, + const std::vector& pinConfigs); SaiStore* saiStore_; SaiManagerTable* managerTable_; diff --git a/fboss/agent/hw/sai/switch/SaiQueueManager.cpp b/fboss/agent/hw/sai/switch/SaiQueueManager.cpp index 64a6df88c7cb0..db8613884ec1a 100644 --- a/fboss/agent/hw/sai/switch/SaiQueueManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiQueueManager.cpp @@ -302,7 +302,8 @@ void SaiQueueManager::changeQueueDeadlockEnable( void SaiQueueManager::changeQueue( SaiQueueHandle* queueHandle, const PortQueue& newPortQueue, - const Port* swPort) { + const Port* swPort, + const std::optional portType) { CHECK(queueHandle); auto queueType = GET_ATTR(Queue, Type, queueHandle->queue->attributes()); if ((queueType != SAI_QUEUE_TYPE_UNICAST_VOQ) && @@ -314,7 +315,21 @@ void SaiQueueManager::changeQueue( changeQueueEcnWred(queueHandle, newPortQueue); if (platform_->getAsic()->isSupported(HwAsic::Feature::BUFFER_POOL) && (queueType != SAI_QUEUE_TYPE_FABRIC_TX)) { - if (!swPort || (swPort->getPortType() != cfg::PortType::MANAGEMENT_PORT)) { + if (portType && (*portType == cfg::PortType::CPU_PORT) && + platform_->getAsic()->isSupported( + HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL)) { + // Skip configuring a buffer pool on CPU queues for platforms like + // YUBA where a dedicated buffer pool is used for CPU traffic. As + // of now, the same buffer pool used for data traffic on all ports + // gets attached to CPU queues via the default queue config. Hence + // this block is a no-op for now. + // + // TODO: If there is a need to use any other buffer profile attrs + // or configs on CPU queues for such platforms, need to provide an + // option to use a dedicated CPU queue config with buffer pool + // specified explicitly as the reserved buffer pool. + } else if ( + !swPort || (swPort->getPortType() != cfg::PortType::MANAGEMENT_PORT)) { // Unsupported for MANAGEMENT_PORT changeQueueBufferProfile(queueHandle, newPortQueue); } diff --git a/fboss/agent/hw/sai/switch/SaiQueueManager.h b/fboss/agent/hw/sai/switch/SaiQueueManager.h index c5c12f87957e4..031328e2d84e5 100644 --- a/fboss/agent/hw/sai/switch/SaiQueueManager.h +++ b/fboss/agent/hw/sai/switch/SaiQueueManager.h @@ -65,7 +65,8 @@ class SaiQueueManager { void changeQueue( SaiQueueHandle* queueHandle, const PortQueue& newPortQueue, - const Port* swPort = nullptr); + const Port* swPort = nullptr, + const std::optional portType = std::nullopt); void changeQueueBufferProfile( SaiQueueHandle* queueHandle, const PortQueue& newPortQueue); diff --git a/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp b/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp index c0d67e194e8cb..609afb838fb23 100644 --- a/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.cpp @@ -10,6 +10,7 @@ #include "fboss/agent/hw/sai/switch/SaiRouterInterfaceManager.h" +#include #include "fboss/agent/FbossError.h" #include "fboss/agent/hw/sai/store/SaiStore.h" #include "fboss/agent/hw/sai/switch/SaiManagerTable.h" @@ -17,8 +18,8 @@ #include "fboss/agent/hw/sai/switch/SaiSystemPortManager.h" #include "fboss/agent/hw/sai/switch/SaiVirtualRouterManager.h" #include "fboss/agent/hw/sai/switch/SaiVlanManager.h" - -#include +#include "fboss/agent/hw/switch_asics/HwAsic.h" +#include "fboss/agent/platforms/sai/SaiPlatform.h" namespace facebook::fboss { @@ -63,8 +64,12 @@ RouterInterfaceSaiId SaiRouterInterfaceManager::addOrUpdateVlanRouterInterface( SaiVlanRouterInterfaceTraits::Attributes::SrcMac srcMacAttribute{srcMac}; // get MTU - SaiVlanRouterInterfaceTraits::Attributes::Mtu mtuAttribute{ - static_cast(swInterface->getMtu())}; + std::optional mtuAttribute = + std::nullopt; + if (platform_->getAsic()->isSupported(HwAsic::Feature::L3_INTF_MTU)) { + mtuAttribute = SaiVlanRouterInterfaceTraits::Attributes::Mtu( + static_cast(swInterface->getMtu())); + } // create the router interface SaiVlanRouterInterfaceTraits::CreateAttributes attributes{ @@ -131,8 +136,12 @@ RouterInterfaceSaiId SaiRouterInterfaceManager::addOrUpdatePortRouterInterface( SaiPortRouterInterfaceTraits::Attributes::SrcMac srcMacAttribute{srcMac}; // get MTU - SaiPortRouterInterfaceTraits::Attributes::Mtu mtuAttribute{ - static_cast(swInterface->getMtu())}; + std::optional mtuAttribute = + std::nullopt; + if (platform_->getAsic()->isSupported(HwAsic::Feature::L3_INTF_MTU)) { + mtuAttribute = SaiVlanRouterInterfaceTraits::Attributes::Mtu( + static_cast(swInterface->getMtu())); + } // create the router interface SaiPortRouterInterfaceTraits::CreateAttributes attributes{ diff --git a/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp b/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp index 2cbe848fb9783..5fdc3cc5c7be5 100644 --- a/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSchedulerManager.cpp @@ -24,11 +24,19 @@ namespace { SaiSchedulerTraits::CreateAttributes makeSchedulerAttributes( const PortQueue& portQueue) { sai_scheduling_type_t type = SAI_SCHEDULING_TYPE_STRICT; - uint8_t weight = 0; + std::optional weight; if (portQueue.getScheduling() == QueueScheduling::WEIGHTED_ROUND_ROBIN) { type = SAI_SCHEDULING_TYPE_DWRR; weight = portQueue.getWeight(); } +#if defined(BRCM_SAI_SDK_XGS_AND_DNX) || defined(TAJO_SAI_SDK) + else { + // BRCM SAI returns weight of 1 on warm boot even if create api was invoked + // without this, retain old behavior for TAJO SAI in which weight if 0 was + // set to 1 otherwise weight given in switch config (only for DWRR) + weight = 1; + } +#endif uint64_t minBwRate = 0, maxBwRate = 0; int32_t meterType = SAI_METER_TYPE_BYTES; if (const auto& portQueueRate = portQueue.getPortQueueRate()) { @@ -73,9 +81,8 @@ SaiSchedulerTraits::CreateAttributes makeSchedulerAttributes( break; } } - // weight 0 is invalid return SaiSchedulerTraits::CreateAttributes( - {type, !weight ? 1 : weight, meterType, minBwRate, maxBwRate}); + {type, weight, meterType, minBwRate, maxBwRate}); } } // namespace diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/SaiSwitch.cpp index 6a4107dc10e1c..b6cbb8887f5d9 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitch.cpp @@ -85,6 +85,15 @@ extern "C" { #include + +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif } using std::chrono::duration_cast; @@ -603,8 +612,11 @@ std::shared_ptr SaiSwitch::stateChangedImplLocked( // Unsupported features checkUnsupportedDelta( delta.getTeFlowEntriesDelta(), managerTable_->teFlowEntryManager()); - // update switch settings first - processSwitchSettingsChanged(delta, lockPolicy); + // update switch settings first. In particular drain box first if drain == + // true + processSwitchSettingsDrainStateChange( + delta, cfg::SwitchDrainState::DRAINED, lockPolicy); + processSwitchSettingsChangeSansDrained(delta, lockPolicy); processLocalCapsuleSwitchIdsDelta(delta, lockPolicy); // process non-default qos policies, which are stored in @@ -1119,6 +1131,9 @@ std::shared_ptr SaiSwitch::stateChangedImplLocked( // Process link state change delta and update the LED status processLinkStateChangeDelta(delta, lockPolicy); + // Undrain switch last + processSwitchSettingsDrainStateChange( + delta, cfg::SwitchDrainState::UNDRAINED, lockPolicy); return delta.newState(); } @@ -1186,29 +1201,73 @@ void SaiSwitch::updateResourceUsage(const LockPolicyT& lockPolicy) { } } -void SaiSwitch::processSwitchSettingsChangedLocked( +void SaiSwitch::processSwitchSettingsDrainStateChangeLocked( const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, const StateDelta& delta) { const auto switchSettingDelta = delta.getSwitchSettingsDelta(); DeltaFunctions::forEachAdded( switchSettingDelta, [&](const auto& newSwitchSettings) { - processSwitchSettingsChangedEntryLocked( + processSwitchSettingsChangeDrainedEntryLocked( + lock, + drainStateToProcess, + std::make_shared(), + newSwitchSettings); + }); + DeltaFunctions::forEachChanged( + switchSettingDelta, + [&](const auto& oldSwitchSettings, const auto& newSwitchSettings) { + processSwitchSettingsChangeDrainedEntryLocked( + lock, drainStateToProcess, oldSwitchSettings, newSwitchSettings); + }); + DeltaFunctions::forEachRemoved( + switchSettingDelta, [&](const auto& oldSwitchSettings) { + processSwitchSettingsChangeDrainedEntryLocked( + lock, + drainStateToProcess, + oldSwitchSettings, + std::make_shared()); + }); +} + +void SaiSwitch::processSwitchSettingsChangeDrainedEntryLocked( + const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, + const std::shared_ptr& oldSwitchSettings, + const std::shared_ptr& newSwitchSettings) { + const auto oldVal = oldSwitchSettings->isSwitchDrained(); + const auto newVal = newSwitchSettings->isSwitchDrained(); + cfg::SwitchDrainState newDrainState = newVal + ? cfg::SwitchDrainState::DRAINED + : cfg::SwitchDrainState::UNDRAINED; + if (oldVal != newVal && newDrainState == drainStateToProcess) { + managerTable_->switchManager().setSwitchIsolate(newVal); + } +} + +void SaiSwitch::processSwitchSettingsChangeSansDrainedLocked( + const std::lock_guard& lock, + const StateDelta& delta) { + const auto switchSettingDelta = delta.getSwitchSettingsDelta(); + DeltaFunctions::forEachAdded( + switchSettingDelta, [&](const auto& newSwitchSettings) { + processSwitchSettingsChangeSansDrainedEntryLocked( lock, std::make_shared(), newSwitchSettings); }); DeltaFunctions::forEachChanged( switchSettingDelta, [&](const auto& oldSwitchSettings, const auto& newSwitchSettings) { - processSwitchSettingsChangedEntryLocked( + processSwitchSettingsChangeSansDrainedEntryLocked( lock, oldSwitchSettings, newSwitchSettings); }); DeltaFunctions::forEachRemoved( switchSettingDelta, [&](const auto& oldSwitchSettings) { - processSwitchSettingsChangedEntryLocked( + processSwitchSettingsChangeSansDrainedEntryLocked( lock, oldSwitchSettings, std::make_shared()); }); } -void SaiSwitch::processSwitchSettingsChangedEntryLocked( +void SaiSwitch::processSwitchSettingsChangeSansDrainedEntryLocked( const std::lock_guard& /*lock*/, const std::shared_ptr& oldSwitchSettings, const std::shared_ptr& newSwitchSettings) { @@ -1252,14 +1311,6 @@ void SaiSwitch::processSwitchSettingsChangedEntryLocked( newSwitchSettings->getMaxRouteCounterIDs()); } - { - const auto oldVal = oldSwitchSettings->isSwitchDrained(); - const auto newVal = newSwitchSettings->isSwitchDrained(); - if (oldVal != newVal) { - managerTable_->switchManager().setSwitchIsolate(newVal); - } - } - { const auto oldVal = oldSwitchSettings->getForceTrafficOverFabric(); const auto newVal = newSwitchSettings->getForceTrafficOverFabric(); @@ -1286,11 +1337,52 @@ void SaiSwitch::processSwitchSettingsChangedEntryLocked( newVal.has_value() ? newVal.value() : 0); } } + + { + const auto oldSramGlobalXoffTh = + oldSwitchSettings->getSramGlobalFreePercentXoffThreshold(); + const auto newSramGlobalXoffTh = + newSwitchSettings->getSramGlobalFreePercentXoffThreshold(); + if (oldSramGlobalXoffTh != newSramGlobalXoffTh) { + managerTable_->switchManager().setSramGlobalFreePercentXoffTh( + newSramGlobalXoffTh.value_or(0)); + } + + const auto oldSramGlobalXonTh = + oldSwitchSettings->getSramGlobalFreePercentXonThreshold(); + const auto newSramGlobalXonTh = + newSwitchSettings->getSramGlobalFreePercentXonThreshold(); + if (oldSramGlobalXonTh != newSramGlobalXonTh) { + managerTable_->switchManager().setSramGlobalFreePercentXonTh( + newSramGlobalXonTh.value_or(0)); + } + } +} + +template +void SaiSwitch::processSwitchSettingsChangeSansDrained( + const StateDelta& delta, + const LockPolicyT& lockPolicy) { + const auto switchSettingsDelta = delta.getSwitchSettingsDelta(); + const auto& oldSwitchSettings = switchSettingsDelta.getOld(); + const auto& newSwitchSettings = switchSettingsDelta.getNew(); + + /* + * SwitchSettings are mandatory and can thus only be modified. + * Every field in SwitchSettings must always be set in new SwitchState. + */ + CHECK(oldSwitchSettings); + CHECK(newSwitchSettings); + + if (oldSwitchSettings != newSwitchSettings) { + processSwitchSettingsChangeSansDrainedLocked(lockPolicy.lock(), delta); + } } template -void SaiSwitch::processSwitchSettingsChanged( +void SaiSwitch::processSwitchSettingsDrainStateChange( const StateDelta& delta, + cfg::SwitchDrainState drainStateToProcess, const LockPolicyT& lockPolicy) { const auto switchSettingsDelta = delta.getSwitchSettingsDelta(); const auto& oldSwitchSettings = switchSettingsDelta.getOld(); @@ -1304,7 +1396,8 @@ void SaiSwitch::processSwitchSettingsChanged( CHECK(newSwitchSettings); if (oldSwitchSettings != newSwitchSettings) { - processSwitchSettingsChangedLocked(lockPolicy.lock(), delta); + processSwitchSettingsDrainStateChangeLocked( + lockPolicy.lock(), drainStateToProcess, delta); } } @@ -2043,7 +2136,9 @@ void SaiSwitch::linkStateChangedCallbackBottomHalf( // does with the callback notification. for (auto swPortIdAndStatus : swPortId2Status) { callback_->linkStateChanged( - swPortIdAndStatus.first, swPortIdAndStatus.second); + swPortIdAndStatus.first, + swPortIdAndStatus.second, + managerTable_->portManager().getPortType(swPortIdAndStatus.first)); } } @@ -2059,12 +2154,27 @@ void SaiSwitch::txReadyStatusChangeCallbackTopHalf(SwitchSaiId switchId) { return; } - txReadyStatusChangeBottomHalfEventBase_.runInFbossEventBaseThread( - [this]() mutable { txReadyStatusChangeCallbackBottomHalf(); }); + // When txReadyStatusChangeCallbackBottomHalf runs, it queries for + // active/inactive link status of all the links at that time. + // Thus, if we txReadyStatusChangeCallbackBottomHalf is already queued for + // run, we can skip scheduling another. + // Note: txReadyStatusChangeCallbackBottomHalf sets changePending to false + // before querying link active/inactive status, so avoid race. + auto changePending = txReadyStatusChangePending_.wlock(); + if (!(*changePending)) { + *changePending = true; + txReadyStatusChangeBottomHalfEventBase_.runInFbossEventBaseThread( + [this]() mutable { txReadyStatusChangeCallbackBottomHalf(); }); + } } void SaiSwitch::txReadyStatusChangeCallbackBottomHalf() { #if SAI_API_VERSION >= SAI_VERSION(1, 13, 0) + { + auto changePending = txReadyStatusChangePending_.wlock(); + *changePending = false; + } + std::vector adapterKeys; for (const auto& [portSaiId, portInfo] : concurrentIndices_->portSaiId2PortInfo) { @@ -2280,8 +2390,8 @@ std::shared_ptr SaiSwitch::getColdBootSwitchState() { scopeResolver->switchIdToSwitchInfo()); multiSwitchSwitchSettings->addNode(matcher.matcherString(), switchSettings); - if (platform_->getAsic()->isSupported( - HwAsic::Feature::LINK_INACTIVE_BASED_ISOLATE)) { + if (getSwitchType() == cfg::SwitchType::VOQ || + getSwitchType() == cfg::SwitchType::FABRIC) { CHECK(getSwitchId().has_value()); // In practice, this will read and populate the value set during switch // create viz. DRAINED @@ -2290,6 +2400,11 @@ std::shared_ptr SaiSwitch::getColdBootSwitchState() { saiSwitchId_, SaiSwitchTraits::Attributes::SwitchIsolate{}); auto drainState = switchIsolate ? cfg::SwitchDrainState::DRAINED : cfg::SwitchDrainState::UNDRAINED; + CHECK(drainState == cfg::SwitchDrainState::DRAINED) + << " Switch must be drained on cold boot"; + XLOG(DBG2) << " On cold boot, switch came up: " + << (drainState == cfg::SwitchDrainState::DRAINED ? "DRAINED" + : "UNDRAINED"); switchSettings->setActualSwitchDrainState(drainState); } @@ -2341,6 +2456,15 @@ HwInitResult SaiSwitch::initLocked( adapterKeysJson.get(), adapterKeys2AdapterHostKeysJson.get()); if (bootType_ != BootType::WARM_BOOT) { + if (getSwitchType() == cfg::SwitchType::FABRIC) { + // 11.0 is not honoring isolate attribute during fabric switch create + // We still want the switch to be isolated before we start enabling ports + // after cold boot. This is tracked in CS00012372888. + // TODO: get rid of this call once CS00012372888 is resolved + auto& switchApi = SaiApiTable::getInstance()->switchApi(); + switchApi.setAttribute( + saiSwitchId_, SaiSwitchTraits::Attributes::SwitchIsolate{true}); + } ret.switchState = getColdBootSwitchState(); ret.switchState->publish(); setProgrammedState(ret.switchState); @@ -2492,7 +2616,9 @@ void SaiSwitch::syncLinkStatesLocked( << portIdAndHandle.first << " with oper status: " << (operStatus == SAI_PORT_OPER_STATUS_UP ? "UP" : "DOWN"); callback_->linkStateChanged( - portIdAndHandle.first, operStatus == SAI_PORT_OPER_STATUS_UP); + portIdAndHandle.first, + operStatus == SAI_PORT_OPER_STATUS_UP, + managerTable_->portManager().getPortType(portIdAndHandle.first)); } } @@ -3369,33 +3495,40 @@ void SaiSwitch::fdbEventCallback( fdbEventBottomHalfEventBase_.runInFbossEventBaseThread( [this, fdbNotifications = std::move(fdbEventNotificationDataTmp)]() mutable { - auto lock = std::lock_guard(saiSwitchMutex_); - fdbEventCallbackLockedBottomHalf(lock, std::move(fdbNotifications)); + fdbEventCallbackLockedBottomHalf(std::move(fdbNotifications)); }); } void SaiSwitch::fdbEventCallbackLockedBottomHalf( - const std::lock_guard& /*lock*/, std::vector fdbNotifications) { - if (managerTable_->bridgeManager().getL2LearningMode() != - cfg::L2LearningMode::SOFTWARE) { - // Some platforms call fdb callback even when mode is set to HW. In - // keeping with our native SDK approach, don't send these events up. - return; - } - for (const auto& fdbNotification : fdbNotifications) { - auto ditr = - kL2AddrUpdateOperationsOfInterest.find(fdbNotification.eventType); - if (ditr != kL2AddrUpdateOperationsOfInterest.end()) { - auto updateTypeStr = fdbEventToString(ditr->first); - auto l2Entry = getL2Entry(fdbNotification); - if (l2Entry) { - XLOG(DBG2) << "Received FDB " << updateTypeStr - << " notification for: " << l2Entry->str(); - callback_->l2LearningUpdateReceived(l2Entry.value(), ditr->second); + std::vector> l2Entries; + { + auto lock = std::lock_guard(saiSwitchMutex_); + if (managerTable_->bridgeManager().getL2LearningMode() != + cfg::L2LearningMode::SOFTWARE) { + // Some platforms call fdb callback even when mode is set to HW. In + // keeping with our native SDK approach, don't send these events up. + return; + } + + for (const auto& fdbNotification : fdbNotifications) { + auto ditr = + kL2AddrUpdateOperationsOfInterest.find(fdbNotification.eventType); + if (ditr != kL2AddrUpdateOperationsOfInterest.end()) { + auto updateTypeStr = fdbEventToString(ditr->first); + auto l2Entry = getL2Entry(fdbNotification); + if (l2Entry) { + XLOG(DBG2) << "Received FDB " << updateTypeStr + << " notification for: " << l2Entry->str(); + l2Entries.push_back({l2Entry.value(), ditr->second}); + } } } } + + for (auto& l2Entry : l2Entries) { + callback_->l2LearningUpdateReceived(l2Entry.first, l2Entry.second); + } } std::optional SaiSwitch::getL2Entry( @@ -3693,8 +3826,14 @@ std::string SaiSwitch::listObjects( objTypes.push_back(SAI_OBJECT_TYPE_DEBUG_COUNTER); break; case HwObjectType::TELEMETRY: + objTypes.push_back(SAI_OBJECT_TYPE_TAM_COLLECTOR); + objTypes.push_back(SAI_OBJECT_TYPE_TAM_TRANSPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_REPORT); objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT_ACTION); +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + objTypes.push_back(static_cast( + SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP)); +#endif objTypes.push_back(SAI_OBJECT_TYPE_TAM_EVENT); objTypes.push_back(SAI_OBJECT_TYPE_TAM); break; diff --git a/fboss/agent/hw/sai/switch/SaiSwitch.h b/fboss/agent/hw/sai/switch/SaiSwitch.h index 28b40bbb22c6c..1692fd583e10c 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitch.h +++ b/fboss/agent/hw/sai/switch/SaiSwitch.h @@ -335,7 +335,6 @@ class SaiSwitch : public HwSwitch { PortID port) const; void fdbEventCallbackLockedBottomHalf( - const std::lock_guard& lock, std::vector data); const SaiManagerTable* managerTableLocked( @@ -395,12 +394,23 @@ class SaiSwitch : public HwSwitch { uint64_t getDeviceWatermarkBytesLocked( const std::lock_guard& lock) const; - void processSwitchSettingsChangedLocked( + void processSwitchSettingsChangeSansDrainedLocked( + const std::lock_guard& lock, + const StateDelta& delta); + + void processSwitchSettingsChangeSansDrainedEntryLocked( + const std::lock_guard& lock, + const std::shared_ptr& oldSwitchSettings, + const std::shared_ptr& newSwitchSettings); + + void processSwitchSettingsDrainStateChangeLocked( const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, const StateDelta& delta); - void processSwitchSettingsChangedEntryLocked( + void processSwitchSettingsChangeDrainedEntryLocked( const std::lock_guard& lock, + cfg::SwitchDrainState drainStateToProcess, const std::shared_ptr& oldSwitchSettings, const std::shared_ptr& newSwitchSettings); @@ -489,8 +499,14 @@ class SaiSwitch : public HwSwitch { Args... args); template - void processSwitchSettingsChanged( + void processSwitchSettingsChangeSansDrained( + const StateDelta& delta, + const LockPolicyT& lockPolicy); + + template + void processSwitchSettingsDrainStateChange( const StateDelta& delta, + cfg::SwitchDrainState drainStateToProcess, const LockPolicyT& lockPolicy); PortSaiId getCPUPortSaiId() const; @@ -589,15 +605,18 @@ class SaiSwitch : public HwSwitch { SwitchSaiId saiSwitchId_; std::unique_ptr linkStateBottomHalfThread_; - FbossEventBase linkStateBottomHalfEventBase_; + FbossEventBase linkStateBottomHalfEventBase_{"LinkStateBottomHalfEventBase"}; std::unique_ptr fdbEventBottomHalfThread_; - FbossEventBase fdbEventBottomHalfEventBase_; + FbossEventBase fdbEventBottomHalfEventBase_{"FdbEventBottomHalfEventBase"}; std::unique_ptr txReadyStatusChangeBottomHalfThread_; - FbossEventBase txReadyStatusChangeBottomHalfEventBase_; + FbossEventBase txReadyStatusChangeBottomHalfEventBase_{ + "TxReadyStatusChangeBottomHalfEventBase"}; std::unique_ptr linkConnectivityChangeBottomHalfThread_; - FbossEventBase linkConnectivityChangeBottomHalfEventBase_; + FbossEventBase linkConnectivityChangeBottomHalfEventBase_{ + "LinkConnectivityChangeBottomHalfEventBase"}; std::unique_ptr switchReachabilityChangeBottomHalfThread_; - FbossEventBase switchReachabilityChangeBottomHalfEventBase_; + FbossEventBase switchReachabilityChangeBottomHalfEventBase_{ + "SwitchReachabilityChangeBottomHalfEventBase"}; HwResourceStats hwResourceStats_; std::atomic runState_{SwitchRunState::UNINITIALIZED}; @@ -611,6 +630,7 @@ class SaiSwitch : public HwSwitch { std::unique_ptr fabricConnectivityManager_; bool pfcDeadlockEnabled_{false}; folly::Synchronized switchReachabilityChangePending_{0}; + folly::Synchronized txReadyStatusChangePending_{false}; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp index bef495b485184..13639e35617ce 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.cpp @@ -185,13 +185,13 @@ SaiSwitchManager::SaiSwitchManager( std::optional switchId) : managerTable_(managerTable), platform_(platform) { int64_t swId = switchId.value_or(0); - switchPreInitSequence(platform->getAsic()->getAsicType()); if (bootType == BootType::WARM_BOOT) { // Extract switch adapter key and create switch only with the mandatory // init attribute (warm boot path) auto& switchApi = SaiApiTable::getInstance()->switchApi(); auto newSwitchId = switchApi.create( - platform->getSwitchAttributes(true, switchType, switchId), swId); + platform->getSwitchAttributes(true, switchType, switchId, bootType), + swId); // Load all switch attributes switch_ = std::make_unique(newSwitchId); if (switchType != cfg::SwitchType::FABRIC) { @@ -205,7 +205,7 @@ SaiSwitchManager::SaiSwitchManager( } else { switch_ = std::make_unique( std::monostate(), - platform->getSwitchAttributes(false, switchType, switchId), + platform->getSwitchAttributes(false, switchType, switchId, bootType), swId); const auto& asic = platform_->getAsic(); @@ -1008,4 +1008,22 @@ void SaiSwitchManager::setReachabilityGroupList(int reachabilityGroupListSize) { } #endif } + +void SaiSwitchManager::setSramGlobalFreePercentXoffTh( + uint8_t sramFreePercentXoffThreshold) { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + switch_->setOptionalAttribute( + SaiSwitchTraits::Attributes::SramFreePercentXoffTh{ + sramFreePercentXoffThreshold}); +#endif +} + +void SaiSwitchManager::setSramGlobalFreePercentXonTh( + uint8_t sramFreePercentXonThreshold) { +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + switch_->setOptionalAttribute( + SaiSwitchTraits::Attributes::SramFreePercentXonTh{ + sramFreePercentXonThreshold}); +#endif +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiSwitchManager.h b/fboss/agent/hw/sai/switch/SaiSwitchManager.h index 8cdab7f9cc388..5981a8c9fd1d5 100644 --- a/fboss/agent/hw/sai/switch/SaiSwitchManager.h +++ b/fboss/agent/hw/sai/switch/SaiSwitchManager.h @@ -103,6 +103,8 @@ class SaiSwitchManager { void setLocalCapsuleSwitchIds( const std::map& switchIdToNumCores); void setReachabilityGroupList(int reachabilityGroupListSize); + void setSramGlobalFreePercentXoffTh(uint8_t sramFreePercentXoffThreshold); + void setSramGlobalFreePercentXonTh(uint8_t sramFreePercentXonThreshold); private: void programEcmpLoadBalancerParams( @@ -163,5 +165,4 @@ void fillHwSwitchCreditStats( const folly::F14FastMap& counterId2Value, HwSwitchCreditStats& hwSwitchCreditStats); void publishSwitchWatermarks(HwSwitchWatermarkStats& watermarkStats); -void switchPreInitSequence(cfg::AsicType asicType); } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp b/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp index f34908fad0b09..88de0cd22ee22 100644 --- a/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiSystemPortManager.cpp @@ -356,7 +356,10 @@ std::shared_ptr SaiSystemPortManager::constructSystemPorts( continue; } auto sysPort = std::make_shared(getSystemPortID( - port.second->getID(), switchIdToSwitchInfo, switchId)); + port.second->getID(), + port.second->getScope(), + switchIdToSwitchInfo, + SwitchID(switchId))); sysPort->setSwitchId(SwitchID(switchId)); sysPort->setName( folly::sformat("{}:{}", switchId, port.second->getName())); diff --git a/fboss/agent/hw/sai/switch/SaiTamManager.h b/fboss/agent/hw/sai/switch/SaiTamManager.h index ab01893fcf1e4..7390439b5b686 100644 --- a/fboss/agent/hw/sai/switch/SaiTamManager.h +++ b/fboss/agent/hw/sai/switch/SaiTamManager.h @@ -3,6 +3,7 @@ #pragma once #include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/api/TamEventAgingGroupApi.h" #include "fboss/agent/hw/sai/store/SaiObject.h" namespace facebook::fboss { @@ -11,14 +12,24 @@ class SaiManagerTable; class SaiPlatform; class SaiStore; +using SaiTamCollector = SaiObject; +using SaiTamTransport = SaiObject; using SaiTamReport = SaiObject; using SaiTamEventAction = SaiObject; +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) +using SaiTamEventAgingGroup = SaiObject; +#endif using SaiTamEvent = SaiObject; using SaiTam = SaiObject; struct SaiTamHandle { + std::shared_ptr collector; + std::shared_ptr transport; std::shared_ptr report; std::shared_ptr action; +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + std::shared_ptr agingGroup; +#endif std::shared_ptr event; std::shared_ptr tam; SaiManagerTable* managerTable; diff --git a/fboss/agent/hw/sai/switch/SaiUdfManager.cpp b/fboss/agent/hw/sai/switch/SaiUdfManager.cpp index e813fadaec2e2..7462e8f868517 100644 --- a/fboss/agent/hw/sai/switch/SaiUdfManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiUdfManager.cpp @@ -33,6 +33,12 @@ SaiUdfGroupTraits::CreateAttributes SaiUdfManager::udfGroupAttr( const std::shared_ptr swUdfGroup) const { // Type auto typeAttr = SaiUdfGroupTraits::Attributes::Type{SAI_UDF_GROUP_TYPE_HASH}; + // TODO(ravi) ensure config gen include type for hash also for SAI + CHECK(swUdfGroup->getUdfGroupType().has_value()); + cfg::UdfGroupType udfGroupType = swUdfGroup->getUdfGroupType().value(); + if (udfGroupType == cfg::UdfGroupType::ACL) { + typeAttr = SaiUdfGroupTraits::Attributes::Type{SAI_UDF_GROUP_TYPE_GENERIC}; + } // Length auto lengthAttr = SaiUdfGroupTraits::Attributes::Length{ static_cast(swUdfGroup->getFieldSizeInBytes())}; @@ -74,8 +80,9 @@ UdfGroupSaiId SaiUdfManager::addUdfGroup( // Create Sai UDF group auto udfGroupCreateAttr = udfGroupAttr(swUdfGroup); auto& udfGroupStore = saiStore_->get(); + SaiUdfGroupTraits::AdapterHostKey adapterHostKey{swUdfGroup->getName()}; auto saiUdfGroup = - udfGroupStore.setObject(udfGroupCreateAttr, udfGroupCreateAttr); + udfGroupStore.setObject(adapterHostKey, udfGroupCreateAttr); auto udfGroupHandle = std::make_unique(); udfGroupHandle->udfGroup = saiUdfGroup; diff --git a/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp b/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp index 81b054b777006..bc293ed8f8241 100644 --- a/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp +++ b/fboss/agent/hw/sai/switch/SaiVirtualRouterManager.cpp @@ -97,6 +97,7 @@ SaiVirtualRouterManager::createMplsRouterInterface(VirtualRouterSaiId vrId) { case cfg::AsicType::ASIC_TYPE_JERICHO3: case cfg::AsicType::ASIC_TYPE_RAMON: case cfg::AsicType::ASIC_TYPE_RAMON3: + case cfg::AsicType::ASIC_TYPE_CHENAB: // TODO(pshaikh): mpls support required break; } diff --git a/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp index d49b8416d7b21..5c112b1e2d3be 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiAclTableManager.cpp @@ -89,6 +89,8 @@ std::vector SaiAclTableManager::getActionTypeList( cfg::AsicType::ASIC_TYPE_JERICHO2; bool isJericho3 = platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3; + bool isChenab = + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_CHENAB; std::vector actionTypeList{ SAI_ACL_ACTION_TYPE_PACKET_ACTION, @@ -97,7 +99,8 @@ std::vector SaiAclTableManager::getActionTypeList( SAI_ACL_ACTION_TYPE_SET_DSCP, SAI_ACL_ACTION_TYPE_MIRROR_INGRESS}; - if (!(isTajo || isJericho2 || isJericho3)) { + if (!(isTajo || isJericho2 || isJericho3 || isChenab)) { + // Chenab supports egress mirror action in egress table actionTypeList.push_back(SAI_ACL_ACTION_TYPE_MIRROR_EGRESS); } if (platform_->getAsic()->isSupported( diff --git a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp index 68ffd944071bb..bc0cd5606b6a0 100644 --- a/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/SaiPortManager.cpp @@ -317,6 +317,9 @@ void SaiPortManager::changePortImpl( getPortAdapterHostKeyFromAttr(newAttributes)}; auto& portStore = saiStore_->get(); auto saiPort = portStore.setObject(portKey, newAttributes, newPort->getID()); + + changeZeroPreemphasis(oldPort, newPort); + programSerdes(saiPort, newPort, existingPort); // if vlan changed update it, this is important for rx processing if (newPort->getIngressVlan() != oldPort->getIngressVlan()) { @@ -340,7 +343,6 @@ void SaiPortManager::changePortImpl( changeSamplePacket(oldPort, newPort); changePfc(oldPort, newPort); changeRxLaneSquelch(oldPort, newPort); - changeZeroPreemphasis(oldPort, newPort); changeTxEnable(oldPort, newPort); programPfcBuffers(newPort); @@ -639,6 +641,13 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( } #endif + std::optional + condEntropyRehashEnable{}; +// TODO(zecheng): Update flag when new 12.0 release has the attribute +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + condEntropyRehashEnable = swPort->getConditionalEntropyRehash(); +#endif + if (basicAttributeOnly) { return SaiPortTraits::CreateAttributes{ #if defined(BRCM_SAI_SDK_DNX) @@ -665,6 +674,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( disableTtl, std::nullopt, pktTxEnable, /* PktTxEnable */ + std::nullopt, // TAM Object std::nullopt, std::nullopt, std::nullopt, @@ -702,6 +712,9 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } return SaiPortTraits::CreateAttributes{ @@ -733,6 +746,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( disableTtl, interfaceType, std::nullopt, + std::nullopt, // TAM Object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet @@ -770,6 +784,9 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( arsPortLoadFutureWeight, // ARS port load future weight #endif reachabilityGroup, + condEntropyRehashEnable, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } @@ -918,9 +935,26 @@ void SaiPortManager::programSerdes( << "some lanes are missing for rx-settings"; } + // Check if the platform supports setting zero preemphasis. + // TH4 and TH5 starts supporting zero preemphasis starting 11.0 +#if defined(BRCM_SAI_SDK_GTE_11_0) + bool supportsZeroPreemphasis = + platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS) || + platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK4 || + platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_TOMAHAWK5; +#else + bool supportsZeroPreemphasis = platform_->getAsic()->isSupported( + HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS); +#endif + SaiPortSerdesTraits::CreateAttributes serdesAttributes = serdesAttributesFromSwPinConfigs( - saiPort->adapterKey(), swPort->getPinConfigs(), serdes); + saiPort->adapterKey(), + swPort->getPinConfigs(), + serdes, + swPort->getZeroPreemphasis() && supportsZeroPreemphasis); if (serdes && checkPortSerdesAttributes(serdes->attributes(), serdesAttributes)) { portHandle->serdes = serdes; @@ -937,6 +971,11 @@ void SaiPortManager::programSerdes( portHandle->serdes.reset(); serdes.reset(); } + if (platform_->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_TOMAHAWK3 && + swPort->getZeroPreemphasis()) { + createSerdesWithZeroPreemphasis(portHandle, swPort->getPinConfigs()); + } // create if serdes doesn't exist or update existing serdes portHandle->serdes = store.setObject(serdesKey, serdesAttributes); @@ -964,7 +1003,8 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& serdes) { + const std::shared_ptr& serdes, + bool zeroPreemphasis) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; @@ -981,6 +1021,49 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( SaiPortSerdesTraits::Attributes::RxAfeTrim::ValueType rxAfeTrim; SaiPortSerdesTraits::Attributes::RxAcCouplingByPass::ValueType rxAcCouplingByPass; + // TX Params + SaiPortSerdesTraits::Attributes::TxDiffEncoderEn::ValueType txDiffEncoderEn; + SaiPortSerdesTraits::Attributes::TxDigGain::ValueType txDigGain; + SaiPortSerdesTraits::Attributes::TxFfeCoeff0::ValueType txFfeCoeff0; + SaiPortSerdesTraits::Attributes::TxFfeCoeff1::ValueType txFfeCoeff1; + SaiPortSerdesTraits::Attributes::TxFfeCoeff2::ValueType txFfeCoeff2; + SaiPortSerdesTraits::Attributes::TxFfeCoeff3::ValueType txFfeCoeff3; + SaiPortSerdesTraits::Attributes::TxFfeCoeff4::ValueType txFfeCoeff4; + SaiPortSerdesTraits::Attributes::TxDriverSwing::ValueType txDriverSwing; + // RX Params + SaiPortSerdesTraits::Attributes::RxInstgBoost1Start::ValueType + rxInstgBoost1Start; + SaiPortSerdesTraits::Attributes::RxInstgBoost1Step::ValueType + rxInstgBoost1Step; + SaiPortSerdesTraits::Attributes::RxInstgBoost1Stop::ValueType + rxInstgBoost1Stop; + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStart::ValueType + rxInstgBoost2OrHrStart; + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStep::ValueType + rxInstgBoost2OrHrStep; + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStop::ValueType + rxInstgBoost2OrHrStop; + SaiPortSerdesTraits::Attributes::RxInstgC1Start1p7::ValueType + rxInstgC1Start1p7; + SaiPortSerdesTraits::Attributes::RxInstgC1Step1p7::ValueType rxInstgC1Step1p7; + SaiPortSerdesTraits::Attributes::RxInstgC1Stop1p7::ValueType rxInstgC1Stop1p7; + SaiPortSerdesTraits::Attributes::RxInstgDfeStart1p7::ValueType + rxInstgDfeStart1p7; + SaiPortSerdesTraits::Attributes::RxInstgDfeStep1p7::ValueType + rxInstgDfeStep1p7; + SaiPortSerdesTraits::Attributes::RxInstgDfeStop1p7::ValueType + rxInstgDfeStop1p7; + SaiPortSerdesTraits::Attributes::RxEnableScanSelection::ValueType + rxEnableScanSelection; + SaiPortSerdesTraits::Attributes::RxInstgScanUseSrSettings::ValueType + rxInstgScanUseSrSettings; + SaiPortSerdesTraits::Attributes::RxCdrCfgOvEn::ValueType rxCdrCfgOvEn; + SaiPortSerdesTraits::Attributes::RxCdrTdet1stOrdStepOvVal::ValueType + rxCdrTdet1stOrdStepOvVal; + SaiPortSerdesTraits::Attributes::RxCdrTdet2ndOrdStepOvVal::ValueType + rxCdrTdet2ndOrdStepOvVal; + SaiPortSerdesTraits::Attributes::RxCdrTdetFineStepOvVal::ValueType + rxCdrTdetFineStepOvVal; // Now use pinConfigs from SW port as the source of truth auto numExpectedTxLanes = 0; @@ -991,43 +1074,67 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (platform_->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_YUBA) { if (auto firPre1 = tx->firPre1()) { - txPre1.push_back(*firPre1); + txPre1.push_back(zeroPreemphasis ? 0 : *firPre1); } if (auto firPre2 = tx->firPre2()) { - txPre2.push_back(*firPre2); + txPre2.push_back(zeroPreemphasis ? 0 : *firPre2); } if (auto firPre3 = tx->firPre3()) { - txPre3.push_back(*firPre3); + txPre3.push_back(zeroPreemphasis ? 0 : *firPre3); } if (auto firMain = tx->firMain()) { - txMain.push_back(*firMain); + txMain.push_back(zeroPreemphasis ? 0 : *firMain); } if (auto firPost1 = tx->firPost1()) { - txPost1.push_back(*firPost1); + txPost1.push_back(zeroPreemphasis ? 0 : *firPost1); + } + if (auto diffEncoderEn = tx->diffEncoderEn()) { + txDiffEncoderEn.push_back(diffEncoderEn.value()); + } + if (auto digGain = tx->digGain()) { + txDigGain.push_back(digGain.value()); + } + if (auto ffeCoeff0 = tx->ffeCoeff0()) { + txFfeCoeff0.push_back(ffeCoeff0.value()); + } + if (auto ffeCoeff1 = tx->ffeCoeff1()) { + txFfeCoeff1.push_back(ffeCoeff1.value()); + } + if (auto ffeCoeff2 = tx->ffeCoeff2()) { + txFfeCoeff2.push_back(ffeCoeff2.value()); + } + if (auto ffeCoeff3 = tx->ffeCoeff3()) { + txFfeCoeff3.push_back(ffeCoeff3.value()); + } + if (auto ffeCoeff4 = tx->ffeCoeff4()) { + txFfeCoeff4.push_back(ffeCoeff4.value()); + } + if (auto driverSwing = tx->driverSwing()) { + txDriverSwing.push_back(driverSwing.value()); } } else { - txPre1.push_back(*tx->pre()); - txMain.push_back(*tx->main()); - txPost1.push_back(*tx->post()); + txPre1.push_back(zeroPreemphasis ? 0 : *tx->pre()); + txMain.push_back(zeroPreemphasis ? 0 : *tx->main()); + txPost1.push_back(zeroPreemphasis ? 0 : *tx->post()); if (FLAGS_sai_configure_six_tap && platform_->getAsic()->isSupported( HwAsic::Feature::SAI_CONFIGURE_SIX_TAP)) { - txPost2.push_back(*tx->post2()); - txPost3.push_back(*tx->post3()); - txPre2.push_back(*tx->pre2()); + txPost2.push_back(zeroPreemphasis ? 0 : *tx->post2()); + txPost3.push_back(zeroPreemphasis ? 0 : *tx->post3()); + txPre2.push_back(zeroPreemphasis ? 0 : *tx->pre2()); if (platform_->getAsic()->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { if (auto lutMode = tx->lutMode()) { - txLutMode.push_back(*lutMode); + txLutMode.push_back(zeroPreemphasis ? 0 : *lutMode); } } } if (auto pre3 = tx->pre3()) { - txPre3.push_back(*pre3); + txPre3.push_back(zeroPreemphasis ? 0 : *pre3); } if (auto driveCurrent = tx->driveCurrent()) { - txIDriver.push_back(driveCurrent.value()); + txIDriver.push_back(zeroPreemphasis ? 0 : driveCurrent.value()); } } } @@ -1045,6 +1152,61 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( if (auto acCouplingByPass = rx->acCouplingBypass()) { rxAcCouplingByPass.push_back(*acCouplingByPass); } + // RX Params + if (auto instgBoost1Start = rx->instgBoost1Start()) { + rxInstgBoost1Start.push_back(instgBoost1Start.value()); + } + if (auto instgBoost1Step = rx->instgBoost1Step()) { + rxInstgBoost1Step.push_back(instgBoost1Step.value()); + } + if (auto instgBoost1Stop = rx->instgBoost1Stop()) { + rxInstgBoost1Stop.push_back(instgBoost1Stop.value()); + } + if (auto instgBoost2OrHrStart = rx->instgBoost2OrHrStart()) { + rxInstgBoost2OrHrStart.push_back(instgBoost2OrHrStart.value()); + } + if (auto instgBoost2OrHrStep = rx->instgBoost2OrHrStep()) { + rxInstgBoost2OrHrStep.push_back(instgBoost2OrHrStep.value()); + } + if (auto instgBoost2OrHrStop = rx->instgBoost2OrHrStop()) { + rxInstgBoost2OrHrStop.push_back(instgBoost2OrHrStop.value()); + } + if (auto instgC1Start1p7 = rx->instgC1Start1p7()) { + rxInstgC1Start1p7.push_back(instgC1Start1p7.value()); + } + if (auto instgC1Step1p7 = rx->instgC1Step1p7()) { + rxInstgC1Step1p7.push_back(instgC1Step1p7.value()); + } + if (auto instgC1Stop1p7 = rx->instgC1Stop1p7()) { + rxInstgC1Stop1p7.push_back(instgC1Stop1p7.value()); + } + if (auto instgDfeStart1p7 = rx->instgDfeStart1p7()) { + rxInstgDfeStart1p7.push_back(instgDfeStart1p7.value()); + } + if (auto instgDfeStep1p7 = rx->instgDfeStep1p7()) { + rxInstgDfeStep1p7.push_back(instgDfeStep1p7.value()); + } + if (auto instgDfeStop1p7 = rx->instgDfeStop1p7()) { + rxInstgDfeStop1p7.push_back(instgDfeStop1p7.value()); + } + if (auto enableScanSelection = rx->enableScanSelection()) { + rxEnableScanSelection.push_back(enableScanSelection.value()); + } + if (auto instgScanUseSrSettings = rx->instgScanUseSrSettings()) { + rxInstgScanUseSrSettings.push_back(instgScanUseSrSettings.value()); + } + if (auto cdrCfgOvEn = rx->cdrCfgOvEn()) { + rxCdrCfgOvEn.push_back(cdrCfgOvEn.value()); + } + if (auto cdrTdet1stOrdStepOvVal = rx->cdrTdet1stOrdStepOvVal()) { + rxCdrTdet1stOrdStepOvVal.push_back(cdrTdet1stOrdStepOvVal.value()); + } + if (auto cdrTdet2ndOrdStepOvVal = rx->cdrTdet2ndOrdStepOvVal()) { + rxCdrTdet2ndOrdStepOvVal.push_back(cdrTdet2ndOrdStepOvVal.value()); + } + if (auto cdrTdetFineStepOvVal = rx->cdrTdetFineStepOvVal()) { + rxCdrTdetFineStepOvVal.push_back(cdrTdetFineStepOvVal.value()); + } } } @@ -1072,6 +1234,98 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::TxLutMode{}, txLutMode); +#if defined(TAJO_SDK_GTE_24_4_90) + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::TxDiffEncoderEn{}, + txDiffEncoderEn); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxDigGain{}, txDigGain); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff0{}, txFfeCoeff0); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff1{}, txFfeCoeff1); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff2{}, txFfeCoeff2); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff3{}, txFfeCoeff3); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::TxFfeCoeff4{}, txFfeCoeff4); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::TxDriverSwing{}, + txDriverSwing); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost1Start{}, + rxInstgBoost1Start); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost1Step{}, + rxInstgBoost1Step); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost1Stop{}, + rxInstgBoost1Stop); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStart{}, + rxInstgBoost2OrHrStart); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStep{}, + rxInstgBoost2OrHrStep); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgBoost2OrHrStop{}, + rxInstgBoost2OrHrStop); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgC1Start1p7{}, + rxInstgC1Start1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgC1Step1p7{}, + rxInstgC1Step1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgC1Stop1p7{}, + rxInstgC1Stop1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgDfeStart1p7{}, + rxInstgDfeStart1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgDfeStep1p7{}, + rxInstgDfeStep1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgDfeStop1p7{}, + rxInstgDfeStop1p7); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxEnableScanSelection{}, + rxEnableScanSelection); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxInstgScanUseSrSettings{}, + rxInstgScanUseSrSettings); + setTxRxAttr( + attrs, SaiPortSerdesTraits::Attributes::RxCdrCfgOvEn{}, rxCdrCfgOvEn); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxCdrTdet1stOrdStepOvVal{}, + rxCdrTdet1stOrdStepOvVal); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxCdrTdet2ndOrdStepOvVal{}, + rxCdrTdet2ndOrdStepOvVal); + setTxRxAttr( + attrs, + SaiPortSerdesTraits::Attributes::RxCdrTdetFineStepOvVal{}, + rxCdrTdetFineStepOvVal); +#endif } } @@ -1079,10 +1333,13 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( setTxRxAttr(attrs, SaiPortSerdesTraits::Attributes::TxFirPre3{}, txPre3); } - if (platform_->getAsic()->getPortSerdesPreemphasis().has_value()) { + if (platform_->getAsic()->getPortSerdesPreemphasis().has_value() || + zeroPreemphasis) { SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preempahsis( numExpectedTxLanes, - platform_->getAsic()->getPortSerdesPreemphasis().value()); + zeroPreemphasis + ? 0 + : platform_->getAsic()->getPortSerdesPreemphasis().value()); setTxRxAttr( attrs, SaiPortSerdesTraits::Attributes::Preemphasis{}, preempahsis); } @@ -1142,4 +1399,34 @@ SaiPortManager::serdesAttributesFromSwPinConfigs( } return attrs; } + +void SaiPortManager::createSerdesWithZeroPreemphasis( + SaiPortHandle* portHandle, + const std::vector& pinConfigs) { + SaiPortSerdesTraits::CreateAttributes attributes; + + auto portSaiId = portHandle->port->adapterKey(); + std::get(attributes) = + static_cast(portSaiId); + + auto numExpectedTxLanes = 0; + for (const auto& pinConfig : pinConfigs) { + if (auto tx = pinConfig.tx()) { + ++numExpectedTxLanes; + } + } + + SaiPortSerdesTraits::Attributes::Preemphasis::ValueType preemphasis; + preemphasis.resize(numExpectedTxLanes, 0); + std::get>>( + attributes) = preemphasis; + SaiPortSerdesTraits::AdapterHostKey serdesKey{portSaiId}; + auto& store = saiStore_->get(); + portHandle->serdes = store.setObject(serdesKey, attributes); + + // Reload attributes + reloadSixTapAttributes(portHandle, attributes); + portHandle->serdes->setAttributes(attributes, true /* skipHwWrite */); +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp index 9ca8e8b9e125e..55bc2150a09b0 100644 --- a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp +++ b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitch.cpp @@ -222,6 +222,8 @@ std::string errorType(sai_switch_error_type_t type) { return "SAI_SWITCH_ERROR_TYPE_RQP_PACKET_REASSEMBLY_RCM_ALL_CONTEXTS_TAKEN_DISCARD_ERR"; case SAI_SWITCH_ERROR_TYPE_RTP_TABLE_CHANGE: return "SAI_SWITCH_ERROR_TYPE_RTP_TABLE_CHANGE"; + case SAI_SWITCH_ERROR_TYPE_FABRIC_AUTO_ISOLATION: + return "SAI_SWITCH_ERROR_TYPE_FABRIC_AUTO_ISOLATION"; #endif default: break; @@ -439,6 +441,14 @@ void SaiSwitch::switchEventCallback( getSwitchStats()->switchReachabilityChangeCount(); } } break; + case SAI_SWITCH_EVENT_TYPE_FABRIC_AUTO_ISOLATE: { + // TODO(skhare) Process the callback + XLOG(ERR) << "Firmware Isolate callback received" + << " error type: " << errorType(eventInfo->error_type) + << " is_isolated: " << static_cast(eventInfo->index) + << " nof_active_links: " << static_cast(eventInfo->index2); + break; + } #endif } } diff --git a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp index c9fd12581d29c..f47afca769236 100644 --- a/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/bcm/SaiSwitchManager.cpp @@ -1,10 +1,8 @@ // Copyright 2004-present Facebook. All Rights Reserved. #include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" -#include "fboss/agent/hw/HwSwitchFb303Stats.h" -#include -#include +#include "fboss/agent/hw/HwSwitchFb303Stats.h" extern "C" { #ifndef IS_OSS_BRCM_SAI @@ -84,27 +82,4 @@ void fillHwSwitchCreditStats( } } } - -void switchPreInitSequence(cfg::AsicType asicType) { - if (asicType != cfg::AsicType::ASIC_TYPE_JERICHO3) { - return; - } -#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) - // Generate SOC file with register/table settings to enable PFC based on OBM - // usage at per port level and to enable FC between EGQ / FDR-FDA blocks, - // which will help avoid drops at ingress and egress respectively with higher - // GPU NCCL collective runs. - // TODO: Remove these once the patch for CS00012371269 and CS00012370885 are - // available. - const std::string kSaiPostInitCmdFileContent{ - "w CGM_VSQE_RJCT_PRMS 0 128 -1 -1 -1 -1\n" - "mod CGM_PB_VSQ_RJCT_MASK 0 16 VSQ_RJCT_MASK=0x0\n" - "mod CGM_VSQF_FC_PRMS 0 16 WORDS_MIN_TH=60000 WORDS_MAX_TH=60000 WORDS_OFFSET=20000 SRAM_BUFFERS_MAX_TH=2048 SRAM_BUFFERS_MIN_TH=256 SRAM_BUFFERS_OFFSET=128\n" - "m ECGM_CONGESTION_MANAGEMENT_GLOBAL_THRESHOLDS TOTAL_DB_STOP_TH=29000\n"}; - const std::string kSaiPostInitCmdFilePath{"/tmp/sai_postinit_cmd_file.soc"}; - std::filesystem::create_directories( - std::filesystem::path(kSaiPostInitCmdFilePath).parent_path().u8string()); - folly::writeFile(kSaiPostInitCmdFileContent, kSaiPostInitCmdFilePath.c_str()); -#endif -} } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp new file mode 100644 index 0000000000000..d8e99372f69c4 --- /dev/null +++ b/fboss/agent/hw/sai/switch/npu/bcm/oss/SaiSwitchManager.cpp @@ -0,0 +1,19 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/sai/switch/SaiSwitchManager.h" + +#include "fboss/agent/hw/HwSwitchFb303Stats.h" + +extern "C" { +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} + +namespace facebook::fboss { + +void publishSwitchWatermarks(HwSwitchWatermarkStats& /*watermarkStats*/) {} + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp index 6f0f6bd7e0603..e53e5f991515c 100644 --- a/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/tajo/SaiSwitchManager.cpp @@ -24,6 +24,4 @@ void fillHwSwitchCreditStats( CHECK_EQ(counterId2Value.size(), 0); } -void switchPreInitSequence(cfg::AsicType /*asicType*/) {} - } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp b/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp index 516e449752de4..7d2e7a49ff80f 100644 --- a/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp +++ b/fboss/agent/hw/sai/switch/npu/tajo/SaiTamManager.cpp @@ -76,8 +76,8 @@ SaiTamManager::SaiTamManager( std::get(eventTraits) = actions; std::get(eventTraits) = collectors; - std::get(eventTraits) = - eventTypes; + std::get>( + eventTraits) = eventTypes; auto& eventStore = saiStore_->get(); auto event = eventStore.setObject(eventTraits, eventTraits); diff --git a/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp b/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp index 79c1859217c6f..6f00e19ef9355 100644 --- a/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp +++ b/fboss/agent/hw/sai/switch/oss/SaiSwitchManager.cpp @@ -26,6 +26,4 @@ void fillHwSwitchCreditStats( void publishSwitchWatermarks(HwSwitchWatermarkStats& /*watermarkStats*/) {} -void switchPreInitSequence(cfg::AsicType /*asicType*/) {} - } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp index c4b8e7751b327..cdfb1d92225c5 100644 --- a/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp +++ b/fboss/agent/hw/sai/switch/phy/SaiPortManager.cpp @@ -258,6 +258,7 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::nullopt, std::nullopt, std::nullopt, std::nullopt, intfType, std::nullopt, + std::nullopt, // TAM Object std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, @@ -286,6 +287,9 @@ SaiPortTraits::CreateAttributes SaiPortManager::attributesFromSwPort( std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; } @@ -365,7 +369,8 @@ SaiPortSerdesTraits::CreateAttributes SaiPortManager::serdesAttributesFromSwPinConfigs( PortSaiId portSaiId, const std::vector& pinConfigs, - const std::shared_ptr& /* serdes */) { + const std::shared_ptr& /* serdes */, + bool /* zeroPreemphasis */) { SaiPortSerdesTraits::CreateAttributes attrs; SaiPortSerdesTraits::Attributes::TxFirPre1::ValueType txPre1; diff --git a/fboss/agent/hw/sai/switch/switch.bzl b/fboss/agent/hw/sai/switch/switch.bzl deleted file mode 100644 index 4d7db2b929491..0000000000000 --- a/fboss/agent/hw/sai/switch/switch.bzl +++ /dev/null @@ -1,192 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "get_all_phy_impls", "to_impl_suffix", "to_versions") - -_COMMON_SRCS = [ - "ConcurrentIndices.cpp", - "SaiAclTableGroupManager.cpp", - "SaiAclTableManager.cpp", - "SaiArsManager.cpp", - "SaiArsProfileManager.cpp", - "SaiBridgeManager.cpp", - "SaiBufferManager.cpp", - "SaiCounterManager.cpp", - "SaiDebugCounterManager.cpp", - "SaiInSegEntryManager.cpp", - "SaiFdbManager.cpp", - "SaiHashManager.cpp", - "SaiHostifManager.cpp", - "SaiLagManager.cpp", - "SaiMacsecManager.cpp", - "SaiManagerTable.cpp", - "SaiMirrorManager.cpp", - "SaiNeighborManager.cpp", - "SaiNextHopManager.cpp", - "SaiNextHopGroupManager.cpp", - "SaiPortManager.cpp", - "SaiPortUtils.cpp", - "SaiQosMapManager.cpp", - "SaiQueueManager.cpp", - "SaiRouteManager.cpp", - "SaiRouterInterfaceManager.cpp", - "SaiRxPacket.cpp", - "SaiSamplePacketManager.cpp", - "SaiSchedulerManager.cpp", - "SaiSwitch.cpp", - "SaiSwitchManager.cpp", - "SaiSystemPortManager.cpp", - "SaiUdfManager.cpp", - "SaiVlanManager.cpp", - "SaiVirtualRouterManager.cpp", - "SaiWredManager.cpp", - "SaiTunnelManager.cpp", -] - -_NPU_COMMON_SRCS = _COMMON_SRCS + [ - "npu/SaiAclTableManager.cpp", - "npu/SaiPortManager.cpp", - "npu/SaiSwitch.cpp", -] - -_NPU_BRCM_SRCS = _NPU_COMMON_SRCS + [ - "facebook/SaiBufferManager.cpp", - "facebook/SaiHostifManager.cpp", - "facebook/SaiSwitchManager.cpp", - "npu/bcm/SaiQueueManager.cpp", - "npu/bcm/SaiSwitch.cpp", - "npu/bcm/SaiSwitchManager.cpp", - "npu/bcm/SaiPortManager.cpp", - "npu/bcm/SaiTamManager.cpp", - "oss/SaiAclTableManager.cpp", -] - -_NPU_TAJO_SRCS = _NPU_COMMON_SRCS + [ - "facebook/SaiBufferManager.cpp", - "facebook/SaiHostifManager.cpp", - "facebook/SaiSwitchManager.cpp", - "npu/tajo/SaiPortManager.cpp", - "npu/tajo/SaiSwitch.cpp", - "npu/tajo/SaiTamManager.cpp", - "npu/tajo/SaiAclTableManager.cpp", - "npu/tajo/SaiSwitchManager.cpp", - "oss/SaiQueueManager.cpp", -] - -_NPU_FAKE_SRCS = _NPU_COMMON_SRCS + [ - "oss/SaiBufferManager.cpp", - "oss/SaiHostifManager.cpp", - "oss/SaiSwitch.cpp", - "oss/SaiTamManager.cpp", - "oss/SaiPortManager.cpp", - "oss/SaiAclTableManager.cpp", - "oss/SaiSwitchManager.cpp", - "oss/SaiQueueManager.cpp", -] - -_PHY_COMMON_SRCS = _COMMON_SRCS + [ - "phy/SaiAclTableManager.cpp", - "phy/SaiPortManager.cpp", - "phy/SaiSwitch.cpp", - "oss/SaiSwitch.cpp", - "oss/SaiTamManager.cpp", - "oss/SaiBufferManager.cpp", - "oss/SaiHostifManager.cpp", - "oss/SaiPortManager.cpp", - "oss/SaiAclTableManager.cpp", - "oss/SaiSwitchManager.cpp", - "oss/SaiQueueManager.cpp", -] - -_PHY_FAKE_SRCS = _PHY_COMMON_SRCS - -_PHY_ELBERT_8DD_SRCS = _PHY_COMMON_SRCS - -def _sai_switch_srcs(sai_impl, is_npu): - if is_npu: - if sai_impl.name == "fake": - return _NPU_FAKE_SRCS - if sai_impl.name == "leaba": - return _NPU_TAJO_SRCS - if sai_impl.name == "brcm": - return _NPU_BRCM_SRCS - else: - if sai_impl.name == "fake": - return _PHY_FAKE_SRCS - if sai_impl.name == "credo": - return _PHY_ELBERT_8DD_SRCS - return [] - -def sai_switch_lib_name(sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - name_suffix = "switch" if is_npu else "phy" - return "sai_{}{}".format(name_suffix, impl_suffix) - -def sai_switch_dependent_name(name, sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - switch_type = "" if is_npu else "-phy" - return "{}{}{}".format(name, switch_type, impl_suffix) - -def _sai_switch_lib(sai_impl, is_npu): - impl_suffix = to_impl_suffix(sai_impl) - srcs = _sai_switch_srcs(sai_impl, is_npu) - name = sai_switch_lib_name(sai_impl, is_npu) - return cpp_library( - name = name, - srcs = srcs, - undefined_symbols = True, - headers = [ - "SaiTamManager.h", - "SaiTxPacket.h", - ], - exported_deps = [ - "//fboss/agent:core", - "//fboss/agent/hw:hw_switch_fb303_stats", - "//fboss/agent/hw:hw_cpu_fb303_stats", - "//fboss/agent/hw:hw_port_fb303_stats", - "//fboss/agent/hw:hw_resource_stats_publisher", - "//fboss/agent/hw:unsupported_feature_manager", - "//fboss/agent/hw:hw_trunk_counters", - "//fboss/agent/hw:prbs_stats_entry", - "//fboss/agent/hw/sai/api:sai_api{}".format(impl_suffix), - "//fboss/agent/hw/sai/store:sai_store{}".format(impl_suffix), - "//fboss/agent/platforms/sai:sai_platform_h", - "//fboss/lib:ref_map", - "//folly/concurrency:concurrent_hash_map", - "//folly/container:f14_hash", - "//thrift/lib/cpp/util:enum_utils", - "//fboss/lib/phy:phy_utils", - "//fboss/mka_service/if:mka_structs-cpp2-types", - ], - versions = to_versions(sai_impl), - ) - -def _handler_lib(sai_impl, is_npu): - return cpp_library( - name = "{}".format(sai_switch_dependent_name("thrift_handler", sai_impl, is_npu)), - srcs = [ - "SaiHandler.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - ":if-cpp2-types", - ":if-cpp2-services", - "//fboss/agent/hw/sai/diag:{}".format(sai_switch_dependent_name("diag_shell", sai_impl, is_npu)), - "//fboss/agent:handler", - ], - versions = to_versions(sai_impl), - ) - -def all_handler_libs(): - for sai_impl in get_all_npu_impls(): - _handler_lib(sai_impl, True) - - for sai_impl in get_all_phy_impls(): - _handler_lib(sai_impl, False) - -def all_npu_libs(): - for sai_impl in get_all_npu_impls(): - _sai_switch_lib(sai_impl, True) - -def all_phy_libs(): - for sai_impl in get_all_phy_impls(): - _sai_switch_lib(sai_impl, False) diff --git a/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp index ec0c17dad4917..1888d5162887e 100644 --- a/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/HostifManagerTest.cpp @@ -34,7 +34,7 @@ TEST_F(HostifManagerTest, createHostifTrap) { trapId, SaiHostifTrapTraits::Attributes::TrapType{}); auto trapPacketActionExpected = saiApiTable->hostifApi().getAttribute( trapId, SaiHostifTrapTraits::Attributes::PacketAction{}); - sai_hostif_trap_type_t hostifTrapId; + sai_int32_t hostifTrapId; sai_packet_action_t hostifPacketAction; std::tie(hostifTrapId, hostifPacketAction) = SaiHostifManager::packetReasonToHostifTrap(trapType, saiPlatform.get()); diff --git a/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp index 80945a666a5d6..c0b8434ac8fc0 100644 --- a/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/PortManagerTest.cpp @@ -131,6 +131,7 @@ class PortManagerTest : public ManagerTestBase { #endif std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, + std::nullopt, // TAM object std::nullopt, // Ingress Mirror Session std::nullopt, // Egress Mirror Session std::nullopt, // Ingress Sample Packet @@ -168,6 +169,9 @@ class PortManagerTest : public ManagerTestBase { std::nullopt, // ARS port load future weight #endif std::nullopt, // Reachability Group + std::nullopt, // CondEntropyRehashEnable + std::nullopt, // CondEntropyRehashPeriodUS + std::nullopt, // CondEntropyRehashSeed }; return portApi.create(a, 0); } diff --git a/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp b/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp index 2231d782af018..3bdbc84e8833a 100644 --- a/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp +++ b/fboss/agent/hw/sai/switch/tests/UdfManagerTest.cpp @@ -78,6 +78,7 @@ class UdfManagerTest : public ManagerTestBase { swUdfGroup->setStartOffsetInBytes(kOffset()); swUdfGroup->setFieldSizeInBytes(kFieldSize()); swUdfGroup->setUdfPacketMatcherIds(matcherIds); + swUdfGroup->setUdfGroupType(cfg::UdfGroupType::HASH); return swUdfGroup; } diff --git a/fboss/agent/hw/sai/switch/tests/switch_test.bzl b/fboss/agent/hw/sai/switch/tests/switch_test.bzl deleted file mode 100644 index 19e58c6626b01..0000000000000 --- a/fboss/agent/hw/sai/switch/tests/switch_test.bzl +++ /dev/null @@ -1,66 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "to_impl_lib_name", "to_impl_suffix") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -def _manager_test_lib(sai_impl, is_npu): - switch_lib_name = sai_switch_lib_name(sai_impl, is_npu) - impl_suffix = to_impl_suffix(sai_impl) - name = sai_switch_dependent_name("manager_test_base", sai_impl, is_npu) - return cpp_library( - name = name, - srcs = [ - "ManagerTestBase.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - exported_deps = [ - "fbsource//third-party/googletest:gtest", - "//fboss/agent/hw/sai/fake:fake_sai", - "//fboss/agent:switchid_scope_resolver", - "//fboss/agent/hw/sai/switch:{}".format(switch_lib_name), - "//fboss/agent/platforms/sai:{}".format(sai_switch_dependent_name("sai_platform", sai_impl, is_npu)), - ], - ) - -def _manager_test_libs(is_npu): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - if sai_impl.name != "fake": - continue - _manager_test_lib(sai_impl, is_npu) - -def manager_test_libs(): - _manager_test_libs(is_npu = True) - -def phy_manager_test_libs(): - _manager_test_libs(is_npu = False) - -def _switch_manager_unittest_impl(name, srcs, sai_impl, is_npu, **kwargs): - ut_name = sai_switch_dependent_name(name, sai_impl, is_npu) - supports_static_listing = kwargs.pop("supports_static_listing", True) - cpp_unittest( - name = ut_name, - srcs = srcs, - supports_static_listing = supports_static_listing, - deps = [ - ":{}".format(sai_switch_dependent_name("manager_test_base", sai_impl, is_npu)), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/state:state_utils", - "//fboss/agent/test:utils", - "//fboss/mka_service/if:mka_structs-cpp2-types", - ], - ) - -def _switch_manager_unittest(name, srcs, is_npu, **kwargs): - all_impls = get_all_impls_for(is_npu) - for sai_impl in all_impls: - if sai_impl.name != "fake": - continue - _switch_manager_unittest_impl(name, srcs, sai_impl, is_npu, **kwargs) - -def switch_manager_unittest(name, srcs, **kwargs): - _switch_manager_unittest(name, srcs, is_npu = True, **kwargs) - -def phy_switch_manager_unittest(name, srcs): - _switch_manager_unittest(name, srcs, is_npu = False) diff --git a/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp b/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp index 633e5f581b53d..9a9d1d9c75dfe 100644 --- a/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/BufferApiTracer.cpp @@ -32,6 +32,7 @@ std::map> _BufferProfileMap{ SAI_ATTR_MAP(BufferProfile, ReservedBytes), SAI_ATTR_MAP(BufferProfile, ThresholdMode), SAI_ATTR_MAP(BufferProfile, SharedDynamicThreshold), + SAI_ATTR_MAP(BufferProfile, SharedStaticThreshold), SAI_ATTR_MAP(BufferProfile, XoffTh), SAI_ATTR_MAP(BufferProfile, XonTh), SAI_ATTR_MAP(BufferProfile, XonOffsetTh), @@ -45,6 +46,10 @@ std::map> _IngressPriorityGroupMap{ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(BufferProfile, SharedFadtMaxTh) + SAI_EXT_ATTR_MAP(BufferProfile, SharedFadtMinTh) + SAI_EXT_ATTR_MAP(BufferProfile, SramFadtMaxTh) + SAI_EXT_ATTR_MAP(BufferProfile, SramFadtMinTh) + SAI_EXT_ATTR_MAP(BufferProfile, SramFadtXonOffset) } } // namespace diff --git a/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp b/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp index 52a960909e5c7..cfedc17767fc3 100644 --- a/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/MirrorApiTracer.cpp @@ -35,6 +35,11 @@ std::map> _MirrorSessionMap{ SAI_ATTR_MAP(SflowMirror, UdpSrcPort), SAI_ATTR_MAP(SflowMirror, UdpDstPort), }; + +void handleExtensionAttributes() { + SAI_EXT_ATTR_MAP_2(MirrorSession, SflowMirror, TcBufferLimit) +} + } // namespace namespace facebook::fboss { @@ -44,6 +49,7 @@ WRAP_SET_ATTR_FUNC(mirror_session, SAI_OBJECT_TYPE_MIRROR_SESSION, mirror); WRAP_GET_ATTR_FUNC(mirror_session, SAI_OBJECT_TYPE_MIRROR_SESSION, mirror); sai_mirror_api_t* wrappedMirrorApi() { + handleExtensionAttributes(); static sai_mirror_api_t mirrorWrappers; mirrorWrappers.create_mirror_session = &wrap_create_mirror_session; mirrorWrappers.remove_mirror_session = &wrap_remove_mirror_session; diff --git a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp index 8eb6d69be7f84..a62ac487d3305 100644 --- a/fboss/agent/hw/sai/tracer/PortApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/PortApiTracer.cpp @@ -37,6 +37,7 @@ std::map> _PortMap{ SAI_ATTR_MAP(Port, Type), SAI_ATTR_MAP(Port, InterfaceType), SAI_ATTR_MAP(Port, PktTxEnable), + SAI_ATTR_MAP(Port, TamObject), SAI_ATTR_MAP(Port, SerdesId), SAI_ATTR_MAP(Port, IngressMirrorSession), SAI_ATTR_MAP(Port, EgressMirrorSession), @@ -145,6 +146,35 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(Port, CablePropogationDelayNS) SAI_EXT_ATTR_MAP(Port, FabricDataCellsFilterStatus) SAI_EXT_ATTR_MAP(Port, ReachabilityGroup) + SAI_EXT_ATTR_MAP(PortSerdes, TxDiffEncoderEn) + SAI_EXT_ATTR_MAP(PortSerdes, TxDigGain) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff0) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff1) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff2) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff3) + SAI_EXT_ATTR_MAP(PortSerdes, TxFfeCoeff4) + SAI_EXT_ATTR_MAP(PortSerdes, TxDriverSwing) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost1Start) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost1Step) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost1Stop) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost2OrHrStart) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost2OrHrStep) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgBoost2OrHrStop) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgC1Start1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgC1Step1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgC1Stop1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgDfeStart1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgDfeStep1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgDfeStop1p7) + SAI_EXT_ATTR_MAP(PortSerdes, RxEnableScanSelection) + SAI_EXT_ATTR_MAP(PortSerdes, RxInstgScanUseSrSettings) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrCfgOvEn) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdet1stOrdStepOvVal) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdet2ndOrdStepOvVal) + SAI_EXT_ATTR_MAP(PortSerdes, RxCdrTdetFineStepOvVal) + SAI_EXT_ATTR_MAP(Port, CondEntropyRehashEnable) + SAI_EXT_ATTR_MAP(Port, CondEntropyRehashPeriodUS) + SAI_EXT_ATTR_MAP(Port, CondEntropyRehashSeed) } } // namespace diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.cpp b/fboss/agent/hw/sai/tracer/SaiTracer.cpp index 1c323c308e610..f57c1d3826148 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SaiTracer.cpp @@ -43,6 +43,7 @@ #include "fboss/agent/hw/sai/tracer/SwitchApiTracer.h" #include "fboss/agent/hw/sai/tracer/SystemPortApiTracer.h" #include "fboss/agent/hw/sai/tracer/TamApiTracer.h" +#include "fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h" // NOLINT(facebook-unused-include-check) #include "fboss/agent/hw/sai/tracer/TunnelApiTracer.h" #include "fboss/agent/hw/sai/tracer/UdfApiTracer.h" #include "fboss/agent/hw/sai/tracer/VirtualRouterApiTracer.h" @@ -195,6 +196,23 @@ sai_status_t __wrap_sai_api_query( return rv; } +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + if (UNLIKELY(sai_api_id >= SAI_API_MAX)) { + switch (static_cast(sai_api_id)) { + case SAI_API_TAM_EVENT_AGING_GROUP: + SaiTracer::getInstance()->tamEventAgingGroupApi_ = + static_cast(*api_method_table); + *api_method_table = facebook::fboss::wrappedTamEventAgingGroupApi(); + SaiTracer::getInstance()->logApiQuery( + sai_api_id, "tam_event_aging_group_api"); + break; + default: + break; + } + return rv; + } +#endif + switch (sai_api_id) { case SAI_API_ACL: SaiTracer::getInstance()->aclApi_ = @@ -395,6 +413,7 @@ sai_status_t __wrap_sai_api_query( // funtion here break; } + return rv; } @@ -465,6 +484,8 @@ sai_status_t __wrap_sai_get_object_key( namespace { folly::Singleton _saiTracer; +constexpr std::string_view kGlobalVarStart = "/* Global Variables Start */"; +constexpr std::string_view kGlobalVarEnd = "/* Global Variables End */"; } // namespace @@ -556,7 +577,9 @@ void SaiTracer::logApiQuery(sai_api_t api_id, const std::string& api_var) { init_api_.emplace(api_id, api_var); writeToFile( - {to("sai_", api_var, "_t* ", api_var), + {to(kGlobalVarStart), + to("sai_", api_var, "_t* ", api_var), + to(kGlobalVarEnd), to( "sai_api_query((sai_api_t)", api_id, ",(void**)&", api_var, ")"), to( @@ -1326,6 +1349,19 @@ vector SaiTracer::setAttrList( to(sai_attribute, "[", i, "].id=", attr_list[i].id)); } +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + if (UNLIKELY(object_type >= SAI_OBJECT_TYPE_MAX)) { + switch (static_cast(object_type)) { + case SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP: + setTamEventAgingGroupAttributes(attr_list, attr_count, attrLines, rv); + break; + default: + break; + } + return attrLines; + } +#endif + // Call functions defined in *ApiTracer.h to serialize attributes // that are specific to each Sai object type switch (object_type) { @@ -1475,6 +1511,12 @@ vector SaiTracer::setAttrList( case SAI_OBJECT_TYPE_TAM_REPORT: setTamReportAttributes(attr_list, attr_count, attrLines, rv); break; + case SAI_OBJECT_TYPE_TAM_TRANSPORT: + setTamTransportAttributes(attr_list, attr_count, attrLines, rv); + break; + case SAI_OBJECT_TYPE_TAM_COLLECTOR: + setTamCollectorAttributes(attr_list, attr_count, attrLines, rv); + break; case SAI_OBJECT_TYPE_TUNNEL: setTunnelAttributes(attr_list, attr_count, attrLines, rv); break; @@ -1742,6 +1784,7 @@ void SaiTracer::logPostInvocation( void SaiTracer::setupGlobals() { // TODO(zecheng): Handle list size that's larger than 512 bytes. vector globalVar = {to( + to(kGlobalVarStart), "sai_attribute_t *s_a=(sai_attribute_t*)malloc(ATTR_SIZE * ", FLAGS_default_list_size, ")")}; @@ -1776,6 +1819,7 @@ void SaiTracer::setupGlobals() { to("sai_stat_id_t counter_list[", FLAGS_default_list_size, "]")); globalVar.push_back( to("uint64_t counter_vals[", FLAGS_default_list_size, "]")); + globalVar.push_back(to(kGlobalVarEnd)); writeToFile(globalVar); maxAttrCount_ = FLAGS_default_list_size; @@ -1836,8 +1880,14 @@ void SaiTracer::initVarCounts() { varCounts_.emplace(SAI_OBJECT_TYPE_SCHEDULER_GROUP, 0); varCounts_.emplace(SAI_OBJECT_TYPE_SWITCH, 0); varCounts_.emplace(SAI_OBJECT_TYPE_SYSTEM_PORT, 0); + varCounts_.emplace(SAI_OBJECT_TYPE_TAM_COLLECTOR, 0); + varCounts_.emplace(SAI_OBJECT_TYPE_TAM_TRANSPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_REPORT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT_ACTION, 0); +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + varCounts_.emplace( + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), 0); +#endif varCounts_.emplace(SAI_OBJECT_TYPE_TAM_EVENT, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TAM, 0); varCounts_.emplace(SAI_OBJECT_TYPE_TUNNEL, 0); diff --git a/fboss/agent/hw/sai/tracer/SaiTracer.h b/fboss/agent/hw/sai/tracer/SaiTracer.h index c149fb27691e7..c61aad37b1725 100644 --- a/fboss/agent/hw/sai/tracer/SaiTracer.h +++ b/fboss/agent/hw/sai/tracer/SaiTracer.h @@ -27,6 +27,15 @@ extern "C" { #include + +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +#endif } DECLARE_bool(enable_replayer); @@ -237,6 +246,9 @@ class SaiTracer { sai_switch_api_t* switchApi_; sai_system_port_api_t* systemPortApi_; sai_tam_api_t* tamApi_; +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + sai_tam_event_aging_group_api_t* tamEventAgingGroupApi_; +#endif sai_tunnel_api_t* tunnelApi_; sai_udf_api_t* udfApi_; sai_virtual_router_api_t* virtualRouterApi_; @@ -408,8 +420,14 @@ class SaiTracer { {SAI_OBJECT_TYPE_SCHEDULER_GROUP, "schedulerGroup_"}, {SAI_OBJECT_TYPE_SWITCH, "switch_"}, {SAI_OBJECT_TYPE_SYSTEM_PORT, "systemPort_"}, + {SAI_OBJECT_TYPE_TAM_COLLECTOR, "tamCollector_"}, + {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tamTransport_"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tamReport_"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tamEventAction_"}, +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + {static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + "tamEventAgingGroup_"}, +#endif {SAI_OBJECT_TYPE_TAM_EVENT, "tamEvent_"}, {SAI_OBJECT_TYPE_TAM, "tam_"}, {SAI_OBJECT_TYPE_TUNNEL, "tunnel_"}, @@ -471,8 +489,14 @@ class SaiTracer { {SAI_OBJECT_TYPE_SCHEDULER_GROUP, "scheduler_group_api->"}, {SAI_OBJECT_TYPE_SWITCH, "switch_api->"}, {SAI_OBJECT_TYPE_SYSTEM_PORT, "system_port_api->"}, + {SAI_OBJECT_TYPE_TAM_COLLECTOR, "tam_api->"}, + {SAI_OBJECT_TYPE_TAM_TRANSPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_REPORT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM_EVENT_ACTION, "tam_api->"}, +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + {static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + "tam_event_aging_group_api->"}, +#endif {SAI_OBJECT_TYPE_TAM_EVENT, "tam_api->"}, {SAI_OBJECT_TYPE_TAM, "tam_api->"}, {SAI_OBJECT_TYPE_TUNNEL, "tunnel_api->"}, @@ -802,6 +826,19 @@ class SaiTracer { attr_name::ExtractSelectionType)); \ } +#define SAI_EXT_ATTR_MAP_2(obj_type, obj_sub_type, attr_name) \ + if (facebook::fboss::Sai##obj_sub_type##Traits::Attributes::attr_name:: \ + AttributeId()() \ + .has_value()) { \ + _##obj_type##Map[facebook::fboss::Sai##obj_sub_type##Traits::Attributes:: \ + attr_name::AttributeId()() \ + .value()] = \ + std::make_pair( \ + #attr_name, \ + TYPE_INDEX(facebook::fboss::Sai##obj_sub_type##Traits:: \ + Attributes::attr_name::ExtractSelectionType)); \ + } + #define SET_SAI_REGULAR_ATTRIBUTES(obj_type) \ void set##obj_type##Attributes( \ const sai_attribute_t* attr_list, \ diff --git a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp index d7479bf81610e..1db5d141c2a6d 100644 --- a/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/SwitchApiTracer.cpp @@ -123,6 +123,10 @@ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(Switch, VoqLatencyMaxLevel2Ns); SAI_EXT_ATTR_MAP(Switch, ReachabilityGroupList); SAI_EXT_ATTR_MAP(Switch, DelayDropCongThreshold); + SAI_EXT_ATTR_MAP(Switch, FabricLinkLayerFlowControlThreshold); + SAI_EXT_ATTR_MAP(Switch, SramFreePercentXoffTh); + SAI_EXT_ATTR_MAP(Switch, SramFreePercentXonTh); + SAI_EXT_ATTR_MAP(Switch, NoAclsForTraps); } } // namespace diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp index b6ead428a1ef6..5ac31ca4158e1 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp @@ -37,9 +37,30 @@ std::map> _TamReportMap{ SAI_ATTR_MAP(TamReport, Type), }; +std::map> _TamTransportMap{ + SAI_ATTR_MAP(TamTransport, Type), + SAI_ATTR_MAP(TamTransport, SrcPort), + SAI_ATTR_MAP(TamTransport, DstPort), + SAI_ATTR_MAP(TamTransport, Mtu), +}; + +std::map> _TamCollectorMap{ + SAI_ATTR_MAP(TamCollector, SrcIp), + SAI_ATTR_MAP(TamCollector, DstIp), + SAI_ATTR_MAP(TamCollector, TruncateSize), + SAI_ATTR_MAP(TamCollector, Transport), + SAI_ATTR_MAP(TamCollector, DscpValue), +}; + void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(TamEvent, SwitchEventType) + SAI_EXT_ATTR_MAP(TamEvent, DeviceId) SAI_EXT_ATTR_MAP(TamEvent, SwitchEventId) + SAI_EXT_ATTR_MAP(TamEvent, ExtensionsCollectorList) + SAI_EXT_ATTR_MAP(TamEvent, PacketDropTypeMmu) + SAI_EXT_ATTR_MAP(TamEvent, AgingGroup) + SAI_EXT_ATTR_MAP(TamTransport, SrcMacAddress) + SAI_EXT_ATTR_MAP(TamTransport, DstMacAddress) } } // namespace @@ -66,6 +87,16 @@ WRAP_REMOVE_FUNC(tam_report, SAI_OBJECT_TYPE_TAM_REPORT, tam); WRAP_SET_ATTR_FUNC(tam_report, SAI_OBJECT_TYPE_TAM_REPORT, tam); WRAP_GET_ATTR_FUNC(tam_report, SAI_OBJECT_TYPE_TAM_REPORT, tam); +WRAP_CREATE_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_REMOVE_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_SET_ATTR_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); +WRAP_GET_ATTR_FUNC(tam_transport, SAI_OBJECT_TYPE_TAM_TRANSPORT, tam); + +WRAP_CREATE_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); +WRAP_REMOVE_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); +WRAP_SET_ATTR_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); +WRAP_GET_ATTR_FUNC(tam_collector, SAI_OBJECT_TYPE_TAM_COLLECTOR, tam); + sai_tam_api_t* wrappedTamApi() { handleExtensionAttributes(); static sai_tam_api_t tamWrappers; @@ -91,6 +122,16 @@ sai_tam_api_t* wrappedTamApi() { tamWrappers.set_tam_report_attribute = &wrap_set_tam_report_attribute; tamWrappers.get_tam_report_attribute = &wrap_get_tam_report_attribute; + tamWrappers.create_tam_transport = &wrap_create_tam_transport; + tamWrappers.remove_tam_transport = &wrap_remove_tam_transport; + tamWrappers.set_tam_transport_attribute = &wrap_set_tam_transport_attribute; + tamWrappers.get_tam_transport_attribute = &wrap_get_tam_transport_attribute; + + tamWrappers.create_tam_collector = &wrap_create_tam_collector; + tamWrappers.remove_tam_collector = &wrap_remove_tam_collector; + tamWrappers.set_tam_collector_attribute = &wrap_set_tam_collector_attribute; + tamWrappers.get_tam_collector_attribute = &wrap_get_tam_transport_attribute; + return &tamWrappers; } @@ -98,5 +139,7 @@ SET_SAI_ATTRIBUTES(Tam) SET_SAI_ATTRIBUTES(TamEvent) SET_SAI_ATTRIBUTES(TamEventAction) SET_SAI_ATTRIBUTES(TamReport) +SET_SAI_ATTRIBUTES(TamTransport) +SET_SAI_ATTRIBUTES(TamCollector) } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.h b/fboss/agent/hw/sai/tracer/TamApiTracer.h index 996adb666a108..fe2bf029f895e 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.h +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.h @@ -12,5 +12,7 @@ SET_ATTRIBUTE_FUNC_DECLARATION(Tam); SET_ATTRIBUTE_FUNC_DECLARATION(TamEvent); SET_ATTRIBUTE_FUNC_DECLARATION(TamEventAction); SET_ATTRIBUTE_FUNC_DECLARATION(TamReport); +SET_ATTRIBUTE_FUNC_DECLARATION(TamTransport); +SET_ATTRIBUTE_FUNC_DECLARATION(TamCollector); } // namespace facebook::fboss diff --git a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp new file mode 100644 index 0000000000000..6049cc4019818 --- /dev/null +++ b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.cpp @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) + +#include "fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h" +#include +#include + +#include "fboss/agent/hw/sai/api/TamEventAgingGroupApi.h" +#include "fboss/agent/hw/sai/tracer/Utils.h" + +using folly::to; + +namespace { + +std::map> _TamEventAgingGroupMap{ + SAI_ATTR_MAP(TamEventAgingGroup, Type), + SAI_ATTR_MAP(TamEventAgingGroup, AgingTime), +}; + +void handleExtensionAttributes() {} + +} // namespace + +namespace facebook::fboss { + +WRAP_CREATE_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); +WRAP_REMOVE_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); +WRAP_SET_ATTR_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); +WRAP_GET_ATTR_FUNC( + tam_event_aging_group, + static_cast(SAI_OBJECT_TYPE_TAM_EVENT_AGING_GROUP), + tamEventAgingGroup); + +sai_tam_event_aging_group_api_t* wrappedTamEventAgingGroupApi() { + handleExtensionAttributes(); + static sai_tam_event_aging_group_api_t tamEventAgingGroupWrappers; + + tamEventAgingGroupWrappers.create_tam_event_aging_group = + &wrap_create_tam_event_aging_group; + tamEventAgingGroupWrappers.remove_tam_event_aging_group = + &wrap_remove_tam_event_aging_group; + tamEventAgingGroupWrappers.set_tam_event_aging_group_attribute = + &wrap_set_tam_event_aging_group_attribute; + tamEventAgingGroupWrappers.get_tam_event_aging_group_attribute = + &wrap_get_tam_event_aging_group_attribute; + + return &tamEventAgingGroupWrappers; +} + +SET_SAI_ATTRIBUTES(TamEventAgingGroup) + +} // namespace facebook::fboss + +#endif diff --git a/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h new file mode 100644 index 0000000000000..1f06729f8c237 --- /dev/null +++ b/fboss/agent/hw/sai/tracer/TamEventAgingGroupApiTracer.h @@ -0,0 +1,28 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#pragma once + +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) || \ + defined(SAI_VERSION_11_7_0_0_DNX_ODP) + +#include "fboss/agent/hw/sai/tracer/SaiTracer.h" + +extern "C" { +#include +#include +#ifndef IS_OSS_BRCM_SAI +#include +#else +#include +#endif +} + +namespace facebook::fboss { + +sai_tam_event_aging_group_api_t* wrappedTamEventAgingGroupApi(); + +SET_ATTRIBUTE_FUNC_DECLARATION(TamEventAgingGroup); + +} // namespace facebook::fboss + +#endif diff --git a/fboss/agent/hw/sai/tracer/run/run.bzl b/fboss/agent/hw/sai/tracer/run/run.bzl deleted file mode 100644 index a7fe0074a1d6d..0000000000000 --- a/fboss/agent/hw/sai/tracer/run/run.bzl +++ /dev/null @@ -1,28 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_versions") - -def _sai_replayer_binary(sai_impl): - sai_impl_external_deps = [] - if sai_impl.name == "brcm": - sai_impl_external_deps = [("brcm-sai", None, "sai")] - elif sai_impl.name == "leaba": - sai_impl_external_deps = [("leaba-sdk", None, "sai-sdk")] - - return cpp_binary( - name = "sai_replayer-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "Main.cpp", - "SaiLog.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - external_deps = [ - ("sai", None), - ("glibc", None, "rt"), - ] + sai_impl_external_deps, - ) - -def all_replayer_binaries(): - for sai_impl in SAI_IMPLS: - _sai_replayer_binary(sai_impl) diff --git a/fboss/agent/hw/sai/tracer/tracer.bzl b/fboss/agent/hw/sai/tracer/tracer.bzl deleted file mode 100644 index c9d8d1b087b88..0000000000000 --- a/fboss/agent/hw/sai/tracer/tracer.bzl +++ /dev/null @@ -1,77 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/bcm:wrapped_symbols.bzl", "wrapped_sai_symbols") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_impl_external_deps", "to_impl_suffix", "to_versions") - -def _sai_api_tracer_impl(sai_impl): - sai_external_deps = to_impl_external_deps(sai_impl) - major, minor, release = sai_impl.sai_version.split(".") - pp_flags = [] if sai_impl.name == "fake" else [ - "-DSAI_API_VERSION=(100000 * ({}) + 1000 * ({}) + ({}))".format(major, minor, release), - ] - - cpp_library( - name = "sai_tracer{}".format(to_impl_suffix(sai_impl)), - srcs = [ - "AclApiTracer.cpp", - "ArsApiTracer.cpp", - "ArsProfileApiTracer.cpp", - "BridgeApiTracer.cpp", - "BufferApiTracer.cpp", - "CounterApiTracer.cpp", - "DebugCounterApiTracer.cpp", - "FdbApiTracer.cpp", - "HashApiTracer.cpp", - "HostifApiTracer.cpp", - "LagApiTracer.cpp", - "MacsecApiTracer.cpp", - "MirrorApiTracer.cpp", - "MplsApiTracer.cpp", - "NeighborApiTracer.cpp", - "NextHopApiTracer.cpp", - "NextHopGroupApiTracer.cpp", - "PortApiTracer.cpp", - "QosMapApiTracer.cpp", - "QueueApiTracer.cpp", - "RouteApiTracer.cpp", - "RouterInterfaceApiTracer.cpp", - "SaiTracer.cpp", - "SamplePacketApiTracer.cpp", - "SchedulerApiTracer.cpp", - "SwitchApiTracer.cpp", - "SystemPortApiTracer.cpp", - "TamApiTracer.cpp", - "TunnelApiTracer.cpp", - "UdfApiTracer.cpp", - "Utils.cpp", - "VirtualRouterApiTracer.cpp", - "VlanApiTracer.cpp", - "WredApiTracer.cpp", - ], - propagated_pp_flags = pp_flags, - linker_flags = ( - wrapped_sai_symbols - ), - undefined_symbols = True, - exported_deps = [ - "//fboss/agent:async_logger", - "//fboss/agent:fboss-error", - "//fboss/agent:fboss-types", - "//fboss/agent/hw/sai/api:sai_version", - "//fboss/agent/hw/sai/api:recursive_glob_headers", - "//fboss/agent/hw/sai/tracer/run:recursive_glob_headers", - "//fboss/lib:function_call_time_reporter", - "//fboss/lib:hw_write_behavior", - "//fboss/lib:tuple_utils", - "//folly:singleton", - ], - exported_external_deps = sai_external_deps + [ - ("boost", None, "boost_serialization"), - "glog", - "gflags", - ], - versions = to_versions(sai_impl), - ) - -def sai_tracer_apis(): - for sai_impls in SAI_IMPLS: - _sai_api_tracer_impl(sai_impls) diff --git a/fboss/agent/hw/switch_asics/BUCK b/fboss/agent/hw/switch_asics/BUCK index 4d6653c3d3e0a..0af67ca9830ab 100644 --- a/fboss/agent/hw/switch_asics/BUCK +++ b/fboss/agent/hw/switch_asics/BUCK @@ -6,6 +6,7 @@ cpp_library( name = "switch_asics", srcs = [ "BroadcomXgsAsic.cpp", + "ChenabAsic.cpp", "CredoPhyAsic.cpp", "EbroAsic.cpp", "HwAsic.cpp", @@ -22,6 +23,7 @@ cpp_library( ], headers = [ "BroadcomAsic.h", + "ChenabAsic.h", "FakeAsic.h", "MockAsic.h", "TajoAsic.h", diff --git a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp index 47d31c407aec2..128dceec620e5 100644 --- a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp +++ b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.cpp @@ -3,6 +3,11 @@ #include "fboss/agent/hw/switch_asics/BroadcomXgsAsic.h" #include +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 2; +static constexpr int kDefaultHiPriCpuQueueId = 9; +} // namespace + namespace facebook::fboss { std::set BroadcomXgsAsic::getQueueStreamTypes( @@ -23,4 +28,13 @@ std::set BroadcomXgsAsic::getQueueStreamTypes( " ASIC does not support:", apache::thrift::util::enumNameSafe(portType)); } + +int BroadcomXgsAsic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} + +int BroadcomXgsAsic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} + } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h index da86781ab6dd1..fe315bb6244d5 100644 --- a/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h +++ b/fboss/agent/hw/switch_asics/BroadcomXgsAsic.h @@ -14,5 +14,7 @@ class BroadcomXgsAsic : public BroadcomAsic { using BroadcomAsic::BroadcomAsic; std::set getQueueStreamTypes( cfg::PortType portType) const override; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.cpp b/fboss/agent/hw/switch_asics/ChenabAsic.cpp new file mode 100644 index 0000000000000..b61d582f42625 --- /dev/null +++ b/fboss/agent/hw/switch_asics/ChenabAsic.cpp @@ -0,0 +1,357 @@ +// Copyright 2023-present Facebook. All Rights Reserved. + +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" +#include + +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 2; +static constexpr int kDefaultHiPriCpuQueueId = 7; +} // namespace + +namespace facebook::fboss { + +bool ChenabAsic::isSupportedNonFabric(Feature feature) const { + switch (feature) { + /* + * None of the features are verified on the asic. + * Marking them as true for now but need to revisit + * this as we verify the features. + */ + case HwAsic::Feature::SPAN: + case HwAsic::Feature::ERSPANv4: + case HwAsic::Feature::SFLOWv4: + case HwAsic::Feature::ERSPANv6: + case HwAsic::Feature::SFLOWv6: + case HwAsic::Feature::ECN: + case HwAsic::Feature::QOS_MAP_GLOBAL: + case HwAsic::Feature::SMAC_EQUALS_DMAC_CHECK_ENABLED: + case HwAsic::Feature::WEIGHTED_NEXTHOPGROUP_MEMBER: + case HwAsic::Feature::SAI_WEIGHTED_NEXTHOPGROUP_MEMBER: + case HwAsic::Feature::BUFFER_POOL: + case HwAsic::Feature::MIRROR_PACKET_TRUNCATION: + case HwAsic::Feature::SFLOW_SAMPLING: + case HwAsic::Feature::SAI_ECN_WRED: + case HwAsic::Feature::MAC_AGING: + case HwAsic::Feature::TELEMETRY_AND_MONITORING: + case HwAsic::Feature::REMOVE_PORTS_FOR_COLDBOOT: + case HwAsic::Feature::DEFAULT_VLAN: + case HwAsic::Feature::ACL_COPY_TO_CPU: + case HwAsic::Feature::MULTIPLE_ACL_TABLES: + case HwAsic::Feature::SAI_ACL_TABLE_UPDATE: + case HwAsic::Feature::SAI_ACL_ENTRY_SRC_PORT_QUALIFIER: + case HwAsic::Feature::VRF: + case HwAsic::Feature::SAI_PORT_SERDES_FIELDS_RESET: + case HwAsic::Feature::PTP_TC: + case HwAsic::Feature::PTP_TC_PCS: + case HwAsic::Feature::ROUTE_PROGRAMMING: + case HwAsic::Feature::FEC: + case HwAsic::Feature::FABRIC_PORT_MTU: + case HwAsic::Feature::FABRIC_PORTS: + case HwAsic::Feature::SAI_PORT_SPEED_CHANGE: + case HwAsic::Feature::ROUTE_COUNTERS: + case HwAsic::Feature::UDF_HASH_FIELD_QUERY: + case HwAsic::Feature::SAI_SAMPLEPACKET_TRAP: + case HwAsic::Feature::QUEUE_ECN_COUNTER: + case HwAsic::Feature::SAI_CONFIGURE_SEVEN_TAP: + case HwAsic::Feature::SAI_CONFIGURE_SIX_TAP: + case HwAsic::Feature::SEPARATE_BYTE_AND_PACKET_ACL_COUNTER: + case HwAsic::Feature::L3_QOS: + case HwAsic::Feature::L3_MTU_ERROR_TRAP: + case HwAsic::Feature::SAI_PORT_SERDES_PROGRAMMING: + case HwAsic::Feature::PORT_WRED_COUNTER: + case HwAsic::Feature::BRIDGE_PORT_8021Q: + case HwAsic::Feature::WARMBOOT: + case HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS: + case HwAsic::Feature::SAI_UDF_HASH: + case HwAsic::Feature::IN_PAUSE_INCREMENTS_DISCARDS: + case HwAsic::Feature::SAI_FEC_COUNTERS: + case HwAsic::Feature::SAI_FEC_CODEWORDS_STATS: + case HwAsic::Feature::PFC: + case HwAsic::Feature::HASH_FIELDS_CUSTOMIZATION: + case HwAsic::Feature::ECMP_HASH_V4: + case HwAsic::Feature::ECMP_HASH_V6: + case HwAsic::Feature::CPU_PORT: + case HwAsic::Feature::ACL_TABLE_GROUP: + case HwAsic::Feature::RESOURCE_USAGE_STATS: + case HwAsic::Feature::SAI_TTL0_PACKET_FORWARD_ENABLE: + return true; + case HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW: + case HwAsic::Feature::CPU_VOQ_BUFFER_PROFILE: + case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: + case HwAsic::Feature::SWITCH_REACHABILITY_CHANGE_NOTIFY: + case HwAsic::Feature::CABLE_PROPOGATION_DELAY: + case HwAsic::Feature::DRAM_BLOCK_TIME: + case HwAsic::Feature::VOQ_LATENCY_WATERMARK_BIN: + case HwAsic::Feature::ACL_ENTRY_ETHER_TYPE: + case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::DATA_CELL_FILTER: + case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: + case HwAsic::Feature::DELETED_CREDITS_STAT: + case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::ACL_METADATA_QUALIFER: + case HwAsic::Feature::PENDING_L2_ENTRY: + case HwAsic::Feature::PMD_RX_LOCK_STATUS: + case HwAsic::Feature::PMD_RX_SIGNAL_DETECT: + case HwAsic::Feature::FEC_AM_LOCK_STATUS: + case HwAsic::Feature::PCS_RX_LINK_STATUS: + case HwAsic::Feature::ACL_COUNTER_LABEL: + case HwAsic::Feature::ROUTE_METADATA: + case HwAsic::Feature::MEDIA_TYPE: + case HwAsic::Feature::PORT_TTL_DECREMENT_DISABLE: + case HwAsic::Feature::COUNTER_REFRESH_INTERVAL: + case HwAsic::Feature::BLACKHOLE_ROUTE_DROP_COUNTER: + case HwAsic::Feature::SWITCH_ATTR_INGRESS_ACL: + case HwAsic::Feature::ECMP_MEMBER_WIDTH_INTROSPECTION: + case HwAsic::Feature::SAI_MPLS_LABEL_LOOKUP_FAIL_COUNTER: + case HwAsic::Feature::SAI_MPLS_TTL_1_TRAP: + case HwAsic::Feature::SAI_MPLS_INSEGMENT: + case HwAsic::Feature::RESERVED_ENCAP_INDEX_RANGE: + case HwAsic::Feature::HOSTTABLE: + case HwAsic::Feature::QCM: + case HwAsic::Feature::SCHEDULER_PPS: + case HwAsic::Feature::NEXTHOP_TTL_DECREMENT_DISABLE: + case HwAsic::Feature::PORT_INTERFACE_TYPE: + case HwAsic::Feature::HSDK: + case HwAsic::Feature::OBJECT_KEY_CACHE: + case HwAsic::Feature::L3_EGRESS_MODE_AUTO_ENABLED: + case HwAsic::Feature::PKTIO: + case HwAsic::Feature::INGRESS_FIELD_PROCESSOR_FLEX_COUNTER: + case HwAsic::Feature::PORT_TX_DISABLE: + case HwAsic::Feature::ZERO_SDK_WRITE_WARMBOOT: + case HwAsic::Feature::OBM_COUNTERS: + case HwAsic::Feature::EGRESS_QUEUE_FLEX_COUNTER: + case HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER: + case HwAsic::Feature::INGRESS_L3_INTERFACE: + case HwAsic::Feature::NON_UNICAST_HASH: + case HwAsic::Feature::DETAILED_L2_UPDATE: + case HwAsic::Feature::WIDE_ECMP: + case HwAsic::Feature::ALPM_ROUTE_PROJECTION: + case HwAsic::Feature::SFLOW_SHIM_VERSION_FIELD: + case HwAsic::Feature::EGRESS_MIRRORING: + case HwAsic::Feature::EGRESS_SFLOW: + case HwAsic::Feature::SAI_LAG_HASH: + case HwAsic::Feature::MACSEC: + case HwAsic::Feature::SAI_HASH_FIELDS_CLEAR_BEFORE_SET: + case HwAsic::Feature::EMPTY_ACL_MATCHER: + case HwAsic::Feature::ROUTE_FLEX_COUNTERS: + case HwAsic::Feature::FEC_DIAG_COUNTERS: + case HwAsic::Feature::PORT_EYE_VALUES: + case HwAsic::Feature::SAI_PORT_ERR_STATUS: + case HwAsic::Feature::EXACT_MATCH: + case HwAsic::Feature::FEC_CORRECTED_BITS: + case HwAsic::Feature::RX_FREQUENCY_PPM: + case HwAsic::Feature::SAI_FIRMWARE_PATH: + case HwAsic::Feature::EXTENDED_FEC: + case HwAsic::Feature::LINK_TRAINING: + case HwAsic::Feature::SAI_RX_REASON_COUNTER: + case HwAsic::Feature::VOQ: + case HwAsic::Feature::XPHY_PORT_STATE_TOGGLE: + case HwAsic::Feature::SAI_PORT_GET_PMD_LANES: + case HwAsic::Feature::FABRIC_TX_QUEUES: + case HwAsic::Feature::SAI_PORT_VCO_CHANGE: + case HwAsic::Feature::SHARED_INGRESS_EGRESS_BUFFER_POOL: + case HwAsic::Feature::FLOWLET: + case HwAsic::Feature::TC_TO_QUEUE_QOS_MAP_ON_SYSTEM_PORT: + case HwAsic::Feature::PORT_FABRIC_ISOLATE: + case HwAsic::Feature::CPU_TX_VIA_RECYCLE_PORT: + case HwAsic::Feature::SWITCH_DROP_STATS: + case HwAsic::Feature::PACKET_INTEGRITY_DROP_STATS: + case HwAsic::Feature::TRAFFIC_HASHING: + case HwAsic::Feature::SAI_MPLS_QOS: + case HwAsic::Feature::MPLS: + case HwAsic::Feature::MPLS_ECMP: + case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: + case HwAsic::Feature::SAI_PORT_ETHER_STATS: + case HwAsic::Feature::RX_LANE_SQUELCH_ENABLE: + case HwAsic::Feature::SLOW_STAT_UPDATE: + case HwAsic::Feature::VOQ_DELETE_COUNTER: + case HwAsic::Feature::DRAM_ENQUEUE_DEQUEUE_STATS: + case HwAsic::Feature::FLOWLET_PORT_ATTRIBUTES: + case HwAsic::Feature::P4_WARMBOOT: + case HwAsic::Feature::SAI_EAPOL_TRAP: + case HwAsic::Feature::SAI_USER_DEFINED_TRAP: + case HwAsic::Feature::CREDIT_WATCHDOG: + case HwAsic::Feature::ECMP_DLB_OFFSET: + case HwAsic::Feature::SAI_FEC_CORRECTED_BITS: + case HwAsic::Feature::LINK_INACTIVE_BASED_ISOLATE: + case HwAsic::Feature::RX_SNR: + case HwAsic::Feature::MANAGEMENT_PORT: + case HwAsic::Feature::ANY_ACL_DROP_COUNTER: + case HwAsic::Feature::EGRESS_FORWARDING_DROP_COUNTER: + case HwAsic::Feature::ANY_TRAP_DROP_COUNTER: + case HwAsic::Feature::SAI_PRBS: + case HwAsic::Feature::RCI_WATERMARK_COUNTER: + case HwAsic::Feature::DTL_WATERMARK_COUNTER: + case HwAsic::Feature::LINK_ACTIVE_INACTIVE_NOTIFY: + case HwAsic::Feature::PQP_ERROR_EGRESS_DROP_COUNTER: + case HwAsic::Feature::FABRIC_LINK_DOWN_CELL_DROP_COUNTER: + case HwAsic::Feature::CRC_ERROR_DETECT: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: + return false; + default: + return false; + } + return false; +} + +bool ChenabAsic::isSupportedFabric(Feature feature) const { + switch (feature) { + case HwAsic::Feature::REMOVE_PORTS_FOR_COLDBOOT: + case HwAsic::Feature::FABRIC_PORTS: + return true; + default: + return false; + } + return false; +} + +int ChenabAsic::getDefaultNumPortQueues( + cfg::StreamType streamType, + cfg::PortType portType) const { + switch (streamType) { + case cfg::StreamType::MULTICAST: + throw FbossError( + "no queue exist for stream type: ", + apache::thrift::util::enumNameSafe(streamType)); + case cfg::StreamType::FABRIC_TX: + return 1; + case cfg::StreamType::UNICAST: + case cfg::StreamType::ALL: + return 8; + } + + throw FbossError( + "Unexpected, stream: ", + apache::thrift::util::enumNameSafe(streamType), + " portType: ", + apache::thrift::util::enumNameSafe(portType), + " combination"); +} + +std::set ChenabAsic::getQueueStreamTypes( + cfg::PortType portType) const { + switch (portType) { + case cfg::PortType::CPU_PORT: + case cfg::PortType::INTERFACE_PORT: + case cfg::PortType::MANAGEMENT_PORT: + return {cfg::StreamType::UNICAST}; + // return {getDefaultStreamType()}; + case cfg::PortType::FABRIC_PORT: + return {cfg::StreamType::FABRIC_TX}; + case cfg::PortType::RECYCLE_PORT: + case cfg::PortType::EVENTOR_PORT: + // TODO: handle when we start modeling + // recycle port for Ebro ASIC + break; + } + throw FbossError( + "ASIC does not support:", apache::thrift::util::enumNameSafe(portType)); +} +cfg::Range64 ChenabAsic::getReservedEncapIndexRange() const { + if (getSwitchType() == cfg::SwitchType::VOQ) { + // Reserved range worked out with vendor. These ids + // are reserved in SAI-SDK implementation for use + // by NOS + return makeRange(100, 4093); + } + return HwAsic::getReservedEncapIndexRange(); +} +HwAsic::AsicVendor ChenabAsic::getAsicVendor() const { + return HwAsic::AsicVendor::ASIC_VENDOR_CHENAB; +} +std::string ChenabAsic::getVendor() const { + return "chenab_vendor"; +} +bool ChenabAsic::isSupported(Feature feature) const { + return getSwitchType() != cfg::SwitchType::FABRIC + ? isSupportedNonFabric(feature) + : isSupportedFabric(feature); +} +cfg::AsicType ChenabAsic::getAsicType() const { + return cfg::AsicType::ASIC_TYPE_CHENAB; +} +int ChenabAsic::getBufferDynThreshFromScalingFactor( + cfg::MMUScalingFactor /* scalingFactor */) const { + throw FbossError("Dynamic buffer threshold unsupported!"); +} +bool ChenabAsic::scalingFactorBasedDynamicThresholdSupported() const { + return false; +} +phy::DataPlanePhyChipType ChenabAsic::getDataPlanePhyChipType() const { + return phy::DataPlanePhyChipType::IPHY; +} +cfg::PortSpeed ChenabAsic::getMaxPortSpeed() const { + return cfg::PortSpeed::EIGHTHUNDREDG; +} +uint32_t ChenabAsic::getMaxLabelStackDepth() const { + return 3; +} +uint64_t ChenabAsic::getMMUSizeBytes() const { + return 420000; // return 108 * 1024 * 1024; +} +uint32_t ChenabAsic::getMaxMirrors() const { + // TODO - verify this + return 4; +} +uint64_t ChenabAsic::getDefaultReservedBytes( + cfg::StreamType /*streamType*/, + cfg::PortType /*portType*/) const { + // Concept of reserved bytes does not apply to GB + return 0; +} +cfg::MMUScalingFactor ChenabAsic::getDefaultScalingFactor( + cfg::StreamType /*streamType*/, + bool /*cpu*/) const { + // Concept of scaling factor does not apply returning the same value TH3 + return cfg::MMUScalingFactor::TWO; +} +int ChenabAsic::getMaxNumLogicalPorts() const { + // 256 physical lanes + cpu + return 257; +} +uint16_t ChenabAsic::getMirrorTruncateSize() const { + return 220; +} +uint32_t ChenabAsic::getMaxWideEcmpSize() const { + return 128; +} +uint32_t ChenabAsic::getMaxLagMemberSize() const { + return 512; +} +int ChenabAsic::getSystemPortIDOffset() const { + return 500; +} +uint32_t ChenabAsic::getSflowShimHeaderSize() const { + return 9; +} +std::optional ChenabAsic::getPortSerdesPreemphasis() const { + return 50; +} +uint32_t ChenabAsic::getPacketBufferUnitSize() const { + return 512; +} +uint32_t ChenabAsic::getPacketBufferDescriptorSize() const { + return 40; +} +uint32_t ChenabAsic::getMaxVariableWidthEcmpSize() const { + return 512; +} +uint32_t ChenabAsic::getMaxEcmpSize() const { + return 512; +} +uint32_t ChenabAsic::getNumCores() const { + return 12; +} +uint32_t ChenabAsic::getStaticQueueLimitBytes() const { + return 512 * 1024 * getPacketBufferUnitSize(); +} +uint32_t ChenabAsic::getNumMemoryBuffers() const { + return 1; +} +int ChenabAsic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} +int ChenabAsic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} +} // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/ChenabAsic.h b/fboss/agent/hw/switch_asics/ChenabAsic.h new file mode 100644 index 0000000000000..3f508d9869286 --- /dev/null +++ b/fboss/agent/hw/switch_asics/ChenabAsic.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#pragma once + +#include "fboss/agent/FbossError.h" +#include "fboss/agent/hw/switch_asics/HwAsic.h" + +namespace facebook::fboss { + +class ChenabAsic : public HwAsic { + public: + ChenabAsic( + cfg::SwitchType type, + std::optional id, + int16_t index, + std::optional systemPortRange, + const folly::MacAddress& mac, + std::optional sdkVersion = std::nullopt) + : HwAsic( + type, + id, + index, + systemPortRange, + mac, + sdkVersion, + {cfg::SwitchType::NPU}) {} + AsicVendor getAsicVendor() const override; + std::string getVendor() const override; + bool isSupported(Feature feature) const override; + cfg::AsicType getAsicType() const override; + int getBufferDynThreshFromScalingFactor( + cfg::MMUScalingFactor /* scalingFactor */) const override; + bool scalingFactorBasedDynamicThresholdSupported() const override; + phy::DataPlanePhyChipType getDataPlanePhyChipType() const override; + cfg::PortSpeed getMaxPortSpeed() const override; + std::set getQueueStreamTypes( + cfg::PortType portType) const override; + int getDefaultNumPortQueues( + cfg::StreamType streamType, + cfg::PortType /*portType*/) const override; + uint32_t getMaxLabelStackDepth() const override; + uint64_t getMMUSizeBytes() const override; + uint32_t getMaxMirrors() const override; + uint64_t getDefaultReservedBytes( + cfg::StreamType /*streamType*/, + cfg::PortType /*portType*/) const override; + cfg::MMUScalingFactor getDefaultScalingFactor( + cfg::StreamType /*streamType*/, + bool /*cpu*/) const override; + int getMaxNumLogicalPorts() const override; + uint16_t getMirrorTruncateSize() const override; + uint32_t getMaxWideEcmpSize() const override; + uint32_t getMaxLagMemberSize() const override; + int getSystemPortIDOffset() const override; + uint32_t getSflowShimHeaderSize() const override; + std::optional getPortSerdesPreemphasis() const override; + uint32_t getPacketBufferUnitSize() const override; + uint32_t getPacketBufferDescriptorSize() const override; + uint32_t getMaxVariableWidthEcmpSize() const override; + uint32_t getMaxEcmpSize() const override; + uint32_t getNumCores() const override; + uint32_t getStaticQueueLimitBytes() const override; + uint32_t getNumMemoryBuffers() const override; + cfg::Range64 getReservedEncapIndexRange() const override; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; + + private: + bool isSupportedFabric(Feature feature) const; + bool isSupportedNonFabric(Feature feature) const; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp b/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp index 396e037fcc72a..cb2c5697f038c 100644 --- a/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp +++ b/fboss/agent/hw/switch_asics/CredoPhyAsic.cpp @@ -95,4 +95,10 @@ uint32_t CredoPhyAsic::getStaticQueueLimitBytes() const { uint32_t CredoPhyAsic::getNumMemoryBuffers() const { throw FbossError("CredoPhyAsic doesn't support MMU feature"); } +int CredoPhyAsic::getMidPriCpuQueueId() const { + throw FbossError("Credo ASIC does not support cpu queue"); +} +int CredoPhyAsic::getHiPriCpuQueueId() const { + throw FbossError("Credo ASIC does not support cpu queue"); +} }; // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/CredoPhyAsic.h b/fboss/agent/hw/switch_asics/CredoPhyAsic.h index 01d4a6cea66cf..4b32e7ec39b77 100644 --- a/fboss/agent/hw/switch_asics/CredoPhyAsic.h +++ b/fboss/agent/hw/switch_asics/CredoPhyAsic.h @@ -76,5 +76,7 @@ class CredoPhyAsic : public HwAsic { cfg::MMUScalingFactor scalingFactor) const override; uint32_t getStaticQueueLimitBytes() const override; uint32_t getNumMemoryBuffers() const override; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/EbroAsic.cpp b/fboss/agent/hw/switch_asics/EbroAsic.cpp index a7ec4bc25a7d9..03e2d71bd6f1e 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.cpp +++ b/fboss/agent/hw/switch_asics/EbroAsic.cpp @@ -85,6 +85,7 @@ bool EbroAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::RESERVED_ENCAP_INDEX_RANGE: @@ -187,6 +188,8 @@ bool EbroAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; case HwAsic::Feature::SAI_ACL_ENTRY_SRC_PORT_QUALIFIER: /* diff --git a/fboss/agent/hw/switch_asics/EbroAsic.h b/fboss/agent/hw/switch_asics/EbroAsic.h index 9a9ed0144fa2b..dad07c1cc7e56 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.h +++ b/fboss/agent/hw/switch_asics/EbroAsic.h @@ -2,7 +2,6 @@ #pragma once -#include "fboss/agent/FbossError.h" #include "fboss/agent/hw/sai/impl/util.h" #include "fboss/agent/hw/switch_asics/TajoAsic.h" @@ -57,7 +56,9 @@ class EbroAsic : public TajoAsic { cfg::StreamType streamType, cfg::PortType /*portType*/) const override; uint32_t getMaxLabelStackDepth() const override { - return 3; + // sdk > 1.42.8 MAX_LABEL_STACK_SIZE = 9 sai/src/sai_device_params.h + // Remove this once new SDK rolls out + return isP4WarmbootEnabled() ? 9 : 3; } uint64_t getMMUSizeBytes() const override { return 108 * 1024 * 1024; diff --git a/fboss/agent/hw/switch_asics/FakeAsic.h b/fboss/agent/hw/switch_asics/FakeAsic.h index 8b1b51ee64681..1bef8be456243 100644 --- a/fboss/agent/hw/switch_asics/FakeAsic.h +++ b/fboss/agent/hw/switch_asics/FakeAsic.h @@ -52,6 +52,7 @@ class FakeAsic : public HwAsic { case HwAsic::Feature::LINK_INACTIVE_BASED_ISOLATE: case HwAsic::Feature::ANY_TRAP_DROP_COUNTER: case HwAsic::Feature::LINK_ACTIVE_INACTIVE_NOTIFY: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; default: @@ -212,5 +213,11 @@ class FakeAsic : public HwAsic { uint32_t getNumMemoryBuffers() const override { return 0; } + int getMidPriCpuQueueId() const override { + throw FbossError("Fake ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Fake ASIC does not support cpu queue"); + } }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/HwAsic.cpp b/fboss/agent/hw/switch_asics/HwAsic.cpp index e8c739bed872f..3f805c42e0879 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.cpp +++ b/fboss/agent/hw/switch_asics/HwAsic.cpp @@ -10,6 +10,7 @@ #include "fboss/agent/hw/switch_asics/HwAsic.h" #include #include "fboss/agent/FbossError.h" +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" #include "fboss/agent/hw/switch_asics/CredoPhyAsic.h" #include "fboss/agent/hw/switch_asics/EbroAsic.h" #include "fboss/agent/hw/switch_asics/FakeAsic.h" @@ -106,6 +107,9 @@ std::unique_ptr HwAsic::makeAsic( case cfg::AsicType::ASIC_TYPE_YUBA: return std::make_unique( switchType, switchId, switchIndex, systemPortRange, mac, sdkVersion); + case cfg::AsicType::ASIC_TYPE_CHENAB: + return std::make_unique( + switchType, switchId, switchIndex, systemPortRange, mac, sdkVersion); case cfg::AsicType::ASIC_TYPE_JERICHO2: return std::make_unique( switchType, switchId, switchIndex, systemPortRange, mac, sdkVersion); diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index 09a7e23c9f4b9..08b75f8b4e31e 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -196,6 +196,9 @@ class HwAsic { INGRESS_PRIORITY_GROUP_SHARED_WATERMARK, MULTIPLE_EGRESS_BUFFER_POOL, ENABLE_DELAY_DROP_CONGESTION_THRESHOLD, + PORT_MTU_ERROR_TRAP, + L3_INTF_MTU, + DEDICATED_CPU_BUFFER_POOL, }; enum class AsicMode { @@ -208,6 +211,7 @@ class HwAsic { ASIC_VENDOR_TAJO, ASIC_VENDOR_CREDO, ASIC_VENDOR_MARVELL, + ASIC_VENDOR_CHENAB, ASIC_VENDOR_MOCK, ASIC_VENDOR_FAKE, }; @@ -407,6 +411,9 @@ class HwAsic { return 32; } + virtual int getMidPriCpuQueueId() const = 0; + virtual int getHiPriCpuQueueId() const = 0; + protected: static cfg::Range64 makeRange(int64_t min, int64_t max); diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp index c6f90b5ad4974..4ce365512a903 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp @@ -4,6 +4,11 @@ #include #include "fboss/agent/AgentFeatures.h" +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 3; +static constexpr int kDefaultHiPriCpuQueueId = 7; +} // namespace + namespace facebook::fboss { bool Jericho2Asic::isSupported(Feature feature) const { @@ -86,6 +91,7 @@ bool Jericho2Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::UDF_HASH_FIELD_QUERY: case HwAsic::Feature::IN_PAUSE_INCREMENTS_DISCARDS: @@ -186,6 +192,8 @@ bool Jericho2Asic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; @@ -287,4 +295,12 @@ Jericho2Asic::desiredLoopbackModes() const { {cfg::PortType::RECYCLE_PORT, cfg::PortLoopbackMode::NONE}}; return kLoopbackMode; } + +int Jericho2Asic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} + +int Jericho2Asic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.h b/fboss/agent/hw/switch_asics/Jericho2Asic.h index 3bb34b97e0059..8b1eb631dd7b3 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.h +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.h @@ -122,6 +122,8 @@ class Jericho2Asic : public BroadcomAsic { uint32_t getMaxHashSeedLength() const override { return 16; } + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp index 9afc523f9811b..4867aa294b5db 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp @@ -3,6 +3,11 @@ #include "fboss/agent/hw/switch_asics/Jericho3Asic.h" #include +namespace { +static constexpr int kDefaultMidPriCpuQueueId = 3; +static constexpr int kDefaultHiPriCpuQueueId = 7; +} // namespace + namespace facebook::fboss { bool Jericho3Asic::isSupported(Feature feature) const { @@ -71,7 +76,6 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_FEC_CODEWORDS_STATS: case HwAsic::Feature::CRC_ERROR_DETECT: case HwAsic::Feature::ACL_METADATA_QUALIFER: - case HwAsic::Feature::L3_MTU_ERROR_TRAP: case HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW: case HwAsic::Feature::SFLOWv6: case HwAsic::Feature::ZERO_SDK_WRITE_WARMBOOT: @@ -89,6 +93,7 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::NO_RX_REASON_TRAP: case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return true; // Features not expected to work on SIM case HwAsic::Feature::SHARED_INGRESS_EGRESS_BUFFER_POOL: @@ -190,6 +195,9 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::DATA_CELL_FILTER: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::L3_MTU_ERROR_TRAP: + case HwAsic::Feature::L3_INTF_MTU: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; @@ -352,4 +360,12 @@ std::vector> Jericho3Asic::getPortGroups() const { } return portGroups; } + +int Jericho3Asic::getMidPriCpuQueueId() const { + return kDefaultMidPriCpuQueueId; +} + +int Jericho3Asic::getHiPriCpuQueueId() const { + return kDefaultHiPriCpuQueueId; +} } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.h b/fboss/agent/hw/switch_asics/Jericho3Asic.h index c232e13184fd4..47724d04da408 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.h +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.h @@ -143,6 +143,8 @@ class Jericho3Asic : public BroadcomAsic { std::optional computePortGroupSkew( const std::map& portId2cableLen) const override; std::vector> getPortGroups() const; + int getMidPriCpuQueueId() const override; + int getHiPriCpuQueueId() const override; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/MockAsic.h b/fboss/agent/hw/switch_asics/MockAsic.h index 86766d2853ef9..506b9b065e0ff 100644 --- a/fboss/agent/hw/switch_asics/MockAsic.h +++ b/fboss/agent/hw/switch_asics/MockAsic.h @@ -207,6 +207,12 @@ class MockAsic : public HwAsic { uint32_t getNumMemoryBuffers() const override { return 0; } + int getMidPriCpuQueueId() const override { + throw FbossError("Mock ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Mock ASIC does not support cpu queue"); + } }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Ramon3Asic.h b/fboss/agent/hw/switch_asics/Ramon3Asic.h index 827ebabf8a050..81c642d5f13fb 100644 --- a/fboss/agent/hw/switch_asics/Ramon3Asic.h +++ b/fboss/agent/hw/switch_asics/Ramon3Asic.h @@ -89,6 +89,12 @@ class Ramon3Asic : public BroadcomAsic { FabricNodeRole getFabricNodeRole() const override { return fabricNodeRole_; } + int getMidPriCpuQueueId() const override { + throw FbossError("Ramon3 ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Ramon3 ASIC does not support cpu queue"); + } private: FabricNodeRole fabricNodeRole_; diff --git a/fboss/agent/hw/switch_asics/RamonAsic.h b/fboss/agent/hw/switch_asics/RamonAsic.h index e05fc82e98296..4280b75fecbaa 100644 --- a/fboss/agent/hw/switch_asics/RamonAsic.h +++ b/fboss/agent/hw/switch_asics/RamonAsic.h @@ -82,6 +82,12 @@ class RamonAsic : public BroadcomAsic { FabricNodeRole getFabricNodeRole() const override { return fabricNodeRole_; } + int getMidPriCpuQueueId() const override { + throw FbossError("Ramon ASIC does not support cpu queue"); + } + int getHiPriCpuQueueId() const override { + throw FbossError("Ramon ASIC does not support cpu queue"); + } private: FabricNodeRole fabricNodeRole_; diff --git a/fboss/agent/hw/switch_asics/TajoAsic.h b/fboss/agent/hw/switch_asics/TajoAsic.h index 5d08b55e1e85c..8ab306a6eac81 100644 --- a/fboss/agent/hw/switch_asics/TajoAsic.h +++ b/fboss/agent/hw/switch_asics/TajoAsic.h @@ -36,6 +36,16 @@ class TajoAsic : public HwAsic { cfg::MMUScalingFactor /* scalingFactor */) const override { throw FbossError("Dynamic buffer threshold unsupported!"); } + int getMidPriCpuQueueId() const override { + return kDefaultMidPriCpuQueueId_; + } + int getHiPriCpuQueueId() const override { + return kDefaultMidPriCpuQueueId_; + } + + private: + static constexpr int kDefaultMidPriCpuQueueId_ = 2; + static constexpr int kDefaultHiPriCpuQueueId_ = 7; }; } // namespace facebook::fboss diff --git a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp index af34e88eb5376..334a6914be684 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp @@ -93,6 +93,7 @@ bool Tomahawk3Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_PRBS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::QCM: case HwAsic::Feature::SMAC_EQUALS_DMAC_CHECK_ENABLED: @@ -180,6 +181,8 @@ bool Tomahawk3Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp index ef8e2bc1675c4..43411ed5651b4 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp @@ -115,6 +115,7 @@ bool Tomahawk4Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_PRBS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; // features not working well with bcmsim case HwAsic::Feature::MIRROR_PACKET_TRUNCATION: @@ -199,6 +200,8 @@ bool Tomahawk4Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp index 8089078b34263..49325c85dad57 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp @@ -98,6 +98,7 @@ bool Tomahawk5Asic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::SAI_PRBS: + case HwAsic::Feature::L3_INTF_MTU: return true; // features not working well with bcmsim case HwAsic::Feature::MIRROR_PACKET_TRUNCATION: @@ -182,6 +183,8 @@ bool Tomahawk5Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.h b/fboss/agent/hw/switch_asics/Tomahawk5Asic.h index 4f61a4c099c7c..6675427c9bddc 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.h +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.h @@ -84,6 +84,17 @@ class Tomahawk5Asic : public BroadcomXgsAsic { // TODO: update numbers if necessary return 4096; } + std::optional getMaxEcmpGroups() const override { + return 4096; + } + std::optional getMaxEcmpMembers() const override { + // CS00012330051 + return 32000; + } + std::optional getMaxDlbEcmpGroups() const override { + // TODO: old TH4 number, update if necessary + return 128; + } uint32_t getStaticQueueLimitBytes() const override { // TODO: update numbers if necessary return getMMUSizeBytes() / 2; diff --git a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp index 3cc4371db118c..ac461313d44f2 100644 --- a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp +++ b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp @@ -77,6 +77,7 @@ bool TomahawkAsic::isSupported(Feature feature) const { case HwAsic::Feature::SAI_PRBS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ERSPANv6: case HwAsic::Feature::SFLOWv6: @@ -180,6 +181,8 @@ bool TomahawkAsic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Trident2Asic.cpp b/fboss/agent/hw/switch_asics/Trident2Asic.cpp index 20256e5cb3d85..a805d3a7ae540 100644 --- a/fboss/agent/hw/switch_asics/Trident2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Trident2Asic.cpp @@ -55,6 +55,7 @@ bool Trident2Asic::isSupported(Feature feature) const { case HwAsic::Feature::PORT_SERDES_ZERO_PREEMPHASIS: case HwAsic::Feature::SAI_ECMP_HASH_ALGORITHM: case HwAsic::Feature::ACL_BYTE_COUNTER: + case HwAsic::Feature::L3_INTF_MTU: return true; case HwAsic::Feature::ERSPANv6: case HwAsic::Feature::SFLOWv4: @@ -180,6 +181,8 @@ bool Trident2Asic::isSupported(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/YubaAsic.cpp b/fboss/agent/hw/switch_asics/YubaAsic.cpp index 539c1b14c6eac..1ab7b5e514189 100644 --- a/fboss/agent/hw/switch_asics/YubaAsic.cpp +++ b/fboss/agent/hw/switch_asics/YubaAsic.cpp @@ -87,6 +87,8 @@ bool YubaAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_SHARED_WATERMARK: case HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL: + case HwAsic::Feature::L3_INTF_MTU: + case HwAsic::Feature::DEDICATED_CPU_BUFFER_POOL: return true; case HwAsic::Feature::ACL_BYTE_COUNTER: case HwAsic::Feature::SAI_MPLS_LABEL_LOOKUP_FAIL_COUNTER: @@ -186,6 +188,7 @@ bool YubaAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::NO_RX_REASON_TRAP: case HwAsic::Feature::EGRESS_GVOQ_WATERMARK_BYTES: case HwAsic::Feature::ENABLE_DELAY_DROP_CONGESTION_THRESHOLD: + case HwAsic::Feature::PORT_MTU_ERROR_TRAP: return false; } return false; diff --git a/fboss/agent/hw/test/BUCK b/fboss/agent/hw/test/BUCK index 7d33b26be1659..8fa7bd3181069 100644 --- a/fboss/agent/hw/test/BUCK +++ b/fboss/agent/hw/test/BUCK @@ -321,7 +321,6 @@ hw_test_common_srcs = [ "HwVerifyPfcConfigInHwTest.cpp", "HwIngressBufferTests.cpp", "HwAclStatTests.cpp", - "HwPortTests.cpp", "HwTestFabricUtils.cpp", "HwFlexPortTests.cpp", "HwEcmpTrunkTests.cpp", @@ -377,7 +376,6 @@ hw_dataplane_test_srcs = [ "dataplane_tests/HwSflowTests.cpp", "dataplane_tests/HwTrunkLoadBalancerTests.cpp", "dataplane_tests/HwTeFlowTrafficTests.cpp", - "dataplane_tests/HwTrafficPfcTests.cpp", "dataplane_tests/HwRouteStatTests.cpp", ] @@ -431,10 +429,8 @@ cpp_library( "//fboss/agent:packet", "//fboss/agent:platform_base", "//fboss/agent:route_update_wrapper", - "//fboss/agent:stats", "//fboss/agent:switch_config-cpp2-types", "//fboss/agent:switchid_scope_resolver", - "//fboss/agent:utils", "//fboss/agent:validated_shell_commands-cpp2-types", "//fboss/agent/hw:counter_utils", "//fboss/agent/hw:hardware_stats-cpp2-types", @@ -467,7 +463,6 @@ cpp_library( "//fboss/agent/test/utils:port_stats_test_utils", "//fboss/agent/test/utils:queue_per_host_test_utils", "//fboss/agent/test/utils:stats_test_utils", - "//fboss/agent/test/utils:traffic_policy_utils", "//fboss/agent/test/utils:trap_packet_utils", "//fboss/lib:common_utils", "//fboss/lib/phy:phy_utils", @@ -550,7 +545,6 @@ cpp_library( "//fboss/agent/test/utils:port_stats_test_utils", "//fboss/agent/test/utils:queue_per_host_test_utils", "//fboss/agent/test/utils:stats_test_utils", - "//fboss/agent/test/utils:traffic_policy_utils", "//fboss/lib:common_utils", "//fboss/lib/phy:phy_utils", "//folly:file_util", diff --git a/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp b/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp index 04f31eacd9d09..6baf96c6092af 100644 --- a/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp +++ b/fboss/agent/hw/test/HwHashPolarizationTestUtils.cpp @@ -42,6 +42,7 @@ std::unique_ptr> getFullHashedPackets( case cfg::AsicType::ASIC_TYPE_FAKE: case cfg::AsicType::ASIC_TYPE_MOCK: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_TOMAHAWK3: case cfg::AsicType::ASIC_TYPE_TOMAHAWK4: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: @@ -70,6 +71,7 @@ std::unique_ptr> getFullHashedPackets( case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_FAKE: case cfg::AsicType::ASIC_TYPE_MOCK: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: diff --git a/fboss/agent/hw/test/HwIngressBufferTests.cpp b/fboss/agent/hw/test/HwIngressBufferTests.cpp index 59faeb194f881..1e06d0f266153 100644 --- a/fboss/agent/hw/test/HwIngressBufferTests.cpp +++ b/fboss/agent/hw/test/HwIngressBufferTests.cpp @@ -219,6 +219,67 @@ TEST_F(HwIngressBufferTest, validatePGParamChange) { verifyAcrossWarmBoots(setup, verify); } +// For each of the below transitions, ensure headroom is programmed +TEST_F(HwIngressBufferTest, validatePGHeadroomLimitChange) { + auto setup = [&]() { + // Start with PG0 and PG1 with non-zero headroom + setupHelper(); + + // Modify PG1 headroom value + // This ensure the new value is getting programmed after config update + std::map> portPgConfigMap; + auto portPgConfigs = getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {0}, 0); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {1}, 1)[0]); + portPgConfigMap["foo"] = portPgConfigs; + cfg_.portPgConfigs() = portPgConfigMap; + applyNewConfig(cfg_); + utility::checkSwHwPgCfgMatch( + getHwSwitch(), + getProgrammedState()->getPorts()->getNodeIf( + PortID(masterLogicalInterfacePortIds()[0])), + true /*pfcEnable*/); + + // Make PG1 headroom 0 and add a new PG2 with 0 headroom + portPgConfigs = getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {0}, 0); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {1}, 1, false)[0]); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {2}, 0, false)[0]); + portPgConfigMap["foo"] = portPgConfigs; + cfg_.portPgConfigs() = portPgConfigMap; + applyNewConfig(cfg_); + utility::checkSwHwPgCfgMatch( + getHwSwitch(), + getProgrammedState()->getPorts()->getNodeIf( + PortID(masterLogicalInterfacePortIds()[0])), + true /*pfcEnable*/); + + // Remove PG1 and update PG2 headrrom to non-zero + // This ensure counters are accurately updated per PG. PFC counters are + // are created only for non-zero headroom PGs + portPgConfigs = getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {0}, 0); + portPgConfigs.push_back(getPortPgConfig( + getPlatform()->getAsic()->getPacketBufferUnitSize(), {2}, 0)[0]); + portPgConfigMap["foo"] = portPgConfigs; + cfg_.portPgConfigs() = portPgConfigMap; + applyNewConfig(cfg_); + }; + + auto verify = [&]() { + utility::checkSwHwPgCfgMatch( + getHwSwitch(), + getProgrammedState()->getPorts()->getNodeIf( + PortID(masterLogicalInterfacePortIds()[0])), + true /*pfcEnable*/); + }; + + verifyAcrossWarmBoots(setup, verify); +} + // Validate the Pg's pfc mode bit, by default we have been enabling // PFC on the port and hence on every PG. Force the port to have no // PFC. Validate that Pg's pfc mode is False now. diff --git a/fboss/agent/hw/test/HwPortProfileTests.cpp b/fboss/agent/hw/test/HwPortProfileTests.cpp index a3cf34b1c50c4..24720e97dbfe2 100644 --- a/fboss/agent/hw/test/HwPortProfileTests.cpp +++ b/fboss/agent/hw/test/HwPortProfileTests.cpp @@ -94,6 +94,8 @@ class HwPortProfileTest : public HwTest { cfg::AsicType::ASIC_TYPE_TRIDENT2 || getPlatform()->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_FAKE || + getPlatform()->getAsic()->getAsicType() == + cfg::AsicType::ASIC_TYPE_CHENAB || getPlatform()->getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_MOCK) { return; diff --git a/fboss/agent/hw/test/HwPortTests.cpp b/fboss/agent/hw/test/HwPortTests.cpp deleted file mode 100644 index d97566ae69ad6..0000000000000 --- a/fboss/agent/hw/test/HwPortTests.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2004-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ -#include "fboss/agent/hw/test/HwTest.h" - -#include -#include "fboss/agent/ApplyThriftConfig.h" -#include "fboss/agent/FbossError.h" -#include "fboss/agent/gen-cpp2/switch_config_types.h" -#include "fboss/agent/hw/CounterUtils.h" -#include "fboss/agent/hw/test/HwPortUtils.h" -#include "fboss/agent/hw/test/HwTestPortUtils.h" -#include "fboss/agent/state/StateDelta.h" -#include "fboss/agent/state/SwitchState.h" - -#include "fboss/agent/hw/test/ConfigFactory.h" - -#include - -namespace facebook::fboss { - -class HwPortTest : public HwTest { - protected: - cfg::SwitchConfig initialConfig() const { - return utility::onePortPerInterfaceConfig( - getHwSwitch(), - masterLogicalPortIds(), - getAsic()->desiredLoopbackModes(), - false /*interfaceHasSubnet*/, - false, /*setInterfaceMac*/ - utility::kBaseVlanId, - true); - } - - private: - bool hideFabricPorts() const override { - return false; - } -}; - -TEST_F(HwPortTest, PortLoopbackMode) { - auto setup = [this]() { applyNewConfig(initialConfig()); }; - auto verify = [this]() { - for (const auto& loopbackMode : getAsic()->desiredLoopbackModes()) { - std::map port2LoopbackMode = { - {PortID(masterLogicalPortIds({loopbackMode.first})[0]), - utility::getLoopbackMode(loopbackMode.second)}}; - utility::assertPortsLoopbackMode(getHwSwitch(), port2LoopbackMode); - } - }; - - verifyAcrossWarmBoots(setup, verify); -} - -} // namespace facebook::fboss diff --git a/fboss/agent/hw/test/HwRouteTests.cpp b/fboss/agent/hw/test/HwRouteTests.cpp index 4df02d662f535..053f3174c4771 100644 --- a/fboss/agent/hw/test/HwRouteTests.cpp +++ b/fboss/agent/hw/test/HwRouteTests.cpp @@ -8,30 +8,13 @@ * */ #include "fboss/agent/hw/test/HwLinkStateDependentTest.h" -#include "fboss/agent/state/LabelForwardingAction.h" -#include "fboss/agent/hw/switch_asics/HwAsic.h" +#include "fboss/agent/AddressUtil.h" #include "fboss/agent/hw/test/ConfigFactory.h" -#include "fboss/agent/hw/test/HwTestMplsUtils.h" -#include "fboss/agent/hw/test/HwTestPacketUtils.h" #include "fboss/agent/hw/test/HwTestRouteUtils.h" -#include "fboss/agent/packet/PktFactory.h" -#include "fboss/agent/packet/PktUtil.h" -#include "fboss/agent/state/NodeBase-defs.h" -#include "fboss/agent/state/Port.h" -#include "fboss/agent/state/StateUtils.h" -#include "fboss/agent/test/EcmpSetupHelper.h" -#include "fboss/agent/test/utils/CoppTestUtils.h" -#include "fboss/agent/test/utils/OlympicTestUtils.h" -#include "fboss/lib/CommonUtils.h" - -#include "fboss/agent/AddressUtil.h" -#include "fboss/agent/if/gen-cpp2/common_types.h" #include "folly/IPAddressV4.h" #include "folly/IPAddressV6.h" -#include - using facebook::network::toBinaryAddress; DECLARE_bool(intf_nbr_tables); @@ -61,41 +44,6 @@ class HwRouteTest : public HwLinkStateDependentTest { return RouterID(0); } - cfg::AclLookupClass kLookupClass() const { - return cfg::AclLookupClass::CLASS_QUEUE_PER_HOST_QUEUE_2; - } - - std::vector portDescs() const { - std::vector ports; - for (auto i = 0; i < 4; ++i) { - ports.push_back(PortDescriptor(masterLogicalInterfacePortIds()[i])); - } - return ports; - } - RoutePrefix getSubnetIpForInterface() const { - auto state = this->getProgrammedState(); - const VlanID vlanID{utility::kBaseVlanId}; - auto vlan = state->getVlans()->getNodeIf(vlanID); - auto interface = state->getInterfaces()->getNodeIf(vlan->getInterfaceID()); - if (interface) { - for (auto iter : std::as_const(*interface->getAddresses())) { - std::pair address( - folly::IPAddress(iter.first), iter.second->ref()); - if constexpr (std::is_same_v) { - if (address.first.isV4()) { - return RoutePrefix{ - address.first.asV4(), address.second}; - } - } else { - if (address.first.isV6()) { - return RoutePrefix{ - address.first.asV6(), address.second}; - } - } - } - } - XLOG(FATAL) << "Invald configuration vlan " << utility::kBaseVlanId; - } const std::vector> kGetRoutePrefixes() const { if constexpr (std::is_same_v) { static const std::vector> routePrefixes = { @@ -120,23 +68,6 @@ class HwRouteTest : public HwLinkStateDependentTest { } } - RoutePrefix kDefaultPrefix() const { - if constexpr (std::is_same_v) { - return RoutePrefix{folly::IPAddressV4{"0.0.0.0"}, 0}; - - } else { - return RoutePrefix{folly::IPAddressV6{"::"}, 0}; - } - } - - const AddrT kStaticIp2MplsNextHop() const { - if constexpr (std::is_same_v) { - return folly::IPAddressV4{"10.10.1.1"}; - } else { - return folly::IPAddressV6{"2803:6080:d038:3063::1"}; - } - } - RoutePrefix kGetRoutePrefix0() const { return kGetRoutePrefixes()[0]; } @@ -152,586 +83,8 @@ class HwRouteTest : public HwLinkStateDependentTest { RoutePrefix kGetRoutePrefix3() const { return kGetRoutePrefixes()[3]; } - - std::shared_ptr addRoutes( - const std::shared_ptr& inState, - const std::vector>& routePrefixes) { - auto kEcmpWidth = 1; - utility::EcmpSetupAnyNPorts ecmpHelper(inState, kRouterID()); - applyNewState(ecmpHelper.resolveNextHops(getProgrammedState(), kEcmpWidth)); - ecmpHelper.programRoutes( - this->getRouteUpdater(), kEcmpWidth, routePrefixes); - return getProgrammedState(); - } - - void verifyClassIDHelper( - RoutePrefix routePrefix, - std::optional classID) { - EXPECT_EQ( - utility::getHwRouteClassID( - this->getHwSwitch(), - kRouterID(), - folly::CIDRNetwork(routePrefix.network(), routePrefix.mask())), - classID); - } }; -using IpTypes = ::testing::Types; - -TYPED_TEST_SUITE(HwRouteTest, IpTypes); - -TYPED_TEST(HwRouteTest, VerifyClassID) { - auto setup = [=, this]() { - // 3 routes r0, r1, r2. r0 & r1 have classID, r2 does not. - this->addRoutes( - this->getProgrammedState(), - {this->kGetRoutePrefix0(), - this->kGetRoutePrefix1(), - this->kGetRoutePrefix2()}); - auto updater = this->getHwSwitchEnsemble()->getRouteUpdater(); - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix0().toCidrNetwork(), - this->kGetRoutePrefix1().toCidrNetwork()}, - this->kLookupClass(), - false /*sync*/); - - // verify classID programming - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - this->verifyClassIDHelper(this->kGetRoutePrefix1(), this->kLookupClass()); - this->verifyClassIDHelper(this->kGetRoutePrefix2(), std::nullopt); - - // remove r1's classID, add classID for r2 - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix1().toCidrNetwork()}, - std::nullopt, - false /*sync*/); - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix2().toCidrNetwork()}, - this->kLookupClass(), - false /*sync*/); - }; - - auto verify = [=, this]() { - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - this->verifyClassIDHelper(this->kGetRoutePrefix1(), std::nullopt); - this->verifyClassIDHelper(this->kGetRoutePrefix2(), this->kLookupClass()); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, VerifyClassIDForConnectedRoute) { - auto verify = [=, this]() { - auto ipAddr = this->getSubnetIpForInterface(); - // verify if the connected route of the interface is present - utility::isHwRoutePresent( - this->getHwSwitch(), this->kRouterID(), ipAddr.toCidrNetwork()); - if (this->getPlatform()->getAsic()->getAsicVendor() != - HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { - if (FLAGS_set_classid_for_my_subnet_and_ip_routes) { - this->verifyClassIDHelper( - ipAddr, cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2); - } - } - }; - - this->verifyAcrossWarmBoots([] {}, verify); -} - -TYPED_TEST(HwRouteTest, VerifyClassIdWithNhopResolutionFlap) { - auto setup = [=, this]() { - this->addRoutes(this->getProgrammedState(), {this->kGetRoutePrefix0()}); - auto updater = this->getHwSwitchEnsemble()->getRouteUpdater(); - updater.programClassID( - this->kRouterID(), - {this->kGetRoutePrefix0().toCidrNetwork()}, - this->kLookupClass(), - false /*sync*/); - - // verify classID programming - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - auto kEcmpWidth = 1; - using AddrT = typename TestFixture::Type; - utility::EcmpSetupAnyNPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - // Unresolve nhop - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), kEcmpWidth)); - // Resolve nhop - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), kEcmpWidth)); - }; - auto verify = [=, this]() { - this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, UnresolvedAndResolvedNextHop) { - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[0]}, {this->kGetRoutePrefix0()}); - - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[1]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[1]}, {this->kGetRoutePrefix1()}); - }; - auto verify = [=, this]() { - auto routePrefix0 = this->kGetRoutePrefix0(); - auto cidr0 = - folly::CIDRNetwork(routePrefix0.network(), routePrefix0.mask()); - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_FALSE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr0)); - - auto routePrefix1 = this->kGetRoutePrefix1(); - auto cidr1 = - folly::CIDRNetwork(routePrefix1.network(), routePrefix1.mask()); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr1, - ecmpHelper.nhop(ports[1]).ip)); - EXPECT_FALSE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr1)); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, UnresolveResolvedNextHop) { - using AddrT = typename TestFixture::Type; - - auto setup = [=, this]() { - utility::EcmpSetupAnyNPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), 1)); - - ecmpHelper.programRoutes( - this->getRouteUpdater(), 1, {this->kGetRoutePrefix0()}); - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), 1)); - }; - auto verify = [=, this]() { - auto routePrefix = this->kGetRoutePrefix0(); - auto cidr = folly::CIDRNetwork(routePrefix.network(), routePrefix.mask()); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - EXPECT_FALSE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr)); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, UnresolvedAndResolvedMultiNextHop) { - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[0], ports[1]}, - {this->kGetRoutePrefix0()}); - - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), {ports[2], ports[3]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[2], ports[3]}, - {this->kGetRoutePrefix1()}); - }; - auto verify = [=, this]() { - auto routePrefix0 = this->kGetRoutePrefix0(); - auto cidr0 = - folly::CIDRNetwork(routePrefix0.network(), routePrefix0.mask()); - EXPECT_FALSE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_TRUE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr0)); - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - EXPECT_FALSE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[0]).ip)); - EXPECT_FALSE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[1]).ip)); - - auto routePrefix1 = this->kGetRoutePrefix1(); - auto cidr1 = - folly::CIDRNetwork(routePrefix1.network(), routePrefix1.mask()); - EXPECT_FALSE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr1)); - EXPECT_TRUE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr1)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr1, - ecmpHelper.nhop(ports[2]).ip)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr1, - ecmpHelper.nhop(ports[3]).ip)); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, ResolvedMultiNexthopToUnresolvedSingleNexthop) { - auto ports = this->portDescs(); - using AddrT = typename TestFixture::Type; - auto verify = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), {ports[0], ports[1]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[0], ports[1]}, - {this->kGetRoutePrefix0()}); - auto routePrefix0 = this->kGetRoutePrefix0(); - auto cidr0 = - folly::CIDRNetwork(routePrefix0.network(), routePrefix0.mask()); - EXPECT_FALSE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_TRUE(utility::isHwRouteMultiPath( - this->getHwSwitch(), this->kRouterID(), cidr0)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[0]).ip)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr0, - ecmpHelper.nhop(ports[1]).ip)); - this->applyNewState(ecmpHelper.unresolveNextHops( - this->getProgrammedState(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), - PortDescriptor(this->masterLogicalInterfacePortIds()[1])})); - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0])})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0])}, - {this->kGetRoutePrefix0()}); - }; - this->verifyAcrossWarmBoots([] {}, verify); -} - -TYPED_TEST(HwRouteTest, StaticIp2MplsRoutes) { - using AddrT = typename TestFixture::Type; - - auto setup = [=, this]() { - auto config = this->initialConfig(); - - config.staticIp2MplsRoutes()->resize(1); - config.staticIp2MplsRoutes()[0].prefix() = this->kGetRoutePrefix1().str(); - - NextHopThrift nexthop; - nexthop.address() = toBinaryAddress(folly::IPAddress( - this->kStaticIp2MplsNextHop().str())); // in prefix 0 subnet - MplsAction action; - action.action() = MplsActionCode::PUSH; - action.pushLabels() = {1001, 1002}; - nexthop.mplsAction() = action; - - config.staticIp2MplsRoutes()[0].nexthops()->resize(1); - config.staticIp2MplsRoutes()[0].nexthops()[0] = nexthop; - this->applyNewConfig(config); - - // resolve prefix 0 subnet - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), - PortDescriptor(this->masterLogicalInterfacePortIds()[1])}, - {this->kGetRoutePrefix0()}); - - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), - {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), - PortDescriptor(this->masterLogicalInterfacePortIds()[1])})); - }; - auto verify = [=, this]() { - // prefix 1 subnet reachable via prefix 0 with mpls stack over this stack - utility::verifyProgrammedStack( - this->getHwSwitch(), - this->kGetRoutePrefix1(), - InterfaceID(utility::kBaseVlanId), - {1001, 1002}, - 1); - utility::verifyProgrammedStack( - this->getHwSwitch(), - this->kGetRoutePrefix1(), - InterfaceID(utility::kBaseVlanId + 1), - {1001, 1002}, - 1); - }; - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, VerifyRouting) { - if (this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE || - this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_MOCK) { - GTEST_SKIP(); - return; - } - using AddrT = typename TestFixture::Type; - auto constexpr isV4 = std::is_same_v; - auto ports = this->portDescs(); - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[0]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[0]}, {this->kDefaultPrefix()}); - }; - auto verify = [=, this]() { - const auto egressPort = ports[0].phyPortID(); - auto vlanId = utility::firstVlanID(this->initialConfig()); - auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); - - auto beforeOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - auto v4TxPkt = utility::makeUDPTxPacket( - this->getHwSwitch(), - vlanId, - intfMac, - intfMac, - folly::IPAddressV4("101.0.0.1"), - folly::IPAddressV4("201.0.0.1"), - 1234, - 4321); - - auto v6TxPkt = utility::makeUDPTxPacket( - this->getHwSwitch(), - vlanId, - intfMac, - intfMac, - folly::IPAddressV6("101::1"), - folly::IPAddressV6("201::1"), - 1234, - 4321); - - if (isV4) { - this->getHwSwitchEnsemble()->ensureSendPacketOutOfPort( - std::move(v4TxPkt), ports[1].phyPortID()); - } else { - this->getHwSwitchEnsemble()->ensureSendPacketOutOfPort( - std::move(v6TxPkt), ports[1].phyPortID()); - } - WITH_RETRIES({ - auto afterOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts - << " afterOutPkts: " << afterOutPkts; - EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); - }); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, verifyHostRouteChange) { - // Don't run this test on fake asic - if (this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE || - this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_MOCK) { - GTEST_SKIP(); - return; - } - - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - - auto setup = [=, this]() { - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState(ecmpHelper.resolveNextHops( - this->getProgrammedState(), {ports[0], ports[1]})); - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[1]}, {this->kGetRoutePrefix3()}); - ecmpHelper.programRoutes( - this->getRouteUpdater(), - {ports[0], ports[1]}, - {this->kGetRoutePrefix3()}); - }; - - auto verify = [=, this]() { - auto routePrefix = this->kGetRoutePrefix3(); - auto cidr = folly::CIDRNetwork(routePrefix.network(), routePrefix.mask()); - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[0]).ip)); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[1]).ip)); - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, verifyCpuRouteChange) { - // Don't run this test on fake asic - if (this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_FAKE || - this->getPlatform()->getAsic()->getAsicType() == - cfg::AsicType::ASIC_TYPE_MOCK) { - GTEST_SKIP(); - return; - } - - using AddrT = typename TestFixture::Type; - auto ports = this->portDescs(); - - auto setup = [=, this]() { - auto cfg = this->initialConfig(); - auto ensemble = this->getHwSwitchEnsemble(); - utility::addOlympicQosMaps(cfg, ensemble->getL3Asics()); - utility::setDefaultCpuTrafficPolicyConfig( - cfg, ensemble->getL3Asics(), ensemble->isSai()); - utility::addCpuQueueConfig(cfg, ensemble->getL3Asics(), ensemble->isSai()); - this->applyNewConfig(cfg); - - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - // Next hops unresolved - route should point to CPU - ecmpHelper.programRoutes( - this->getRouteUpdater(), {ports[1]}, {this->kGetRoutePrefix3()}); - }; - - auto verify = [=, this]() { - auto routePrefix = this->kGetRoutePrefix3(); - auto cidr = folly::CIDRNetwork(routePrefix.network(), routePrefix.mask()); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_TRUE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Resolve next hops - utility::EcmpSetupTargetedPorts ecmpHelper( - this->getProgrammedState(), this->kRouterID()); - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[1]).ip)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_FALSE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Verify routing - const auto egressPort = ports[1].phyPortID(); - auto vlanId = utility::firstVlanID(this->initialConfig()); - auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); - auto beforeOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - auto v6TxPkt = utility::makeUDPTxPacket( - this->getHwSwitch(), - vlanId, - intfMac, - intfMac, - this->kGetRoutePrefix0().network(), // Randomly pick src IP - routePrefix.network(), - 1234, - 4321); - this->getHwSwitchEnsemble()->ensureSendPacketOutOfPort( - std::move(v6TxPkt), ports[0].phyPortID()); - WITH_RETRIES({ - auto afterOutPkts = - *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); - XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts - << " afterOutPkts: " << afterOutPkts; - EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); - }); - - // Unresolve next hops - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_TRUE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Resolve next hops - this->applyNewState( - ecmpHelper.resolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE(utility::isHwRouteToNextHop( - this->getHwSwitch(), - this->kRouterID(), - cidr, - ecmpHelper.nhop(ports[1]).ip)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_FALSE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - - // Unresolve next hops - this->applyNewState( - ecmpHelper.unresolveNextHops(this->getProgrammedState(), {ports[1]})); - EXPECT_TRUE( - utility::isHwRouteToCpu(this->getHwSwitch(), this->kRouterID(), cidr)); - if (FLAGS_classid_for_unresolved_routes) { - EXPECT_TRUE(utility::isRouteUnresolvedToCpuClassId( - this->getHwSwitch(), this->kRouterID(), cidr)); - } - }; - - this->verifyAcrossWarmBoots(setup, verify); -} - -TYPED_TEST(HwRouteTest, VerifyDefaultRoute) { - auto verify = [=, this]() { - // default routes should exist always. - utility::isHwRoutePresent( - this->getHwSwitch(), this->kRouterID(), {folly::IPAddress("::"), 0}); - utility::isHwRoutePresent( - this->getHwSwitch(), - this->kRouterID(), - {folly::IPAddress("0.0.0.0"), 0}); - }; - this->verifyAcrossWarmBoots([] {}, verify); -} - template struct IpAddrAndEnableIntfNbrTableT { using AddrT = AddrType; diff --git a/fboss/agent/hw/test/HwSwitchEnsemble.cpp b/fboss/agent/hw/test/HwSwitchEnsemble.cpp index 35a19b8286369..85e8bfc78242a 100644 --- a/fboss/agent/hw/test/HwSwitchEnsemble.cpp +++ b/fboss/agent/hw/test/HwSwitchEnsemble.cpp @@ -52,12 +52,7 @@ DEFINE_int32( "Port for thrift server to use (use with --setup_thrift"); DEFINE_bool(mmu_lossless_mode, false, "Enable mmu lossless mode"); -DEFINE_bool( - qgroup_guarantee_enable, - false, - "Enable setting of unicast and multicast queue guaranteed buffer sizes"); DEFINE_bool(enable_exact_match, false, "enable init of exact match table"); -DEFINE_bool(skip_buffer_reservation, false, "Enable skip reservation"); using namespace std::chrono_literals; @@ -84,7 +79,9 @@ class HwEnsembleMultiSwitchThriftHandler << switchId << " for port " << *linkEvent.port() << " up :" << *linkEvent.up(); ensemble_->linkStateChanged( - PortID(*linkEvent.port()), *linkEvent.up()); + PortID(*linkEvent.port()), + *linkEvent.up(), + *linkEvent.portType()); } } co_return true; @@ -418,6 +415,7 @@ void HwSwitchEnsemble::applyInitialConfig(const cfg::SwitchConfig& initCfg) { void HwSwitchEnsemble::linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional /* iPhyFaultStatus */) { if (getHwSwitch()->getRunState() < SwitchRunState::INITIALIZED) { return; diff --git a/fboss/agent/hw/test/HwSwitchEnsemble.h b/fboss/agent/hw/test/HwSwitchEnsemble.h index 709c8b0b1dbdd..f06f0a96da12b 100644 --- a/fboss/agent/hw/test/HwSwitchEnsemble.h +++ b/fboss/agent/hw/test/HwSwitchEnsemble.h @@ -32,10 +32,8 @@ #include DECLARE_bool(mmu_lossless_mode); -DECLARE_bool(qgroup_guarantee_enable); DECLARE_bool(enable_exact_match); DECLARE_bool(flowletSwitchingEnable); -DECLARE_bool(skip_buffer_reservation); namespace folly { class FunctionScheduler; @@ -181,6 +179,7 @@ class HwSwitchEnsemble : public TestEnsembleIf { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override; void linkActiveStateChanged( diff --git a/fboss/agent/hw/test/HwTestLearningUpdateObserver.h b/fboss/agent/hw/test/HwTestLearningUpdateObserver.h index 938536349bd6e..5444e8fd29096 100644 --- a/fboss/agent/hw/test/HwTestLearningUpdateObserver.h +++ b/fboss/agent/hw/test/HwTestLearningUpdateObserver.h @@ -54,7 +54,7 @@ class HwTestLearningUpdateObserver std::vector> data_; std::unique_ptr applyStateUpdateThread_; - FbossEventBase applyStateUpdateEventBase_; + FbossEventBase applyStateUpdateEventBase_{"ApplyStateUpdateEventBase"}; }; class HwTestLearningUpdateAutoObserver : public HwTestLearningUpdateObserver { diff --git a/fboss/agent/hw/test/HwTestThriftHandler.h b/fboss/agent/hw/test/HwTestThriftHandler.h index 81a304eaff86f..49ee6be01ead9 100644 --- a/fboss/agent/hw/test/HwTestThriftHandler.h +++ b/fboss/agent/hw/test/HwTestThriftHandler.h @@ -82,6 +82,22 @@ class HwTestThriftHandler : public AgentHwTestCtrlSvIf { bool injectCorrectable) override; void injectSwitchReachabilityChangeNotification() override; + void getRouteInfo(RouteInfo& routeInfo, std::unique_ptr prefix) + override; + bool isRouteHit(std::unique_ptr prefix) override; + void clearRouteHit(std::unique_ptr prefix) override; + bool isRouteToNexthop( + std::unique_ptr prefix, + std::unique_ptr nexthop) override; + bool isProgrammedInHw( + int intfID, + std::unique_ptr prefix, + std::unique_ptr labelStack, + int refCount) override; + + void getPortInfo( + ::std::vector<::facebook::fboss::utility::PortInfo>& portInfos, + std::unique_ptr<::std::vector<::std::int32_t>> portIds) override; private: HwSwitch* hwSwitch_; diff --git a/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp b/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp index 61803d5b47d3b..d7757303a4593 100644 --- a/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp +++ b/fboss/agent/hw/test/dataplane_tests/HwAqmTests.cpp @@ -361,8 +361,7 @@ class HwAqmTest : public HwLinkStateDependentTest { // watermarks for ECN traffic for VoQ switches. auto sysPortId = getSystemPortID( portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), + getProgrammedState(), getPlatform()->getHwSwitch()->getSwitchID()); auto sysPortStats = getHwSwitchEnsemble()->getLatestSysPortStats(sysPortId); diff --git a/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp b/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp index a5fea99b13836..c77faf9e1df1f 100644 --- a/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp +++ b/fboss/agent/hw/test/dataplane_tests/HwProdInvariantHelper.cpp @@ -166,6 +166,7 @@ void HwProdInvariantHelper::verifySafeDiagCmds() { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_JERICHO2: diff --git a/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp b/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp deleted file mode 100644 index d8ae92f72a95a..0000000000000 --- a/fboss/agent/hw/test/dataplane_tests/HwTrafficPfcTests.cpp +++ /dev/null @@ -1,833 +0,0 @@ -#include - -#include "fboss/agent/Platform.h" -#include "fboss/agent/SwitchStats.h" -#include "fboss/agent/Utils.h" -#include "fboss/agent/hw/test/ConfigFactory.h" -#include "fboss/agent/hw/test/HwLinkStateDependentTest.h" -#include "fboss/agent/hw/test/HwTestCoppUtils.h" -#include "fboss/agent/hw/test/HwTestPacketUtils.h" -#include "fboss/agent/test/EcmpSetupHelper.h" - -#include "fboss/agent/hw/test/dataplane_tests/HwTestQosUtils.h" -#include "fboss/agent/state/Interface.h" -#include "fboss/agent/state/Port.h" -#include "fboss/agent/state/PortMap.h" -#include "fboss/agent/state/SwitchState.h" -#include "fboss/agent/test/ResourceLibUtil.h" - -#include "fboss/lib/CommonUtils.h" - -using folly::IPAddress; -using folly::IPAddressV6; -using std::string; - -DEFINE_bool( - skip_stop_pfc_test_traffic, - false, - "Skip stopping traffic after traffic test!"); -namespace { -static constexpr auto kGlobalSharedBytes{20000}; -static constexpr auto kGlobalHeadroomBytes{ - 5000}; // keep this lower than globalSharedBytes -static constexpr auto kPgLimitBytes{2200}; -static constexpr auto kPgResumeOffsetBytes{1800}; -static constexpr auto kPgHeadroomBytes{ - 2200}; // keep this lower than kGlobalSharedBytes -static constexpr auto kGlobalIngressEgressBufferPoolSize{ - 5064760}; // Keep a high pool size for DNX -static constexpr auto kLosslessTrafficClass{2}; -static constexpr auto kLosslessPriority{2}; -static constexpr auto kNumberOfPortsToEnablePfcOn{2}; -static const std::vector kLosslessPgIds{2, 3}; -static const std::vector kLossyPgIds{0}; -// Hardcoding register value to force PFC generation for port 2, -// kLosslessPriority for DNX. This needs to be modified if the -// port used in test or PFC priority changes! Details of how to -// compute the value to use for a port/priority is captured in -// CS00012321021. To summarize, -// value = 1 << ((port_first_phy - core_first_phy)*8 + priority, -// with port_first_phy from "port management dump full port=<>", -// core_first_phy from "dnx data dump nif.phys.nof_phys_per_core". -static const std:: - map, std::string> - kRegValToForcePfcTxForPriorityOnPortDnx = { - {std::make_tuple( - facebook::fboss::cfg::AsicType::ASIC_TYPE_JERICHO2, - 2, - 2), - "0x40000000000000000"}, - {std::make_tuple( - facebook::fboss::cfg::AsicType::ASIC_TYPE_JERICHO3, - 8, - 2), - "4"}, -}; - -struct PfcBufferParams { - int globalShared = kGlobalSharedBytes; - int globalHeadroom = kGlobalHeadroomBytes; - int pgLimit = kPgLimitBytes; - int pgHeadroom = kPgHeadroomBytes; - std::optional scalingFactor = - facebook::fboss::cfg::MMUScalingFactor::ONE_128TH; - int resumeOffset = kPgResumeOffsetBytes; -}; - -struct TrafficTestParams { - PfcBufferParams buffer = PfcBufferParams{}; - bool expectDrop = false; - bool scale = false; -}; - -std::tuple getPfcTxRxXonHwPortStats( - facebook::fboss::HwSwitchEnsemble* ensemble, - const facebook::fboss::HwPortStats& portStats, - const int pfcPriority) { - return { - portStats.get_outPfc_().at(pfcPriority), - portStats.get_inPfc_().at(pfcPriority), - ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER) - ? portStats.get_inPfcXon_().at(pfcPriority) - : 0}; -} - -bool getPfcCountersRetry( - facebook::fboss::HwSwitchEnsemble* ensemble, - const facebook::fboss::PortID& portId, - const int pfcPriority) { - int txPfcCtr = 0, rxPfcCtr = 0, rxPfcXonCtr = 0; - - auto pfcCountersIncrementing = [&](const auto& newStats) { - auto portStatsIter = newStats.find(portId); - std::tie(txPfcCtr, rxPfcCtr, rxPfcXonCtr) = - getPfcTxRxXonHwPortStats(ensemble, portStatsIter->second, pfcPriority); - XLOG(DBG0) << " Port: " << portId << " PFC TX/RX PFC/RX_PFC_XON " - << txPfcCtr << "/" << rxPfcCtr << "/" << rxPfcXonCtr - << ", priority: " << pfcPriority; - - if (ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature::PFC_XON_TO_XOFF_COUNTER)) { - return (txPfcCtr > 0 && rxPfcCtr > 0 && rxPfcXonCtr > 0); - } - return (txPfcCtr > 0 && rxPfcCtr > 0); - }; - - return ensemble->waitPortStatsCondition( - pfcCountersIncrementing, 10, std::chrono::milliseconds(500)); -} - -void validatePfcCounters( - facebook::fboss::HwSwitchEnsemble* ensemble, - const int pri, - const std::vector& portIds) { - // no need t retry if looking for baseline counter - for (const auto& portId : portIds) { - EXPECT_TRUE(getPfcCountersRetry(ensemble, portId, pri)); - } -} - -void validateBufferPoolWatermarkCounters( - facebook::fboss::HwSwitchEnsemble* ensemble, - const int /* pri */, - const std::vector& /* portIds */) { - uint64_t globalHeadroomWatermark{}; - uint64_t globalSharedWatermark{}; - WITH_RETRIES({ - ensemble->getHwSwitch()->updateStats(); - auto switchWatermarkStats = - ensemble->getHwSwitch()->getSwitchWatermarkStats(); - for (auto& headroomStats : - *switchWatermarkStats.globalHeadroomWatermarkBytes()) { - globalHeadroomWatermark += headroomStats.second; - } - for (auto& sharedStats : - *switchWatermarkStats.globalSharedWatermarkBytes()) { - globalSharedWatermark += sharedStats.second; - } - XLOG(DBG0) << "Global headroom watermark: " << globalHeadroomWatermark - << ", Global shared watermark: " << globalSharedWatermark; - if (ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature:: - INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK)) { - EXPECT_EVENTUALLY_GT(globalHeadroomWatermark, 0); - } - EXPECT_EVENTUALLY_GT(globalSharedWatermark, 0); - }); -} - -void validateIngressPriorityGroupWatermarkCounters( - facebook::fboss::HwSwitchEnsemble* ensemble, - const int pri, - const std::vector& portIds) { - std::string watermarkKeys = "shared"; - int numKeys = 1; - if (ensemble->getAsic()->isSupported( - facebook::fboss::HwAsic::Feature:: - INGRESS_PRIORITY_GROUP_HEADROOM_WATERMARK)) { - watermarkKeys.append("|headroom"); - numKeys++; - } - auto ingressPriorityGroupWatermarksIncrementing = - [&](const auto& /*newStats*/) { - for (const auto& portId : portIds) { - const auto& portName = ensemble->getProgrammedState() - ->getPorts() - ->getNodeIf(portId) - ->getName(); - std::string pg = - ensemble->isSai() ? folly::sformat(".pg{}", pri) : ""; - auto regex = folly::sformat( - "buffer_watermark_pg_({}).{}{}.p100.60", - watermarkKeys, - portName, - pg); - auto counters = facebook::fb303::fbData->getRegexCounters(regex); - CHECK_EQ(counters.size(), numKeys); - for (const auto& ctr : counters) { - XLOG(DBG0) << ctr.first << " : " << ctr.second; - if (!ctr.second) { - return false; - } - } - } - return true; - }; - EXPECT_TRUE(ensemble->waitPortStatsCondition( - ingressPriorityGroupWatermarksIncrementing, - 5, - std::chrono::milliseconds(1000))); -} - -} // namespace - -namespace facebook::fboss { - -class HwTrafficPfcTest : public HwLinkStateDependentTest { - private: - void SetUp() override { - FLAGS_mmu_lossless_mode = true; - /* - * Makes this flag available so that it can be used in early - * stages of init to setup common buffer pool for specific - * asics like Jericho2. - */ - FLAGS_ingress_egress_buffer_pool_size = kGlobalIngressEgressBufferPoolSize; - HwLinkStateDependentTest::SetUp(); - } - - cfg::SwitchConfig initialConfig() const override { - auto cfg = utility::onePortPerInterfaceConfig( - getHwSwitch(), - masterLogicalPortIds(), - getAsic()->desiredLoopbackModes()); - utility::setTTLZeroCpuConfig(getHwSwitchEnsemble()->getL3Asics(), cfg); - return cfg; - } - - std::vector portIdsForTest() { - return { - masterLogicalInterfacePortIds()[0], masterLogicalInterfacePortIds()[1]}; - } - - std::vector kDestIps() const { - return { - folly::IPAddressV6("2620:0:1cfe:face:b00c::4"), - folly::IPAddressV6("2620:0:1cfe:face:b00c::5")}; - } - - folly::MacAddress getIntfMac() const { - return utility::getFirstInterfaceMac(getProgrammedState()); - } - - void setupQosMapForPfc(cfg::QosMap& qosMap) { - // update pfc maps - std::map tc2PgId; - std::map pfcPri2PgId; - std::map pfcPri2QueueId; - // program defaults - for (auto i = 0; i < 8; i++) { - tc2PgId.emplace(i, i); - pfcPri2PgId.emplace(i, i); - pfcPri2QueueId.emplace(i, i); - } - - for (auto& tc2Pg : tc2PgOverride) { - tc2PgId[tc2Pg.first] = tc2Pg.second; - } - for (auto& tmp : pfcPri2PgIdOverride) { - pfcPri2PgId[tmp.first] = tmp.second; - } - - qosMap.dscpMaps()->resize(8); - for (auto i = 0; i < 8; i++) { - qosMap.dscpMaps()[i].internalTrafficClass() = i; - for (auto j = 0; j < 8; j++) { - qosMap.dscpMaps()[i].fromDscpToTrafficClass()->push_back(8 * i + j); - } - } - qosMap.trafficClassToPgId() = std::move(tc2PgId); - qosMap.pfcPriorityToPgId() = std::move(pfcPri2PgId); - qosMap.pfcPriorityToQueueId() = std::move(pfcPri2QueueId); - } - - void setupPfc(cfg::SwitchConfig& cfg, const std::vector& ports) { - cfg::PortPfc pfc; - pfc.tx() = true; - pfc.rx() = true; - pfc.portPgConfigName() = "foo"; - - cfg::QosMap qosMap; - // setup qos map with pfc structs - setupQosMapForPfc(qosMap); - - // setup qosPolicy - cfg.qosPolicies()->resize(1); - cfg.qosPolicies()[0].name() = "qp"; - cfg.qosPolicies()[0].qosMap() = qosMap; - cfg::TrafficPolicyConfig dataPlaneTrafficPolicy; - dataPlaneTrafficPolicy.defaultQosPolicy() = "qp"; - cfg.dataPlaneTrafficPolicy() = dataPlaneTrafficPolicy; - - for (const auto& portID : ports) { - auto portCfg = std::find_if( - cfg.ports()->begin(), cfg.ports()->end(), [&portID](auto& port) { - return PortID(*port.logicalID()) == portID; - }); - portCfg->pfc() = pfc; - } - } - - void setupBufferPoolConfig( - std::map& bufferPoolCfgMap, - int globalSharedBytes, - int globalHeadroomBytes) { - cfg::BufferPoolConfig poolConfig; - // provide small shared buffer size - // idea is to hit the limit and trigger XOFF (PFC) - poolConfig.sharedBytes() = globalSharedBytes; - poolConfig.headroomBytes() = globalHeadroomBytes; - bufferPoolCfgMap.insert(std::make_pair("bufferNew", poolConfig)); - } - - void setupPortPgConfig( - std::map>& portPgConfigMap, - int pgLimit, - int pgHeadroom, - std::optional scalingFactor, - int resumeOffset) { - std::vector portPgConfigs; - // create 2 pgs - for (auto pgId : kLosslessPgIds) { - cfg::PortPgConfig pgConfig; - pgConfig.id() = pgId; - pgConfig.bufferPoolName() = "bufferNew"; - // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; - // set large enough headroom to avoid drop - pgConfig.headroomLimitBytes() = pgHeadroom; - // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; - // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; - } - portPgConfigs.emplace_back(pgConfig); - } - - // create lossy pgs - if (!FLAGS_allow_zero_headroom_for_lossless_pg) { - // If the flag is set, we already have lossless PGs being created - // with headroom as 0 and there is no way to differentiate lossy - // and lossless PGs now that headroom is set to zero for lossless. - // So, avoid creating lossy PGs as this will result in PFC being - // enabled for 3 priorities, which is not supported for TAJO. - for (auto pgId : kLossyPgIds) { - cfg::PortPgConfig pgConfig; - pgConfig.id() = pgId; - pgConfig.bufferPoolName() = "bufferNew"; - // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; - // headroom set 0 identifies lossy pgs - pgConfig.headroomLimitBytes() = 0; - // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; - // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; - } - portPgConfigs.emplace_back(pgConfig); - } - } - - portPgConfigMap["foo"] = portPgConfigs; - } - - void setupBuffers( - PfcBufferParams buffer = PfcBufferParams{}, - bool scaleConfig = false) { - auto newCfg{initialConfig()}; - int numberOfPorts = scaleConfig ? masterLogicalInterfacePortIds().size() - : kNumberOfPortsToEnablePfcOn; - auto allPorts = masterLogicalInterfacePortIds(); - std::vector ports( - allPorts.begin(), allPorts.begin() + numberOfPorts); - setupPfc(newCfg, ports); - - std::map> portPgConfigMap; - setupPortPgConfig( - portPgConfigMap, - buffer.pgLimit, - buffer.pgHeadroom, - buffer.scalingFactor, - buffer.resumeOffset); - newCfg.portPgConfigs() = portPgConfigMap; - - // create buffer pool - std::map bufferPoolCfgMap; - setupBufferPoolConfig( - bufferPoolCfgMap, buffer.globalShared, buffer.globalHeadroom); - newCfg.bufferPoolConfigs() = bufferPoolCfgMap; - cfg_ = newCfg; - applyNewConfig(newCfg); - } - - HwSwitchEnsemble::Features featuresDesired() const override { - return {HwSwitchEnsemble::LINKSCAN, HwSwitchEnsemble::PACKET_RX}; - } - - std::tuple getTxRxXonPfcCounters( - const facebook::fboss::PortID& portId, - const int pfcPriority) { - auto portStats = getLatestPortStats(portId); - return getPfcTxRxXonHwPortStats( - getHwSwitchEnsemble(), portStats, pfcPriority); - } - - void validateInitPfcCounters( - const std::vector& portIds, - const int pfcPriority) { - int txPfcCtr = 0, rxPfcCtr = 0, rxPfcXonCtr = 0; - // no need to retry if looking for baseline counter - for (const auto& portId : portIds) { - auto portStats = getHwSwitchEnsemble()->getLatestPortStats(portId); - auto ingressDropRaw = *portStats.inDiscardsRaw_(); - XLOG(DBG0) << " validateInitPfcCounters: Port: " << portId - << " IngressDropRaw: " << ingressDropRaw; - EXPECT_TRUE(ingressDropRaw == 0); - std::tie(txPfcCtr, rxPfcCtr, rxPfcXonCtr) = - getTxRxXonPfcCounters(portId, pfcPriority); - EXPECT_TRUE((txPfcCtr == 0) && (rxPfcCtr == 0) && (rxPfcXonCtr == 0)); - } - } - - void validateIngressDropCounters(const std::vector& portIds) { - WITH_RETRIES({ - for (const auto& portId : portIds) { - auto portStats = getHwSwitchEnsemble()->getLatestPortStats(portId); - auto ingressDropRaw = *portStats.inDiscardsRaw_(); - uint64_t ingressCongestionDiscards = 0; - std::string ingressCongestionDiscardLog{}; - if (getHwSwitchEnsemble()->getAsic()->isSupported( - HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS)) { - ingressCongestionDiscards = *portStats.inCongestionDiscards_(); - ingressCongestionDiscardLog = " IngressCongestionDiscards: " + - std::to_string(ingressCongestionDiscards); - } - XLOG(DBG0) << " validateIngressDropCounters: Port: " << portId - << " IngressDropRaw: " << ingressDropRaw - << ingressCongestionDiscardLog; - EXPECT_EVENTUALLY_GT(ingressDropRaw, 0); - if (getHwSwitchEnsemble()->getAsic()->isSupported( - HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS)) { - EXPECT_EVENTUALLY_GT(ingressCongestionDiscards, 0); - } - } - if (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3) { - // Jericho3 has additional VSQ drops counters which accounts for - // ingress buffer drops. - getHwSwitchEnsemble()->getHwSwitch()->updateStats(); - fb303::ThreadCachedServiceData::get()->publishStats(); - auto vsqResourcesExhautionDrops = getHwSwitchEnsemble() - ->getHwSwitch() - ->getSwitchStats() - ->getVsqResourcesExhautionDrops(); - XLOG(DBG0) - << " validateIngressDropCounters: vsqResourceExhaustionDrops: " - << vsqResourcesExhautionDrops; - EXPECT_EVENTUALLY_GT(vsqResourcesExhautionDrops, 0); - } - }); - } - - protected: - void runTestWithCfg( - const int trafficClass, - const int pfcPriority, - TrafficTestParams testParams = TrafficTestParams{}, - std::function& portIdsToValidate)> validateCounterFn = - validatePfcCounters) { - std::vector portIds = portIdsForTest(); - auto setup = [&]() { - if ((getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2) || - (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3)) { - // Keep low scaling factor so that headroom usage is attempted - // for Jericho family of ASICs. - testParams.buffer.scalingFactor = cfg::MMUScalingFactor::ONE_32768TH; - } - setupBuffers(testParams.buffer, testParams.scale); - setupEcmpTraffic(portIds); - // ensure counter is 0 before we start traffic - validateInitPfcCounters(portIds, pfcPriority); - }; - auto verifyCommon = [&](bool postWb) { - pumpTraffic(trafficClass); - // check counters are as expected - validateCounterFn(getHwSwitchEnsemble(), pfcPriority, portIds); - if (testParams.expectDrop) { - validateIngressDropCounters(portIds); - } - if (!FLAGS_skip_stop_pfc_test_traffic && postWb) { - // stop traffic so that unconfiguration can happen without issues - stopTraffic(portIds); - } - }; - auto verify = [&]() { verifyCommon(false /* postWb */); }; - auto verifyPostWb = [&]() { verifyCommon(true /* postWb */); }; - verifyAcrossWarmBoots(setup, verify, []() {}, verifyPostWb); - } - - void setupEcmpTraffic(const std::vector& portIds) { - utility::EcmpSetupTargetedPorts6 ecmpHelper{ - getProgrammedState(), getIntfMac()}; - - CHECK_EQ(portIds.size(), kDestIps().size()); - for (int i = 0; i < portIds.size(); ++i) { - const PortDescriptor port(portIds[i]); - RoutePrefixV6 route{kDestIps()[i], 128}; - applyNewState(ecmpHelper.resolveNextHops(getProgrammedState(), {port})); - ecmpHelper.programRoutes(getRouteUpdater(), {port}, {route}); - utility::ttlDecrementHandlingForLoopbackTraffic( - getHwSwitchEnsemble(), - ecmpHelper.getRouterId(), - ecmpHelper.nhop(port)); - } - } - - void setupConfigAndEcmpTraffic() { - setupBuffers(); - setupEcmpTraffic(portIdsForTest()); - } - - public: - void pumpTraffic(const int priority) { - auto vlanId = utility::firstVlanID(initialConfig()); - auto intfMac = getIntfMac(); - auto srcMac = utility::MacAddressGenerator().get(intfMac.u64NBO() + 1); - // pri = 7 => dscp 56 - int dscp = priority * 8; - // Tomahawk4 need 5 packets per flow to trigger PFC - int numPacketsPerFlow = getHwSwitchEnsemble()->getMinPktsForLineRate( - masterLogicalInterfacePortIds()[0]); - for (int i = 0; i < numPacketsPerFlow; i++) { - for (const auto& dstIp : kDestIps()) { - auto txPacket = utility::makeUDPTxPacket( - getHwSwitch(), - vlanId, - srcMac, - intfMac, - folly::IPAddressV6("2620:0:1cfe:face:b00c::3"), - dstIp, - 8000, - 8001, - dscp << 2, // dscp is last 6 bits in TC - 255, - std::vector(2000, 0xff)); - - getHwSwitch()->sendPacketSwitchedSync(std::move(txPacket)); - } - } - } - void stopTraffic(const std::vector& portIds) { - // Toggle the link to break looping traffic - for (auto portId : portIds) { - bringDownPort(portId); - bringUpPort(portId); - } - } - - bool canTriggerPfcDeadlockDetectionWithTraffic() { - // Return false for ASICs that cannot trigger PFC detection with - // loop traffic! - if ((getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2) || - (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3)) { - return false; - } else { - return true; - } - } - - void setupWatchdog(bool enable) { - cfg::PfcWatchdog pfcWatchdog; - if (enable) { - pfcWatchdog.recoveryAction() = cfg::PfcWatchdogRecoveryAction::NO_DROP; - if (canTriggerPfcDeadlockDetectionWithTraffic()) { - pfcWatchdog.recoveryTimeMsecs() = 10; - pfcWatchdog.detectionTimeMsecs() = 1; - } else { - pfcWatchdog.recoveryTimeMsecs() = 1000; - pfcWatchdog.detectionTimeMsecs() = 200; - } - } - - for (const auto& portID : portIdsForTest()) { - auto portCfg = utility::findCfgPort(cfg_, portID); - if (portCfg->pfc().has_value()) { - if (enable) { - portCfg->pfc()->watchdog() = pfcWatchdog; - } else { - portCfg->pfc()->watchdog().reset(); - } - } - } - applyNewConfig(cfg_); - } - - void validatePfcWatchdogCountersReset(const PortID& port) { - auto deadlockCtr = - getHwSwitchEnsemble()->readPfcDeadlockDetectionCounter(port); - auto recoveryCtr = - getHwSwitchEnsemble()->readPfcDeadlockRecoveryCounter(port); - XLOG(DBG2) << "deadlockCtr:" << deadlockCtr - << ", recoveryCtr:" << recoveryCtr; - EXPECT_TRUE((deadlockCtr == 0) && (recoveryCtr == 0)); - } - - void validatePfcWatchdogCounters(const PortID& port) { - int deadlockCtrBefore = - getHwSwitchEnsemble()->readPfcDeadlockDetectionCounter(port); - int recoveryCtrBefore = - getHwSwitchEnsemble()->readPfcDeadlockRecoveryCounter(port); - WITH_RETRIES_N_TIMED(10, std::chrono::milliseconds(1000), { - int deadlockCtr = - getHwSwitchEnsemble()->readPfcDeadlockDetectionCounter(port); - int recoveryCtr = - getHwSwitchEnsemble()->readPfcDeadlockRecoveryCounter(port); - XLOG(DBG0) << "For port: " << port << " deadlockCtr = " << deadlockCtr - << " recoveryCtr = " << recoveryCtr; - EXPECT_EVENTUALLY_TRUE( - (deadlockCtr > deadlockCtrBefore) && - (recoveryCtr > recoveryCtrBefore)); - }); - } - - void validateRxPfcCounterIncrement( - const PortID& port, - const int pfcPriority) { - int retries = 2; - int rxPfcCtrOld = 0; - std::tie(std::ignore, rxPfcCtrOld, std::ignore) = - getTxRxXonPfcCounters(port, pfcPriority); - while (retries--) { - int rxPfcCtrNew = 0; - std::this_thread::sleep_for(std::chrono::seconds(1)); - std::tie(std::ignore, rxPfcCtrNew, std::ignore) = - getTxRxXonPfcCounters(port, pfcPriority); - if (rxPfcCtrNew > rxPfcCtrOld) { - return; - } - } - EXPECT_TRUE(0); - } - - void triggerPfcDeadlockDetection(const PortID& port) { - if ((getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2) || - (getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3)) { - // As traffic cannot trigger deadlock for DNX, force back - // to back PFC frame generation which causes a deadlock! - XLOG(DBG0) << "Triggering PFC deadlock detection on port ID : " - << static_cast(port); - auto iter = kRegValToForcePfcTxForPriorityOnPortDnx.find(std::make_tuple( - getAsic()->getAsicType(), static_cast(port), kLosslessPriority)); - EXPECT_FALSE(iter == kRegValToForcePfcTxForPriorityOnPortDnx.end()); - std::string out; - getHwSwitchEnsemble()->runDiagCommand( - "modreg CFC_FRC_NIF_ETH_PFC FRC_NIF_ETH_PFC=" + iter->second + - "\nquit\n", - out); - } else { - // Send traffic to trigger deadlock - pumpTraffic(kLosslessTrafficClass); - validateRxPfcCounterIncrement(port, kLosslessPriority); - } - } - - std::map tc2PgOverride = {}; - std::map pfcPri2PgIdOverride = {}; - cfg::SwitchConfig cfg_; -}; - -class HwTrafficPfcGenTest - : public HwTrafficPfcTest, - public testing::WithParamInterface { - void SetUp() override { - auto testParams = GetParam(); - FLAGS_mmu_lossless_mode = true; - /* - * Makes this flag available so that it can be used in early - * stages of init to setup common buffer pool for specific - * asics like Jericho2. - */ - FLAGS_ingress_egress_buffer_pool_size = kGlobalIngressEgressBufferPoolSize; - if (testParams.buffer.pgHeadroom == 0) { - // Force headroom 0 for lossless PG - FLAGS_allow_zero_headroom_for_lossless_pg = true; - } - HwLinkStateDependentTest::SetUp(); - } -}; - -INSTANTIATE_TEST_SUITE_P( - HwTrafficPfcTest, - HwTrafficPfcGenTest, - testing::Values( - TrafficTestParams{}, - TrafficTestParams{ - .buffer = - PfcBufferParams{ - .globalShared = kGlobalSharedBytes * 5, - .pgLimit = kPgLimitBytes / 3, - .resumeOffset = kPgResumeOffsetBytes / 3}, - .scale = true}, - TrafficTestParams{ - .buffer = - PfcBufferParams{.pgHeadroom = 0, .scalingFactor = std::nullopt}, - .expectDrop = true}, - TrafficTestParams{ - .buffer = - PfcBufferParams{ - .globalHeadroom = 0, - .scalingFactor = std::nullopt}, - .expectDrop = true}), - [](const ::testing::TestParamInfo& info) { - auto testParams = info.param; - if (testParams.buffer.pgHeadroom == 0) { - return "WithZeroPgHeadRoomCfg"; - } else if (testParams.buffer.globalHeadroom == 0) { - return "WithZeroGlobalHeadRoomCfg"; - } else if (testParams.scale) { - return "WithScaleCfg"; - } else { - return "WithDefaultCfg"; - } - }); - -TEST_P(HwTrafficPfcGenTest, verifyPfc) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = kLosslessPriority; - TrafficTestParams trafficParams = GetParam(); - runTestWithCfg(trafficClass, pfcPriority, trafficParams); -} - -TEST_F(HwTrafficPfcTest, verifyBufferPoolWatermarks) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = kLosslessPriority; - cfg::MMUScalingFactor scalingFactor = - getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO2 - ? cfg::MMUScalingFactor::ONE_32768TH - : cfg::MMUScalingFactor::ONE_64TH; - runTestWithCfg( - trafficClass, - pfcPriority, - TrafficTestParams{ - .buffer = PfcBufferParams{.scalingFactor = scalingFactor}}, - validateBufferPoolWatermarkCounters); -} - -TEST_F(HwTrafficPfcTest, verifyIngressPriorityGroupWatermarks) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = kLosslessPriority; - runTestWithCfg( - trafficClass, - pfcPriority, - TrafficTestParams{ - .buffer = PfcBufferParams{.scalingFactor = std::nullopt}}, - validateIngressPriorityGroupWatermarkCounters); -} - -// intent of this test is to send traffic so that it maps to -// tc 2, now map tc 2 to PG 3. Mapping from PG to pfc priority -// is 1:1, which means PG 3 is mapped to pfc priority 3. -// Generate traffic to fire off PFC with smaller shared buffer -TEST_F(HwTrafficPfcTest, verifyPfcWithMapChanges_0) { - const int trafficClass = kLosslessTrafficClass; - const int pfcPriority = 3; - tc2PgOverride.insert(std::make_pair(trafficClass, pfcPriority)); - runTestWithCfg(trafficClass, pfcPriority); -} - -// intent of this test is to send traffic so that it maps to -// tc 7. Now we map tc 7 -> PG 2. Mapping from PG to pfc -// priority is 1:1, which means PG 2 is mapped to pfc priority 2. -// Generate traffic to fire off PFC with smaller shared buffer -TEST_F(HwTrafficPfcTest, verifyPfcWithMapChanges_1) { - const int trafficClass = 7; - const int pfcPriority = kLosslessPriority; - tc2PgOverride.insert(std::make_pair(trafficClass, pfcPriority)); - runTestWithCfg(trafficClass, pfcPriority); -} - -// intent of this test is to setup watchdog for the PFC -// and observe it kicks in and update the watchdog counters -// watchdog counters are created/incremented when callback -// for deadlock/recovery kicks in -TEST_F(HwTrafficPfcTest, PfcWatchdog) { - auto setup = [&]() { - setupConfigAndEcmpTraffic(); - setupWatchdog(true /* enable watchdog */); - }; - auto verify = [&]() { - triggerPfcDeadlockDetection(masterLogicalInterfacePortIds()[0]); - validatePfcWatchdogCounters(masterLogicalInterfacePortIds()[0]); - }; - verifyAcrossWarmBoots(setup, verify); -} - -// intent of this test is to setup watchdog for PFC -// and remove it. Observe that counters should stop incrementing -// Clear them and check they stay the same -// Since the watchdog counters are sw based, upon warm boot -// we don't expect these counters to be incremented either -TEST_F(HwTrafficPfcTest, PfcWatchdogReset) { - auto setup = [&]() { - setupConfigAndEcmpTraffic(); - setupWatchdog(true /* enable watchdog */); - triggerPfcDeadlockDetection(masterLogicalInterfacePortIds()[0]); - // lets wait for the watchdog counters to be populated - validatePfcWatchdogCounters(masterLogicalInterfacePortIds()[0]); - // reset watchdog - setupWatchdog(false /* disable */); - // reset the watchdog counters - getHwSwitchEnsemble()->clearPfcDeadlockRecoveryCounter( - masterLogicalInterfacePortIds()[0]); - getHwSwitchEnsemble()->clearPfcDeadlockDetectionCounter( - masterLogicalInterfacePortIds()[0]); - }; - - auto verify = [&]() { - // ensure that RX PFC continues to increment - validateRxPfcCounterIncrement( - masterLogicalInterfacePortIds()[0], kLosslessPriority); - // validate that pfc watchdog counters do not increment anymore - validatePfcWatchdogCountersReset(masterLogicalInterfacePortIds()[0]); - }; - - // warmboot support to be added in next step - verifyAcrossWarmBoots(setup, verify); -} - -} // namespace facebook::fboss diff --git a/fboss/agent/if/BUCK b/fboss/agent/if/BUCK index 6dee1a8b3df1c..9705aaa08cd50 100644 --- a/fboss/agent/if/BUCK +++ b/fboss/agent/if/BUCK @@ -280,6 +280,7 @@ thrift_library( deps = [ ":common", ":ctrl", + "//fboss/agent:switch_config", "//fboss/agent/hw:hardware_stats", "//fboss/fsdb/if:fsdb_oper", "//fboss/lib/phy:phy", @@ -297,6 +298,7 @@ thrift_library( ]}, deps = [ ":ctrl", + ":mpls", "//common/network/if:if", "//fboss/agent:switch_config", "//fboss/agent:switch_state", diff --git a/fboss/agent/if/agent_hw_test_ctrl.thrift b/fboss/agent/if/agent_hw_test_ctrl.thrift index e93944431f17a..b44ac11168cf9 100644 --- a/fboss/agent/if/agent_hw_test_ctrl.thrift +++ b/fboss/agent/if/agent_hw_test_ctrl.thrift @@ -9,6 +9,7 @@ include "thrift/annotation/cpp.thrift" include "fboss/agent/switch_state.thrift" include "fboss/agent/switch_config.thrift" include "fboss/agent/if/ctrl.thrift" +include "fboss/agent/if/mpls.thrift" include "common/network/if/Address.thrift" struct NeighborInfo { @@ -31,6 +32,10 @@ struct RouteInfo { 5: optional i32 classId; } +struct PortInfo { + 1: i32 loopbackMode; +} + service AgentHwTestCtrl { // acl utils begin i32 getDefaultAclTableNumAclEntries(); @@ -86,4 +91,13 @@ service AgentHwTestCtrl { 1: ctrl.IpPrefix prefix, 2: Address.BinaryAddress address, ); + bool isProgrammedInHw( + 1: i32 intfID, + 2: ctrl.IpPrefix prefix, + 3: mpls.MplsLabelStack labelStack, + 4: i32 refCount, + ); + + // port utils + list getPortInfo(1: list portIds); } diff --git a/fboss/agent/if/ctrl.thrift b/fboss/agent/if/ctrl.thrift index f50374c587d1a..980fda9acf7bc 100644 --- a/fboss/agent/if/ctrl.thrift +++ b/fboss/agent/if/ctrl.thrift @@ -376,6 +376,7 @@ struct PortInfoThrift { 29: optional i32 coreId; 30: optional i32 virtualDeviceId; 31: switch_config.PortType portType; + 32: switch_config.Scope scope; } // Port queueing configuration diff --git a/fboss/agent/if/multiswitch_ctrl.thrift b/fboss/agent/if/multiswitch_ctrl.thrift index f0e79bc4b84d2..b53da510f366c 100644 --- a/fboss/agent/if/multiswitch_ctrl.thrift +++ b/fboss/agent/if/multiswitch_ctrl.thrift @@ -12,6 +12,7 @@ include "thrift/annotation/cpp.thrift" include "fboss/lib/phy/phy.thrift" include "fboss/agent/hw/hardware_stats.thrift" include "thrift/annotation/thrift.thrift" +include "fboss/agent/switch_config.thrift" @cpp.Type{name = "std::unique_ptr"} typedef binary fbbinary @@ -20,6 +21,7 @@ struct LinkEvent { 1: i32 port; 2: bool up; 3: optional phy.LinkFaultStatus iPhyLinkFaultStatus; + 4: switch_config.PortType portType; } struct LinkActiveEvent { diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp b/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp index ad0327f64928c..d11f981430495 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp +++ b/fboss/agent/mnpu/SplitAgentThriftSyncer.cpp @@ -28,6 +28,7 @@ SplitAgentThriftSyncer::SplitAgentThriftSyncer( : retryThread_(std::make_shared( "SplitAgentThriftRetryThread")), switchId_(switchId), + hwSwitch_(hw), linkChangeEventSinkClient_(std::make_unique( serverPort, switchId_, @@ -77,7 +78,10 @@ void SplitAgentThriftSyncer::packetReceived( rxPkt.aggPort() = pkt->getSrcAggregatePort(); } if (pkt->cosQueue()) { - rxPkt.cosQueue() = hwQueueIdToCpuCosQueueId(*pkt->cosQueue()); + rxPkt.cosQueue() = hwQueueIdToCpuCosQueueId( + *pkt->cosQueue(), + hwSwitch_->getPlatform()->getAsic(), + hwSwitch_->getSwitchStats()); } // coalesce the IOBuf before copy pkt->buf()->coalesce(); @@ -89,10 +93,12 @@ void SplitAgentThriftSyncer::packetReceived( void SplitAgentThriftSyncer::linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus) { multiswitch::LinkEvent event; event.port() = port; event.up() = up; + event.portType() = portType; if (iPhyFaultStatus) { event.iPhyLinkFaultStatus() = *iPhyFaultStatus; } diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncer.h b/fboss/agent/mnpu/SplitAgentThriftSyncer.h index e417015d7f24e..8710ae1b9e7cd 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncer.h +++ b/fboss/agent/mnpu/SplitAgentThriftSyncer.h @@ -45,6 +45,7 @@ class SplitAgentThriftSyncer : public HwSwitchCallback { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override; void linkActiveStateChanged( @@ -75,6 +76,7 @@ class SplitAgentThriftSyncer : public HwSwitchCallback { private: std::shared_ptr retryThread_; SwitchID switchId_; + HwSwitch* hwSwitch_; std::unique_ptr linkChangeEventSinkClient_; std::unique_ptr txPktEventStreamClient_; std::unique_ptr operDeltaClient_; diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp index 5ade3dbcfd8f8..0c8e1ce1fb972 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp +++ b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.cpp @@ -8,6 +8,7 @@ * */ #include "fboss/agent/mnpu/SplitAgentThriftSyncerClient.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -42,20 +43,21 @@ SplitAgentThriftClient::SplitAgentThriftClient( streamEvbThread_(streamEvbThread), serverPort_(serverPort), switchId_(switchId) { - setServerOptions(ServerOptions("::1", serverPort_)); + setConnectionOptions(utils::ConnectionOptions("::1", serverPort_)); scheduleTimeout(); } SplitAgentThriftClient::~SplitAgentThriftClient() {} -void SplitAgentThriftClient::connectClient(const ServerOptions& options) { +void SplitAgentThriftClient::connectClient( + const utils::ConnectionOptions& options) { auto channel = apache::thrift::PooledRequestChannel::newChannel( streamEvbThread_->getEventBase(), streamEvbThread_, [options = options](folly::EventBase& evb) mutable { return apache::thrift::RocketClientChannel::newChannel( folly::AsyncSocket::UniquePtr( - new folly::AsyncSocket(&evb, options.dstAddr))); + new folly::AsyncSocket(&evb, options.getDstAddr()))); }); multiSwitchClient_.reset( @@ -63,7 +65,8 @@ void SplitAgentThriftClient::connectClient(const ServerOptions& options) { std::move(channel))); } -void SplitAgentThriftClient::connectToServer(const ServerOptions& options) { +void SplitAgentThriftClient::connectToServer( + const utils::ConnectionOptions& options) { try { connectClient(options); } catch (const std::exception& ex) { diff --git a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h index 9758ea41e1258..62e52f20fa8e5 100644 --- a/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h +++ b/fboss/agent/mnpu/SplitAgentThriftSyncerClient.h @@ -26,6 +26,7 @@ #include "fboss/agent/MultiSwitchThriftHandler.h" #include "fboss/lib/CommonThriftUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" namespace facebook::fboss { @@ -44,11 +45,11 @@ class SplitAgentThriftClient : public ReconnectingThriftClient { ~SplitAgentThriftClient() override; protected: - void connectClient(const ServerOptions& options); + void connectClient(const utils::ConnectionOptions& options); void resetClient() override; apache::thrift::Client* getThriftClient(); virtual void startClientService() = 0; - void connectToServer(const ServerOptions& options) override; + void connectToServer(const utils::ConnectionOptions& options) override; #if FOLLY_HAS_COROUTINES virtual folly::coro::Task serveStream() = 0; #endif diff --git a/fboss/agent/oss/AgentNetWhoAmI.cpp b/fboss/agent/oss/AgentNetWhoAmI.cpp index 599573c04328a..266c388727d96 100644 --- a/fboss/agent/oss/AgentNetWhoAmI.cpp +++ b/fboss/agent/oss/AgentNetWhoAmI.cpp @@ -32,6 +32,10 @@ bool AgentNetWhoAmI::isFdsw() const { return false; } +bool AgentNetWhoAmI::isSdsw() const { + return false; +} + bool AgentNetWhoAmI::hasRoutingProtocol() const { return false; } diff --git a/fboss/agent/platforms/common/BUCK b/fboss/agent/platforms/common/BUCK index 0ad879af48f54..d3afa5038bb99 100644 --- a/fboss/agent/platforms/common/BUCK +++ b/fboss/agent/platforms/common/BUCK @@ -57,6 +57,7 @@ cpp_library( "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", "//fboss/agent/platforms/common/wedge400c:wedge400c_platform_mapping", "//fboss/agent/platforms/common/yamp:yamp_platform_mapping", + "//fboss/agent/platforms/common/yangra:yangra_platform_mapping", "//fboss/lib/platforms:platform_mode", "//folly:file_util", "//folly/logging:logging", diff --git a/fboss/agent/platforms/common/PlatformMapping.cpp b/fboss/agent/platforms/common/PlatformMapping.cpp index 4eb3fea3efce5..e14d7ee1d333b 100644 --- a/fboss/agent/platforms/common/PlatformMapping.cpp +++ b/fboss/agent/platforms/common/PlatformMapping.cpp @@ -303,6 +303,14 @@ cfg::PortSpeed PlatformMapping::getPortMaxSpeed(PortID portID) const { return maxSpeed; } +cfg::Scope PlatformMapping::getPortScope(PortID portID) const { + auto itPlatformPort = platformPorts_.find(portID); + if (itPlatformPort == platformPorts_.end()) { + throw FbossError("Unrecoganized port:", portID); + } + return *itPlatformPort->second.mapping()->scope(); +} + std::vector PlatformMapping::getPortIphyPinConfigs( PlatformPortProfileConfigMatcher matcher) const { std::optional chip; diff --git a/fboss/agent/platforms/common/PlatformMapping.h b/fboss/agent/platforms/common/PlatformMapping.h index cdef6be477d2b..1b1409728c149 100644 --- a/fboss/agent/platforms/common/PlatformMapping.h +++ b/fboss/agent/platforms/common/PlatformMapping.h @@ -145,6 +145,7 @@ class PlatformMapping { void merge(PlatformMapping* mapping); cfg::PortSpeed getPortMaxSpeed(PortID portID) const; + cfg::Scope getPortScope(PortID portID) const; const std::vector& getPortConfigOverrides() const { diff --git a/fboss/agent/platforms/common/PlatformMappingUtils.cpp b/fboss/agent/platforms/common/PlatformMappingUtils.cpp index d8067c4068548..33cf32576407b 100644 --- a/fboss/agent/platforms/common/PlatformMappingUtils.cpp +++ b/fboss/agent/platforms/common/PlatformMappingUtils.cpp @@ -41,6 +41,7 @@ #include "fboss/agent/platforms/common/wedge400c/Wedge400CPlatformMapping.h" #include "fboss/agent/platforms/common/wedge400c/Wedge400CPlatformUtil.h" #include "fboss/agent/platforms/common/yamp/YampPlatformMapping.h" +#include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" namespace { std::vector getFakeSaiControllingPortIDs() { @@ -148,6 +149,7 @@ std::unique_ptr initPlatformMapping(PlatformType type) { ? std::make_unique() : std::make_unique(platformMappingStr); case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: return platformMappingStr.empty() ? std::make_unique() : std::make_unique(platformMappingStr); @@ -171,6 +173,10 @@ std::unique_ptr initPlatformMapping(PlatformType type) { return platformMappingStr.empty() ? std::make_unique() : std::make_unique(platformMappingStr); + case PlatformType::PLATFORM_YANGRA: + return platformMappingStr.empty() + ? std::make_unique() + : std::make_unique(platformMappingStr); case PlatformType::PLATFORM_FAKE_SAI: { std::vector controllingPorts = getFakeSaiControllingPortIDs(); return std::make_unique(controllingPorts); diff --git a/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp b/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp index 3f5a89079d025..88fb034b3ce2a 100644 --- a/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp +++ b/fboss/agent/platforms/common/tahan800bc/Tahan800bcPlatformMapping.cpp @@ -117,7 +117,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -448,7 +449,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -648,7 +650,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -979,7 +982,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -1179,7 +1183,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -1510,7 +1515,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -1710,7 +1716,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2041,7 +2048,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2241,7 +2249,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2572,7 +2581,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -2772,7 +2782,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3103,7 +3114,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3303,7 +3315,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3634,7 +3647,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -3834,7 +3848,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4165,7 +4180,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4365,7 +4381,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4696,7 +4713,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -4896,7 +4914,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5227,7 +5246,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5427,7 +5447,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5758,7 +5779,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -5958,7 +5980,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6289,7 +6312,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6489,7 +6513,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6503,7 +6528,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6518,7 +6543,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6533,7 +6558,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6548,7 +6573,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6598,7 +6623,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6613,7 +6638,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6628,7 +6653,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6643,7 +6668,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6658,7 +6683,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6673,7 +6698,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6688,7 +6713,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6703,7 +6728,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6820,7 +6845,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -6834,7 +6860,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6849,7 +6875,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6864,7 +6890,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -6879,7 +6905,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7020,7 +7046,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7034,7 +7061,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7049,7 +7076,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7064,7 +7091,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7079,7 +7106,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7129,7 +7156,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7144,7 +7171,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7159,7 +7186,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7174,7 +7201,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7189,7 +7216,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7204,7 +7231,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7219,7 +7246,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7234,7 +7261,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7351,7 +7378,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7365,7 +7393,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7380,7 +7408,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7395,7 +7423,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7410,7 +7438,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7551,7 +7579,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7565,7 +7594,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7580,7 +7609,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7595,7 +7624,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7610,7 +7639,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7660,7 +7689,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7675,7 +7704,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7690,7 +7719,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7705,7 +7734,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7720,7 +7749,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7735,7 +7764,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7750,7 +7779,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7765,7 +7794,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7882,7 +7911,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -7896,7 +7926,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7911,7 +7941,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7926,7 +7956,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -7941,7 +7971,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8082,7 +8112,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8096,7 +8127,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8111,7 +8142,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8126,7 +8157,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8141,7 +8172,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8191,7 +8222,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8206,7 +8237,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8221,7 +8252,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8236,7 +8267,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8251,7 +8282,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8266,7 +8297,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8281,7 +8312,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8296,7 +8327,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8413,7 +8444,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8427,7 +8459,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8442,7 +8474,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8457,7 +8489,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8472,7 +8504,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8613,7 +8645,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8627,7 +8660,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8642,7 +8675,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8657,7 +8690,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8672,7 +8705,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8722,7 +8755,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8737,7 +8770,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8752,7 +8785,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8767,7 +8800,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8782,7 +8815,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8797,7 +8830,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8812,7 +8845,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8827,7 +8860,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8944,7 +8977,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -8958,7 +8992,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8973,7 +9007,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -8988,7 +9022,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9003,7 +9037,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9144,7 +9178,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -9158,7 +9193,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9173,7 +9208,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9188,7 +9223,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9203,7 +9238,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9253,7 +9288,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9268,7 +9303,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9283,7 +9318,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9298,7 +9333,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9313,7 +9348,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9328,7 +9363,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9343,7 +9378,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9358,7 +9393,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9475,7 +9510,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -9489,7 +9525,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9504,7 +9540,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9519,7 +9555,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9534,7 +9570,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9675,7 +9711,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -9689,7 +9726,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9704,7 +9741,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9719,7 +9756,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9734,7 +9771,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9784,7 +9821,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9799,7 +9836,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9814,7 +9851,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9829,7 +9866,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9844,7 +9881,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9859,7 +9896,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9874,7 +9911,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -9889,7 +9926,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10006,7 +10043,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -10020,7 +10058,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10035,7 +10073,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10050,7 +10088,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10065,7 +10103,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10206,7 +10244,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -10220,7 +10259,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10235,7 +10274,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10250,7 +10289,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10265,7 +10304,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10315,7 +10354,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10330,7 +10369,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10345,7 +10384,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10360,7 +10399,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10375,7 +10414,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10390,7 +10429,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10405,7 +10444,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10420,7 +10459,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10537,7 +10576,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -10551,7 +10591,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10566,7 +10606,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10581,7 +10621,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10596,7 +10636,7 @@ constexpr auto kJsonPlatformMappingStr = R"( "tx": { "pre": -28, "pre2": 4, - "main": 136, + "main": 128, "post": 0, "post2": 0, "post3": 0, @@ -10737,7 +10777,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11068,7 +11109,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11268,7 +11310,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11599,7 +11642,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -11799,7 +11843,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12130,7 +12175,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12330,7 +12376,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12661,7 +12708,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -12861,7 +12909,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13192,7 +13241,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13392,7 +13442,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13723,7 +13774,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -13923,7 +13975,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14254,7 +14307,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14454,7 +14508,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14785,7 +14840,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -14985,7 +15041,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -15316,7 +15373,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -15516,7 +15574,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -15847,7 +15906,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16047,7 +16107,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16378,7 +16439,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16578,7 +16640,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -16909,7 +16972,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "38": { @@ -17061,7 +17125,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 4 + "portType": 4, + "scope": 0 }, "supportedProfiles": { "23": { @@ -17071,24 +17136,56 @@ constexpr auto kJsonPlatformMappingStr = R"( "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 0 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } }, { "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 1 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } }, { "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 2 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } }, { "id": { "chip": "NPU-TH5_NIF-slot1/chip1/core64", "lane": 3 + }, + "tx": { + "pre": 5, + "pre2": 0, + "main": 31, + "post": 0, + "post2": 0, + "post3": 0 } } ], @@ -17225,7 +17322,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -17237,9 +17335,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17252,9 +17350,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17267,9 +17365,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17282,9 +17380,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17297,9 +17395,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17312,9 +17410,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17327,9 +17425,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17342,9 +17440,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17509,7 +17607,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -17521,9 +17620,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17536,9 +17635,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17551,9 +17650,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17566,9 +17665,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17581,9 +17680,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17596,9 +17695,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17611,9 +17710,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17626,9 +17725,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17793,7 +17892,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -17805,9 +17905,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17820,9 +17920,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17835,9 +17935,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17850,9 +17950,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17865,9 +17965,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17880,9 +17980,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17895,9 +17995,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -17910,9 +18010,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18077,7 +18177,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18089,9 +18190,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18104,9 +18205,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18119,9 +18220,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18134,9 +18235,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18149,9 +18250,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18164,9 +18265,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18179,9 +18280,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18194,9 +18295,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18361,7 +18462,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18373,9 +18475,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18388,9 +18490,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18403,9 +18505,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18418,9 +18520,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18433,9 +18535,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18448,9 +18550,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18463,9 +18565,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18478,9 +18580,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18645,7 +18747,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18657,9 +18760,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18672,9 +18775,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18687,9 +18790,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18702,9 +18805,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18717,9 +18820,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18732,9 +18835,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18747,9 +18850,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18762,9 +18865,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18929,7 +19032,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -18941,9 +19045,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18956,9 +19060,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18971,9 +19075,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -18986,9 +19090,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19001,9 +19105,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19016,9 +19120,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19031,9 +19135,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19046,9 +19150,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19213,7 +19317,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -19225,9 +19330,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19240,9 +19345,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19255,9 +19360,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19270,9 +19375,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19285,9 +19390,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19300,9 +19405,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19315,9 +19420,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19330,9 +19435,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19497,7 +19602,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -19509,9 +19615,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19524,9 +19630,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19539,9 +19645,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19554,9 +19660,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19569,9 +19675,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19584,9 +19690,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19599,9 +19705,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19614,9 +19720,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19781,7 +19887,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -19793,9 +19900,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19808,9 +19915,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19823,9 +19930,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19838,9 +19945,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19853,9 +19960,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19868,9 +19975,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19883,9 +19990,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -19898,9 +20005,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20065,7 +20172,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20077,9 +20185,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20092,9 +20200,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20107,9 +20215,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20122,9 +20230,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20137,9 +20245,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20152,9 +20260,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20167,9 +20275,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20182,9 +20290,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20349,7 +20457,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20361,9 +20470,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20376,9 +20485,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20391,9 +20500,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20406,9 +20515,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20421,9 +20530,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20436,9 +20545,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20451,9 +20560,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20466,9 +20575,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20633,7 +20742,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20645,9 +20755,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20660,9 +20770,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20675,9 +20785,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20690,9 +20800,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20705,9 +20815,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20720,9 +20830,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20735,9 +20845,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20750,9 +20860,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20917,7 +21027,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -20929,9 +21040,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20944,9 +21055,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20959,9 +21070,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20974,9 +21085,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -20989,9 +21100,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21004,9 +21115,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21019,9 +21130,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21034,9 +21145,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21201,7 +21312,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -21213,9 +21325,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21228,9 +21340,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21243,9 +21355,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21258,9 +21370,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21273,9 +21385,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21288,9 +21400,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21303,9 +21415,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21318,9 +21430,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21485,7 +21597,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -21497,9 +21610,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21512,9 +21625,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21527,9 +21640,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21542,9 +21655,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21557,9 +21670,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21572,9 +21685,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21587,9 +21700,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21602,9 +21715,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21769,7 +21882,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -21781,9 +21895,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21796,9 +21910,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21811,9 +21925,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21826,9 +21940,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21841,9 +21955,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21856,9 +21970,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21871,9 +21985,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -21886,9 +22000,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22053,7 +22167,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22065,9 +22180,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22080,9 +22195,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22095,9 +22210,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22110,9 +22225,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22125,9 +22240,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22140,9 +22255,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22155,9 +22270,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22170,9 +22285,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22337,7 +22452,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22349,9 +22465,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22364,9 +22480,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22379,9 +22495,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22394,9 +22510,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22409,9 +22525,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22424,9 +22540,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22439,9 +22555,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22454,9 +22570,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22621,7 +22737,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22633,9 +22750,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22648,9 +22765,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22663,9 +22780,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22678,9 +22795,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22693,9 +22810,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22708,9 +22825,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22723,9 +22840,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22738,9 +22855,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22905,7 +23022,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -22917,9 +23035,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22932,9 +23050,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22947,9 +23065,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22962,9 +23080,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22977,9 +23095,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -22992,9 +23110,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23007,9 +23125,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23022,9 +23140,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23189,7 +23307,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -23201,9 +23320,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23216,9 +23335,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23231,9 +23350,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23246,9 +23365,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23261,9 +23380,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23276,9 +23395,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23291,9 +23410,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23306,9 +23425,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23473,7 +23592,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -23485,9 +23605,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23500,9 +23620,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23515,9 +23635,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23530,9 +23650,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23545,9 +23665,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23560,9 +23680,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23575,9 +23695,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23590,9 +23710,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23757,7 +23877,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -23769,9 +23890,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23784,9 +23905,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23799,9 +23920,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23814,9 +23935,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23829,9 +23950,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23844,9 +23965,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23859,9 +23980,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -23874,9 +23995,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24041,7 +24162,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24053,9 +24175,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24068,9 +24190,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24083,9 +24205,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24098,9 +24220,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24113,9 +24235,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24128,9 +24250,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24143,9 +24265,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24158,9 +24280,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24325,7 +24447,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24337,9 +24460,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24352,9 +24475,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24367,9 +24490,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24382,9 +24505,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24397,9 +24520,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24412,9 +24535,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24427,9 +24550,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24442,9 +24565,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24609,7 +24732,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24621,9 +24745,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24636,9 +24760,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24651,9 +24775,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24666,9 +24790,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24681,9 +24805,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24696,9 +24820,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24711,9 +24835,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24726,9 +24850,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24893,7 +25017,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -24905,9 +25030,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24920,9 +25045,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24935,9 +25060,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24950,9 +25075,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24965,9 +25090,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24980,9 +25105,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -24995,9 +25120,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25010,9 +25135,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25177,7 +25302,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -25189,9 +25315,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25204,9 +25330,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25219,9 +25345,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25234,9 +25360,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25249,9 +25375,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25264,9 +25390,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25279,9 +25405,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25294,9 +25420,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25461,7 +25587,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -25473,9 +25600,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25488,9 +25615,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25503,9 +25630,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25518,9 +25645,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25533,9 +25660,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25548,9 +25675,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25563,9 +25690,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25578,9 +25705,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25745,7 +25872,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -25757,9 +25885,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25772,9 +25900,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25787,9 +25915,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25802,9 +25930,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25817,9 +25945,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25832,9 +25960,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25847,9 +25975,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -25862,9 +25990,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26029,7 +26157,8 @@ constexpr auto kJsonPlatformMappingStr = R"( } } ], - "portType": 0 + "portType": 0, + "scope": 0 }, "supportedProfiles": { "39": { @@ -26041,9 +26170,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 0 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26056,9 +26185,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 1 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26071,9 +26200,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 2 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26086,9 +26215,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 3 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26101,9 +26230,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 4 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26116,9 +26245,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 5 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26131,9 +26260,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 6 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, @@ -26146,9 +26275,9 @@ constexpr auto kJsonPlatformMappingStr = R"( "lane": 7 }, "tx": { - "pre": -28, - "pre2": 4, - "main": 136, + "pre": 0, + "pre2": 0, + "main": 168, "post": 0, "post2": 0, "post3": 0, diff --git a/fboss/agent/platforms/common/yangra/BUCK b/fboss/agent/platforms/common/yangra/BUCK new file mode 100644 index 0000000000000..fb658b34f0a79 --- /dev/null +++ b/fboss/agent/platforms/common/yangra/BUCK @@ -0,0 +1,16 @@ +load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") + +oncall("fboss_agent_push") + +cpp_library( + name = "yangra_platform_mapping", + srcs = [ + "facebook/YangraPlatformMapping.cpp", + ], + headers = [ + "YangraPlatformMapping.h", + ], + exported_deps = [ + "//fboss/agent/platforms/common:platform_mapping", + ], +) diff --git a/fboss/agent/platforms/common/yangra/YangraPlatformMapping.h b/fboss/agent/platforms/common/yangra/YangraPlatformMapping.h new file mode 100644 index 0000000000000..dc4fd0c8ac838 --- /dev/null +++ b/fboss/agent/platforms/common/yangra/YangraPlatformMapping.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include "fboss/agent/platforms/common/PlatformMapping.h" + +namespace facebook::fboss { + +class YangraPlatformMapping : public PlatformMapping { + public: + YangraPlatformMapping(); + explicit YangraPlatformMapping(const std::string& platformMappingStr); + + private: + // Forbidden copy constructor and assignment operator + YangraPlatformMapping(YangraPlatformMapping const&) = delete; + YangraPlatformMapping& operator=(YangraPlatformMapping const&) = delete; +}; +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp b/fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp new file mode 100644 index 0000000000000..0870205fd370a --- /dev/null +++ b/fboss/agent/platforms/common/yangra/oss/YangraPlatformMapping.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" + +namespace { +constexpr auto kJsonPlatformMappingStr = R"( +)"; +} // namespace + +namespace facebook::fboss { +YangraPlatformMapping::YangraPlatformMapping() + : PlatformMapping(kJsonPlatformMappingStr) {} + +YangraPlatformMapping::YangraPlatformMapping( + const std::string& platformMappingStr) + : PlatformMapping(platformMappingStr) {} + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h b/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h index 76080f72cdec1..d0dc2bbd50d95 100644 --- a/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h +++ b/fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h @@ -25,7 +25,7 @@ class SaiMorgan800ccPlatform : public SaiTajoPlatform { std::string getHwConfig() override; HwAsic* getAsic() const override; bool isSerdesApiSupported() const override { - return false; + return true; } private: diff --git a/fboss/agent/platforms/sai/SaiPlatform.cpp b/fboss/agent/platforms/sai/SaiPlatform.cpp index 6ecf3866e06af..c0b0f0d52db57 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.cpp +++ b/fboss/agent/platforms/sai/SaiPlatform.cpp @@ -37,6 +37,7 @@ #include "fboss/agent/platforms/sai/SaiMorgan800ccPlatformPort.h" #include "fboss/agent/platforms/sai/SaiTahan800bcPlatformPort.h" #include "fboss/agent/platforms/sai/SaiWedge400CPlatformPort.h" +#include "fboss/agent/platforms/sai/SaiYangraPlatformPort.h" #include "fboss/agent/state/Port.h" #include "fboss/lib/CommonFileUtils.h" #include "fboss/lib/config/PlatformConfigUtils.h" @@ -258,6 +259,18 @@ std::string SaiPlatform::getHwAsicConfig( for (const auto& entry : commonConfigs) { addNameValue(entry); } + +#if defined(BRCM_SAI_SDK_DNX_GTE_11_0) && !defined(BRCM_SAI_SDK_DNX_GTE_12_0) + if (getAsic()->isSupported(HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { + // Interim workaround for 11.7 GA as this SoC property is needed for + // J3AI 11.x but not for 12.x until 12.0.0.3/4. + // TODO: While integrating 12.0.0.3/4, these workarounds need to be removed + // and instead this SoC property would be added in config directly. + nameValStrs.push_back("eventor_sbus_dma_channels.BCM8889X=0,6,0,7"); + nameValStrs.push_back("custom_feature_shel_arm_enable=1"); + } +#endif + /* * Single NPU platfroms will not have any npu entries. In such cases, * we can directly use the common config. @@ -351,7 +364,9 @@ void SaiPlatform::initPorts() { } } else if (platformMode == PlatformType::PLATFORM_MERU400BIU) { saiPort = std::make_unique(portId, this); - } else if (platformMode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + platformMode == PlatformType::PLATFORM_MERU800BIA || + platformMode == PlatformType::PLATFORM_MERU800BIAB) { saiPort = std::make_unique(portId, this); } else if (platformMode == PlatformType::PLATFORM_MERU400BIA) { saiPort = std::make_unique(portId, this); @@ -367,6 +382,8 @@ void SaiPlatform::initPorts() { saiPort = std::make_unique(portId, this); } else if (platformMode == PlatformType::PLATFORM_TAHAN800BC) { saiPort = std::make_unique(portId, this); + } else if (platformMode == PlatformType::PLATFORM_YANGRA) { + saiPort = std::make_unique(portId, this); } else { saiPort = std::make_unique(portId, this); } @@ -440,7 +457,8 @@ std::vector SaiPlatform::getPortsWithTransceiverID( SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( bool mandatoryOnly, cfg::SwitchType swType, - std::optional swId) { + std::optional swId, + BootType bootType) { SaiSwitchTraits::Attributes::InitSwitch initSwitch(true); std::optional hwInfo = getHwInfo(this); @@ -587,6 +605,24 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( delayDropCongThreshold = 1; } #endif + std::optional< + SaiSwitchTraits::Attributes::FabricLinkLayerFlowControlThreshold> + fabricLLFC; +#if defined(BRCM_SAI_SDK_DNX) && defined(BRCM_SAI_SDK_GTE_12_0) + if (getAsic()->getSwitchType() == cfg::SwitchType::FABRIC && + getAsic()->getFabricNodeRole() == HwAsic::FabricNodeRole::DUAL_STAGE_L1) { + CHECK(getAsic()->getAsicType() == cfg::AsicType::ASIC_TYPE_RAMON3) + << " LLFC threshold values for no R3 chips in DUAL_STAGE_L1 role needs to figured out"; + // Vendor suggested valie + constexpr uint32_t kRamon3LlfcThreshold{800}; + fabricLLFC = std::vector({kRamon3LlfcThreshold}); + } +#endif + if (swType == cfg::SwitchType::FABRIC && bootType == BootType::COLD_BOOT) { + // FABRIC switches should always start in isolated state until we configure + // the switch + switchIsolate = true; + } return { initSwitch, @@ -651,6 +687,10 @@ SaiSwitchTraits::CreateAttributes SaiPlatform::getSwitchAttributes( #endif std::nullopt, // ReachabilityGroupList delayDropCongThreshold, // Delay Drop Cong Threshold + fabricLLFC, + std::nullopt, // SRAM free percent XOFF threshold + std::nullopt, // SRAM free percent XON threshold + std::nullopt, // No acls for traps }; } diff --git a/fboss/agent/platforms/sai/SaiPlatform.h b/fboss/agent/platforms/sai/SaiPlatform.h index 5b27017cb4b1c..537b77c02263d 100644 --- a/fboss/agent/platforms/sai/SaiPlatform.h +++ b/fboss/agent/platforms/sai/SaiPlatform.h @@ -104,7 +104,8 @@ class SaiPlatform : public Platform, public StateObserver { virtual SaiSwitchTraits::CreateAttributes getSwitchAttributes( bool mandatoryOnly, cfg::SwitchType switchType, - std::optional switchId); + std::optional switchId, + BootType bootType); uint32_t getDefaultMacAgingTime() const; diff --git a/fboss/agent/platforms/sai/SaiPlatformInit.cpp b/fboss/agent/platforms/sai/SaiPlatformInit.cpp index 0f3d59d5d7905..821cfb4e2379b 100644 --- a/fboss/agent/platforms/sai/SaiPlatformInit.cpp +++ b/fboss/agent/platforms/sai/SaiPlatformInit.cpp @@ -34,6 +34,7 @@ #include "fboss/agent/platforms/sai/SaiMorgan800ccPlatform.h" #include "fboss/agent/platforms/sai/SaiTahan800bcPlatform.h" #include "fboss/agent/platforms/sai/SaiWedge400CPlatform.h" +#include "fboss/agent/platforms/sai/SaiYangraPlatform.h" namespace facebook::fboss { @@ -74,7 +75,9 @@ std::unique_ptr chooseSaiPlatform( } else if (productInfo->getType() == PlatformType::PLATFORM_MERU400BIU) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); - } else if (productInfo->getType() == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + productInfo->getType() == PlatformType::PLATFORM_MERU800BIA || + productInfo->getType() == PlatformType::PLATFORM_MERU800BIAB) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); } else if (productInfo->getType() == PlatformType::PLATFORM_MERU800BFA) { @@ -95,6 +98,9 @@ std::unique_ptr chooseSaiPlatform( } else if (productInfo->getType() == PlatformType::PLATFORM_MORGAN800CC) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); + } else if (productInfo->getType() == PlatformType::PLATFORM_YANGRA) { + return std::make_unique( + std::move(productInfo), localMac, platformMappingStr); } else if (productInfo->getType() == PlatformType::PLATFORM_JANGA800BIC) { return std::make_unique( std::move(productInfo), localMac, platformMappingStr); diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.cpp b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp new file mode 100644 index 0000000000000..c6f0521a46960 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.cpp @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + +#include "fboss/agent/platforms/sai/SaiYangraPlatform.h" +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" +#include "fboss/agent/platforms/common/yangra/YangraPlatformMapping.h" + +#include "fboss/agent/hw/sai/api/ArsApi.h" +#include "fboss/agent/hw/sai/api/ArsProfileApi.h" +#include "fboss/agent/hw/sai/api/MplsApi.h" +#include "fboss/agent/hw/sai/api/SystemPortApi.h" +#include "fboss/agent/hw/sai/api/TamApi.h" +#include "fboss/agent/hw/sai/api/VirtualRouterApi.h" + +#include + +namespace facebook::fboss { + +// No Change +SaiYangraPlatform::SaiYangraPlatform( + std::unique_ptr productInfo, + folly::MacAddress localMac, + const std::string& platformMappingStr) + : SaiPlatform( + std::move(productInfo), + platformMappingStr.empty() + ? std::make_unique() + : std::make_unique(platformMappingStr), + localMac) {} + +void SaiYangraPlatform::setupAsic( + cfg::SwitchType switchType, + std::optional switchId, + int16_t switchIndex, + std::optional systemPortRange, + folly::MacAddress& mac, + std::optional /*role*/) { + asic_ = std::make_unique( + switchType, switchId, switchIndex, systemPortRange, mac); + asic_->setDefaultStreamType(cfg::StreamType::UNICAST); +} + +HwAsic* SaiYangraPlatform::getAsic() const { + return asic_.get(); +} +const std::unordered_map +SaiYangraPlatform::getSaiProfileVendorExtensionValues() const { + return std::unordered_map(); +} + +const std::set& SaiYangraPlatform::getSupportedApiList() const { + static auto apis = getDefaultSwitchAsicSupportedApis(); + apis.erase(facebook::fboss::MplsApi::ApiType); + apis.erase(facebook::fboss::VirtualRouterApi::ApiType); + apis.erase(facebook::fboss::TamApi::ApiType); + apis.erase(facebook::fboss::SystemPortApi::ApiType); +#if SAI_API_VERSION >= SAI_VERSION(1, 14, 0) + apis.erase(facebook::fboss::ArsApi::ApiType); + apis.erase(facebook::fboss::ArsProfileApi::ApiType); +#endif + return apis; +} + +std::optional +SaiYangraPlatform::getAclFieldList() const { + return std::nullopt; +} +std::string SaiYangraPlatform::getHwConfig() { + std::string xml_filename = "/usr/share/sai_5600.xml"; + std::ifstream xml_file(xml_filename); + std::string xml_config( + (std::istreambuf_iterator(xml_file)), + std::istreambuf_iterator()); + // std::cout << "Read config from: " << xml_filename << std::endl; + // std::cout << "Content:" << std::endl << xml_config << std::endl; + return xml_config; +} + +bool SaiYangraPlatform::isSerdesApiSupported() const { + return false; +} +std::vector SaiYangraPlatform::getAllPortsInGroup( + PortID /*portID*/) const { + return {}; +} +std::vector SaiYangraPlatform::getSupportedFlexPortModes() const { + return { + FlexPortMode::ONEX400G, + FlexPortMode::ONEX100G, + FlexPortMode::ONEX40G, + FlexPortMode::FOURX25G, + FlexPortMode::FOURX10G, + FlexPortMode::TWOX50G}; +} +std::optional SaiYangraPlatform::getInterfaceType( + TransmitterTechnology /*transmitterTech*/, + cfg::PortSpeed /*speed*/) const { + return std::nullopt; +} + +bool SaiYangraPlatform::supportInterfaceType() const { + return false; +} + +void SaiYangraPlatform::initLEDs() {} +SaiYangraPlatform::~SaiYangraPlatform() = default; + +SaiSwitchTraits::CreateAttributes SaiYangraPlatform::getSwitchAttributes( + bool mandatoryOnly, + cfg::SwitchType switchType, + std::optional switchId, + BootType bootType) { + auto attributes = SaiPlatform::getSwitchAttributes( + mandatoryOnly, switchType, switchId, bootType); + std::get>(attributes) = + std::nullopt; + return attributes; +} +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatform.h b/fboss/agent/platforms/sai/SaiYangraPlatform.h new file mode 100644 index 0000000000000..79cdecce82b12 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatform.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include "fboss/agent/platforms/sai/SaiPlatform.h" + +namespace facebook::fboss { + +class ChenabAsic; + +class SaiYangraPlatform : public SaiPlatform { + public: + SaiYangraPlatform( + std::unique_ptr productInfo, + folly::MacAddress localMac, + const std::string& platformMappingStr); + ~SaiYangraPlatform() override; + + std::optional getAclFieldList() + const override; + + HwAsic* getAsic() const override; + bool isSerdesApiSupported() const override; + std::vector getAllPortsInGroup(PortID /*portID*/) const override; + std::vector getSupportedFlexPortModes() const override; + std::optional getInterfaceType( + TransmitterTechnology /*transmitterTech*/, + cfg::PortSpeed /*speed*/) const override; + bool supportInterfaceType() const override; + void initLEDs() override; + + const std::set& getSupportedApiList() const override; + + const std::unordered_map + getSaiProfileVendorExtensionValues() const override; + + std::string getHwConfig() override; + + SaiSwitchTraits::CreateAttributes getSwitchAttributes( + bool mandatoryOnly, + cfg::SwitchType switchType, + std::optional switchId, + BootType bootType) override; + + private: + void setupAsic( + cfg::SwitchType switchType, + std::optional switchId, + int16_t switchIndex, + std::optional systemPortRange, + folly::MacAddress& mac, + std::optional role) override; + std::unique_ptr asic_; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp b/fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp new file mode 100644 index 0000000000000..41ddfe0e73cb6 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatformPort.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/platforms/sai/SaiYangraPlatformPort.h" + +namespace facebook::fboss { + +uint32_t SaiYangraPlatformPort::getCurrentLedState() const { + return static_cast(currentLedState_); +} +uint32_t SaiYangraPlatformPort::getPhysicalLaneId( + uint32_t /*chipId*/, + uint32_t logicalLane) const { + return logicalLane; +} +void SaiYangraPlatformPort::portChanged( + std::shared_ptr /*newPort*/, + std::shared_ptr /*oldPort*/) {} +void SaiYangraPlatformPort::linkStatusChanged(bool /*up*/, bool /*adminUp*/) {} +bool SaiYangraPlatformPort::supportsTransceiver() const { + return false; +} + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/SaiYangraPlatformPort.h b/fboss/agent/platforms/sai/SaiYangraPlatformPort.h new file mode 100644 index 0000000000000..66ed0f2409539 --- /dev/null +++ b/fboss/agent/platforms/sai/SaiYangraPlatformPort.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2023-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#pragma once + +#include "fboss/agent/platforms/sai/SaiPlatformPort.h" + +namespace facebook::fboss { + +class SaiYangraPlatformPort : public SaiPlatformPort { + public: + SaiYangraPlatformPort(PortID id, SaiPlatform* platform) + : SaiPlatformPort(id, platform) {} + void linkStatusChanged(bool up, bool adminUp) override; + uint32_t getPhysicalLaneId(uint32_t chipId, uint32_t logicalLane) + const override; + // void externalState(PortLedExternalState lfs) override; + uint32_t getCurrentLedState() const override; + void portChanged( + std::shared_ptr /*newPort*/, + std::shared_ptr /*oldPort*/) override; + + bool supportsTransceiver() const override; + + private: + uint32_t currentLedState_{0}; +}; + +} // namespace facebook::fboss diff --git a/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h b/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h index b3af4613cfa57..1d0eb673a173d 100644 --- a/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h +++ b/fboss/agent/platforms/sai/cloudripper/SaiCloudRipperPhyPlatform.h @@ -45,7 +45,8 @@ class SaiCloudRipperPhyPlatform : public SaiPlatform { SaiSwitchTraits::CreateAttributes getSwitchAttributes( bool /*mandatoryOnly*/, cfg::SwitchType switchType, - std::optional switchId) override { + std::optional switchId, + BootType /*bootType*/) override { CHECK(switchCreateAttrs_); return *switchCreateAttrs_; } diff --git a/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h b/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h index 189f4c08c158c..78459d8874c56 100644 --- a/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h +++ b/fboss/agent/platforms/sai/elbert/SaiElbert8DDPhyPlatform.h @@ -50,7 +50,8 @@ class SaiElbert8DDPhyPlatform : public SaiPlatform { SaiSwitchTraits::CreateAttributes getSwitchAttributes( bool /*mandatoryOnly*/, cfg::SwitchType switchType, - std::optional switchId) override { + std::optional switchId, + BootType /*bootType*/) override { CHECK(switchCreateAttrs_); return *switchCreateAttrs_; } diff --git a/fboss/agent/platforms/sai/platform.bzl b/fboss/agent/platforms/sai/platform.bzl deleted file mode 100644 index 0d7f7fcd1c9a7..0000000000000 --- a/fboss/agent/platforms/sai/platform.bzl +++ /dev/null @@ -1,303 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("@fbcode_macros//build_defs:custom_unittest.bzl", "custom_unittest") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_npu_impls", "get_all_phy_impls", "get_link_group_map", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name", "sai_switch_lib_name") - -headers = [ - "SaiBcmDarwinPlatformPort.h", - "SaiBcmElbertPlatformPort.h", - "SaiBcmFujiPlatformPort.h", - "SaiBcmMinipackPlatformPort.h", - "SaiBcmWedge100PlatformPort.h", - "SaiBcmYampPlatformPort.h", - "SaiJanga800bicPlatformPort.h", - "SaiMeru400bfuPlatformPort.h", - "SaiMeru400biuPlatformPort.h", - "SaiMeru800biaPlatformPort.h", - "SaiMeru800bfaPlatformPort.h", - "SaiBcmMontblancPlatformPort.h", - "SaiMeru400biaPlatformPort.h", - "SaiMorgan800ccPlatformPort.h", - "SaiTahan800bcPlatformPort.h", -] - -common_srcs = [ - "SaiPlatform.cpp", - "SaiBcmPlatform.cpp", - "SaiBcmPlatformPort.cpp", - "SaiBcmWedge100Platform.cpp", - "SaiBcmWedge400Platform.cpp", - "SaiBcmWedge400PlatformPort.cpp", - "SaiBcmDarwinPlatform.cpp", - "SaiBcmElbertPlatform.cpp", - "SaiBcmMinipackPlatform.cpp", - "SaiBcmYampPlatform.cpp", - "SaiBcmFujiPlatform.cpp", - "SaiElbert8DDPhyPlatformPort.cpp", - "SaiFakePlatform.cpp", - "SaiFakePlatformPort.cpp", - "SaiJanga800bicPlatform.cpp", - "SaiJanga800bicPlatformPort.cpp", - "SaiPlatformPort.cpp", - "SaiPlatformInit.cpp", - "SaiWedge400CPlatform.cpp", - "SaiWedge400CPlatformPort.cpp", - "SaiTajoPlatform.cpp", - "SaiTajoPlatformPort.cpp", - "SaiCloudRipperPlatform.cpp", - "SaiCloudRipperPlatformPort.cpp", - "SaiMeru400biuPlatform.cpp", - "SaiMeru800biaPlatform.cpp", - "SaiMeru800bfaPlatform.cpp", - "SaiMeru400bfuPlatform.cpp", - "SaiMeru400biaPlatformPort.cpp", - "SaiMeru400biaPlatform.cpp", - "SaiBcmMontblancPlatform.cpp", - "SaiBcmMontblancPlatformPort.cpp", - "SaiMorgan800ccPlatformPort.cpp", - "SaiMorgan800ccPlatform.cpp", - "SaiTahan800bcPlatform.cpp", - "SaiTahan800bcPlatformPort.cpp", -] - -bcm_srcs = common_srcs + [ - "bcm/SaiBcmMinipackPlatform.cpp", - "bcm/SaiBcmPlatform.cpp", - "bcm/SaiBcmWedge100PlatformPort.cpp", - "facebook/SaiBcmMinipackPlatformPort.cpp", - "facebook/SaiBcmFujiPlatformPort.cpp", - "facebook/SaiBcmWedge400PlatformPort.cpp", - "facebook/SaiBcmDarwinPlatform.cpp", - "facebook/SaiBcmDarwinPlatformPort.cpp", - "facebook/SaiBcmYampPlatformPort.cpp", - "facebook/SaiBcmElbertPlatformPort.cpp", - "facebook/SaiMeru400biuPlatform.cpp", - "facebook/SaiMeru800biaPlatform.cpp", - "facebook/SaiMeru400bfuPlatform.cpp", - "facebook/SaiMeru800bfaPlatform.cpp", - "oss/SaiWedge400CPlatformPort.cpp", - "facebook/SaiMeru400biuPlatformPort.cpp", - "facebook/SaiMeru800biaPlatformPort.cpp", - "facebook/SaiMeru400bfuPlatformPort.cpp", - "facebook/SaiMeru800bfaPlatformPort.cpp", - "oss/SaiTajoPlatform.cpp", - "oss/SaiMeru400biaPlatform.cpp", - "oss/SaiMorgan800ccPlatformPort.cpp", -] - -fake_srcs = common_srcs + [ - "oss/SaiBcmMinipackPlatform.cpp", - "oss/SaiBcmPlatform.cpp", - "oss/SaiBcmMinipackPlatformPort.cpp", - "oss/SaiBcmFujiPlatformPort.cpp", - "oss/SaiBcmWedge100PlatformPort.cpp", - "oss/SaiBcmWedge400PlatformPort.cpp", - "oss/SaiBcmDarwinPlatform.cpp", - "oss/SaiBcmDarwinPlatformPort.cpp", - "oss/SaiBcmYampPlatformPort.cpp", - "oss/SaiBcmElbertPlatformPort.cpp", - "oss/SaiWedge400CPlatformPort.cpp", - "oss/SaiMeru400biuPlatform.cpp", - "oss/SaiMeru800biaPlatform.cpp", - "oss/SaiMeru400biuPlatformPort.cpp", - "oss/SaiMeru800biaPlatformPort.cpp", - "oss/SaiMeru400bfuPlatform.cpp", - "oss/SaiMeru800bfaPlatform.cpp", - "oss/SaiMeru400bfuPlatformPort.cpp", - "oss/SaiMeru800bfaPlatformPort.cpp", - "oss/SaiTajoPlatform.cpp", - "oss/SaiMeru400biaPlatform.cpp", - "oss/SaiMorgan800ccPlatformPort.cpp", -] - -tajo_srcs = common_srcs + [ - "oss/SaiBcmMinipackPlatform.cpp", - "facebook/SaiWedge400CPlatformPort.cpp", - "oss/SaiBcmPlatform.cpp", - "oss/SaiBcmMinipackPlatformPort.cpp", - "oss/SaiBcmFujiPlatformPort.cpp", - "oss/SaiBcmWedge100PlatformPort.cpp", - "oss/SaiBcmWedge400PlatformPort.cpp", - "oss/SaiBcmDarwinPlatform.cpp", - "oss/SaiBcmDarwinPlatformPort.cpp", - "oss/SaiBcmYampPlatformPort.cpp", - "oss/SaiBcmElbertPlatformPort.cpp", - "oss/SaiMeru400biuPlatform.cpp", - "oss/SaiMeru800biaPlatform.cpp", - "oss/SaiMeru800bfaPlatform.cpp", - "oss/SaiMeru400biuPlatformPort.cpp", - "oss/SaiMeru800biaPlatformPort.cpp", - "oss/SaiMeru800bfaPlatformPort.cpp", - "oss/SaiMeru400bfuPlatform.cpp", - "oss/SaiMeru400bfuPlatformPort.cpp", - "tajo/SaiTajoPlatform.cpp", - "oss/SaiMeru400biaPlatform.cpp", - "oss/SaiMorgan800ccPlatformPort.cpp", -] - -credo_srcs = [ - "elbert/SaiElbert8DDPhyPlatform.cpp", - "cloudripper/SaiCloudRipperPhyPlatform.cpp", -] - -# TODO(ccpowers): Eventually we should be able to split up phy platform -# sources based on the sai impl rather than including all phy sources -phy_srcs = bcm_srcs + credo_srcs - -def _get_srcs(sai_impl): - if not sai_impl: - return fake_srcs - if sai_impl.name == "brcm": - return bcm_srcs - if sai_impl.name == "leaba": - return tajo_srcs - if sai_impl.name == "credo": - return phy_srcs - return fake_srcs - -# sai_impl should match one of the names defined in sai/api/TARGETS -# Note: that TARGETS file has a comment explaining the design for the SAI -# library TARGETS. -def _sai_platform_lib(sai_impl, is_npu = True): - netwhoami_deps = [ - "//neteng/netwhoami/lib/cpp:recover", - ] - - return cpp_library( - name = "{}".format(sai_switch_dependent_name("sai_platform", sai_impl, is_npu)), - srcs = _get_srcs(sai_impl), - headers = headers, - versions = to_versions(sai_impl), - exported_deps = netwhoami_deps + [ - "//fboss/agent:handler", - "//fboss/agent/state:state", - "//fboss/lib/platforms:platform_mode", - "//fboss/lib/platforms:product-info", - "//fboss/agent/hw/sai/switch:{}".format(sai_switch_lib_name(sai_impl, is_npu)), - "//fboss/agent/hw/sai/switch:{}".format(sai_switch_dependent_name("thrift_handler", sai_impl, is_npu)), - "//fboss/agent/hw:hw_switch_warmboot_helper", - "//fboss/agent/hw/switch_asics:switch_asics", - "//fboss/agent/platforms/common/elbert:elbert_platform_mapping", - "//fboss/agent/platforms/common/fake_test:fake_test_platform_mapping", - "//fboss/agent/platforms/common/galaxy:galaxy_platform_mapping", - "//fboss/agent/platforms/common/wedge100:wedge100_platform_mapping", - "//fboss/agent/platforms/common/wedge40:wedge40_platform_mapping", - "//fboss/agent/platforms/common/wedge400c:wedge400c_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", - "//fboss/agent/platforms/common/darwin:darwin_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", - "//fboss/agent/platforms/common/minipack:minipack_platform_mapping", - "//fboss/agent/platforms/common/yamp:yamp_platform_mapping", - "//fboss/agent/platforms/common/fuji:fuji_platform_mapping", - "//fboss/agent/platforms/common/elbert:elbert_platform_mapping", - "//fboss/agent/platforms/common/meru400biu:meru400biu_platform_mapping", - "//fboss/agent/platforms/common/meru400bfu:meru400bfu_platform_mapping", - "//fboss/agent/platforms/common/meru400bia:meru400bia_platform_mapping", - "//fboss/agent/platforms/common/montblanc:montblanc_platform_mapping", - "//fboss/agent/platforms/common/morgan800cc:morgan800cc_platform_mapping", - "//fboss/agent/hw/test:config_factory", - "//fboss/qsfp_service/lib:qsfp-service-client", - "//fboss/lib/config:fboss_config_utils", - "//fboss/agent/platforms/common/utils:wedge-led-utils", - "//fboss/agent/platforms/common/utils:bcm_yaml_config", - "//fboss/lib/fpga:wedge400_fpga", - "//fboss/lib/fpga/facebook/darwin:darwin_fpga", - "//fboss/lib/fpga/facebook/cloudripper:cloudripper_fpga", - "//fboss/lib/fpga/facebook/yamp:yamp_fpga", - "//fboss/agent/platforms/common/cloud_ripper:cloud_ripper_platform_mapping", - ], - ) - -def _versions(sai_impl): - versions = to_versions(sai_impl) - return versions - -def _wedge_agent_bin(sai_impl, is_npu): - wedge_agent_name = "wedge_agent{}".format(to_impl_suffix(sai_impl)) - sai_platform_name = sai_switch_dependent_name("sai_platform", sai_impl, is_npu) - return cpp_binary( - name = "{}".format(wedge_agent_name), - srcs = [ - "wedge_agent.cpp", - ], - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ], - link_group_map = get_link_group_map(wedge_agent_name, sai_impl), - auto_headers = AutoHeaders.SOURCES, - versions = _versions(sai_impl), - deps = [ - "//fboss/agent:monolithic_agent_initializer", - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - ":{}".format(sai_platform_name), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ], - ) - -def get_version_info_test_env(sai_impl): - test_env = {} - if sai_impl.is_dyn: - test_env["LD_LIBRARY_PATH"] = "third-party-buck/platform010-compat/build/{}/{}/lib/dyn".format(sai_impl.sdk_name, sai_impl.version) - return test_env - -def _wedge_agent_version_info_test(sai_impl, wedge_agent_name_prefix): - wedge_agent_name = "{}{}".format(wedge_agent_name_prefix, to_impl_suffix(sai_impl)) - sai_platform_name = sai_switch_dependent_name("sai_platform", sai_impl, True) - return custom_unittest( - name = "test-{}-version".format(wedge_agent_name), - command = [ - "fboss/lib/test/test_version.sh", - "$(exe_target :{})".format(wedge_agent_name), - ], - type = "simple", - versions = _versions(sai_impl) if sai_impl.name != "fake" else {}, - deps = [ - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - ":{}".format(sai_platform_name), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - ], - env = get_version_info_test_env(sai_impl), - ) - -def _wedge_hwagent_bin(sai_impl, hwagent_prefix): - wedge_agent_name = "{}{}".format(hwagent_prefix, to_impl_suffix(sai_impl)) - sai_platform_name = sai_switch_dependent_name("sai_platform", sai_impl, True) - hw_bin_deps = [ - "//fboss/agent:hwagent-main", - "//fboss/agent/facebook:sai_version_{}".format(to_impl_lib_name(sai_impl)), - ":{}".format(sai_platform_name), - "//fboss/agent/hw/sai/impl:{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:{}".format(sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True)), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - hw_bin_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - return cpp_binary( - name = "{}".format(wedge_agent_name), - srcs = [ - "WedgeHwAgent.cpp", - "facebook/WedgeHwAgent.cpp", - ], - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ], - link_group_map = get_link_group_map(wedge_agent_name, sai_impl), - auto_headers = AutoHeaders.SOURCES, - versions = _versions(sai_impl), - deps = hw_bin_deps, - ) - -def all_wedge_agent_bins(): - for sai_impl in get_all_npu_impls(): - _sai_platform_lib(sai_impl, True) - _wedge_agent_bin(sai_impl, True) - _wedge_agent_version_info_test(sai_impl, "wedge_agent") - _wedge_agent_version_info_test(sai_impl, "fboss_hw_agent") - _wedge_hwagent_bin(sai_impl, "fboss_hw_agent") - - for sai_impl in get_all_phy_impls(): - _sai_platform_lib(sai_impl, False) diff --git a/fboss/agent/platforms/wedge/utils/utils.bzl b/fboss/agent/platforms/wedge/utils/utils.bzl deleted file mode 100644 index c25041c572fc6..0000000000000 --- a/fboss/agent/platforms/wedge/utils/utils.bzl +++ /dev/null @@ -1,52 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -def _get_oss_suffix(oss): - return "-oss" if oss else "" - -common_srcs = [] - -oss_srcs = [ - "oss/BcmLedUtils.cpp", -] - -facebook_srcs = [ - "facebook/BcmLedUtils.cpp", -] - -def _bcm_led_utils(oss): - srcs = [] - deps = [ - "//fboss/agent:fboss-error", - "//folly:range", - ] - external_deps = [] - if oss: - srcs = common_srcs + oss_srcs - external_deps = [ - "glog", - ] - else: - srcs = common_srcs + facebook_srcs - external_deps = [ - "glog", - ("broadcom-xgs-robo", None, "xgs_robo"), - ] - deps = deps + [ - "//fboss/agent/platforms/common/utils:wedge-led-utils", - ] - oss_suffix = _get_oss_suffix(oss) - return cpp_library( - name = "bcm-led-utils{}".format(oss_suffix), - srcs = srcs, - auto_headers = AutoHeaders.SOURCES, - headers = [ - "BcmLedUtils.h", - ], - exported_deps = deps, - exported_external_deps = external_deps, - ) - -def bcm_led_utils(): - for oss in [True, False]: - _bcm_led_utils(oss) diff --git a/fboss/agent/rib/RoutingInformationBase.h b/fboss/agent/rib/RoutingInformationBase.h index 95e6db17a6a88..4e8c6e4cf7f29 100644 --- a/fboss/agent/rib/RoutingInformationBase.h +++ b/fboss/agent/rib/RoutingInformationBase.h @@ -381,7 +381,7 @@ class RoutingInformationBase { void* cookie); std::unique_ptr ribUpdateThread_; - FbossEventBase ribUpdateEventBase_; + FbossEventBase ribUpdateEventBase_{"RibUpdateEventBase"}; RibRouteTables ribTables_; }; diff --git a/fboss/agent/sai.bzl b/fboss/agent/sai.bzl deleted file mode 100644 index 2138f202216bf..0000000000000 --- a/fboss/agent/sai.bzl +++ /dev/null @@ -1,20 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_IMPLS", "to_impl_lib_name") - -def sai_main_all(): - for sai_impls in SAI_IMPLS: - cpp_library( - name = "main-sai-{}".format(to_impl_lib_name(sai_impls)), - srcs = [ - "Main.cpp", - "facebook/Main.cpp", - ], - exported_deps = [ - ":agent_initializer_h", - ":fboss_common_init", - ":fboss_init", - "//common/init:init", - "//fboss/agent/facebook:sai_version_{}".format(to_impl_lib_name(sai_impls)), - "//folly/logging:init", - ], - ) diff --git a/fboss/agent/state/AclTable.h b/fboss/agent/state/AclTable.h index dfebef1670988..ee4600826f43b 100644 --- a/fboss/agent/state/AclTable.h +++ b/fboss/agent/state/AclTable.h @@ -84,6 +84,14 @@ class AclTable : public ThriftStructNode { set(qualifiers); } + auto getUdfGroups() const { + return safe_cref(); + } + + void setUdfGroups(const std::vector& udfGroups) { + set(udfGroups); + } + // Offset applied to dataplane ACL priority. Dataplane ACL // entries are given priorites >= 100K and CPU ACL entries // priorities < 100K. diff --git a/fboss/agent/state/DsfNode.cpp b/fboss/agent/state/DsfNode.cpp index 8751e18f5a3e8..f5de3e7c372b6 100644 --- a/fboss/agent/state/DsfNode.cpp +++ b/fboss/agent/state/DsfNode.cpp @@ -31,6 +31,22 @@ void DsfNode::setName(const std::string& name) { set(name); } +void DsfNode::setLocalSystemPortOffset(std::optional val) { + if (val.has_value()) { + set(val.value()); + } else { + remove(); + } +} + +void DsfNode::setGlobalSystemPortOffset(std::optional val) { + if (val.has_value()) { + set(val.value()); + } else { + remove(); + } +} + cfg::DsfNodeType DsfNode::getType() const { return get()->cref(); } @@ -51,12 +67,9 @@ void DsfNode::setLoopbackIps(const std::vector& loopbackIps) { set(loopbackIps); } -std::optional DsfNode::getSystemPortRange() const { - std::optional sysPortRange; - if (get()) { - sysPortRange = get()->toThrift(); - } - return sysPortRange; +cfg::SystemPortRanges DsfNode::getSystemPortRanges() const { + auto ranges = get()->toThrift(); + return ranges; } std::optional DsfNode::getMac() const { @@ -85,5 +98,45 @@ std::optional DsfNode::getClusterId() const { return clusterId; } +std::optional DsfNode::getInbandPortId() const { + std::optional inbandPortId; + if (get().has_value()) { + inbandPortId = get()->cref(); + } + return inbandPortId; +} + +std::optional DsfNode::getFabricLevel() const { + std::optional fabricLevel; + if (get().has_value()) { + fabricLevel = get()->cref(); + } + return fabricLevel; +} + +bool DsfNode::isLevel2FabricNode() const { + auto fabricLevel = getFabricLevel(); + return fabricLevel.has_value() && fabricLevel.value() == 2; +} + +bool DsfNode::isInterfaceNode() const { + return getType() == cfg::DsfNodeType::INTERFACE_NODE; +} + +std::optional DsfNode::getLocalSystemPortOffset() const { + std::optional ret; + if (get().has_value()) { + ret = get()->cref(); + } + return ret; +} + +std::optional DsfNode::getGlobalSystemPortOffset() const { + std::optional ret; + if (get().has_value()) { + ret = get()->cref(); + } + return ret; +} template class ThriftStructNode; } // namespace facebook::fboss diff --git a/fboss/agent/state/DsfNode.h b/fboss/agent/state/DsfNode.h index 30506e7527cc2..e8dc7ecce0fa1 100644 --- a/fboss/agent/state/DsfNode.h +++ b/fboss/agent/state/DsfNode.h @@ -38,10 +38,18 @@ class DsfNode : public ThriftStructNode { } std::set getLoopbackIpsSorted() const; void setLoopbackIps(const std::vector& loopbackIps); - std::optional getSystemPortRange() const; + cfg::SystemPortRanges getSystemPortRanges() const; std::optional getMac() const; PlatformType getPlatformType() const; std::optional getClusterId() const; + std::optional getLocalSystemPortOffset() const; + std::optional getGlobalSystemPortOffset() const; + std::optional getInbandPortId() const; + void setLocalSystemPortOffset(std::optional val); + void setGlobalSystemPortOffset(std::optional val); + std::optional getFabricLevel() const; + bool isLevel2FabricNode() const; + bool isInterfaceNode() const; private: // Inherit the constructors required for clone() diff --git a/fboss/agent/state/Interface.cpp b/fboss/agent/state/Interface.cpp index 79e7078277a45..621be5aba998b 100644 --- a/fboss/agent/state/Interface.cpp +++ b/fboss/agent/state/Interface.cpp @@ -138,12 +138,15 @@ Interface* Interface::modify(std::shared_ptr* state) { auto id(static_cast(getID())); auto switchId2Info = switchSettings->getSwitchIdToSwitchInfo(); for (const auto& [_, switchInfo] : switchId2Info) { - if (switchInfo.systemPortRange().has_value()) { - auto sysPortRange = *switchInfo.systemPortRange(); + for (const auto& sysPortRange : + *switchInfo.systemPortRanges()->systemPortRanges()) { if (id >= *sysPortRange.minimum() && id <= *sysPortRange.maximum()) { isLocal = true; break; } + if (isLocal) { + break; + } } } } else { diff --git a/fboss/agent/state/Port.h b/fboss/agent/state/Port.h index f9e0bb189dec8..83f0e490985f8 100644 --- a/fboss/agent/state/Port.h +++ b/fboss/agent/state/Port.h @@ -738,6 +738,13 @@ class Port : public ThriftStructNode { } } + bool getConditionalEntropyRehash() const { + return cref()->cref(); + } + void setConditionalEntropyRehash(bool conditionalEntropyRehash) { + set(conditionalEntropyRehash); + } + private: auto getRxSaks() const { return safe_cref(); diff --git a/fboss/agent/state/PortPgConfig.h b/fboss/agent/state/PortPgConfig.h index 3c2ad51dbff74..3cc8023a2213f 100644 --- a/fboss/agent/state/PortPgConfig.h +++ b/fboss/agent/state/PortPgConfig.h @@ -128,6 +128,70 @@ class PortPgConfig ref() = bufferPoolConfigPtr; } + std::optional getMaxSharedXoffThresholdBytes() const { + if (const auto& maxSharedXoffThresholdBytes = + cref()) { + return std::optional(maxSharedXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMaxSharedXoffThresholdBytes(uint64_t maxSharedXoffThresholdBytes) { + set( + maxSharedXoffThresholdBytes); + } + + std::optional getMinSharedXoffThresholdBytes() const { + if (const auto& minSharedXoffThresholdBytes = + cref()) { + return std::optional(minSharedXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMinSharedXoffThresholdBytes(uint64_t minSharedXoffThresholdBytes) { + set( + minSharedXoffThresholdBytes); + } + + std::optional getMaxSramXoffThresholdBytes() const { + if (const auto& maxSramXoffThresholdBytes = + cref()) { + return std::optional(maxSramXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMaxSramXoffThresholdBytes(uint64_t maxSramXoffThresholdBytes) { + set( + maxSramXoffThresholdBytes); + } + + std::optional getMinSramXoffThresholdBytes() const { + if (const auto& minSramXoffThresholdBytes = + cref()) { + return std::optional(minSramXoffThresholdBytes->cref()); + } + return std::nullopt; + } + + void setMinSramXoffThresholdBytes(uint64_t minSramXoffThresholdBytes) { + set( + minSramXoffThresholdBytes); + } + + std::optional getSramResumeOffsetBytes() const { + if (auto sramResumeOffsetBytes = + safe_cref()) { + return sramResumeOffsetBytes->toThrift(); + } + return std::nullopt; + } + + void setSramResumeOffsetBytes(uint64_t sramResumeOffsetBytes) { + set(sramResumeOffsetBytes); + } + static state::PortPgFields makeThrift( uint8_t id, std::optional scalingFactor, diff --git a/fboss/agent/state/SwitchSettings.h b/fboss/agent/state/SwitchSettings.h index 1a833ea10c832..0fe60d19eb6d6 100644 --- a/fboss/agent/state/SwitchSettings.h +++ b/fboss/agent/state/SwitchSettings.h @@ -575,6 +575,42 @@ class SwitchSettings } } + std::optional getSramGlobalFreePercentXoffThreshold() const { + if (auto sramGlobalFreePercentXoffTh = + cref()) { + return sramGlobalFreePercentXoffTh->toThrift(); + } + return std::nullopt; + } + + void setSramGlobalFreePercentXoffThreshold( + std::optional sramGlobalFreePercentXoffTh) { + if (!sramGlobalFreePercentXoffTh) { + ref().reset(); + } else { + set( + *sramGlobalFreePercentXoffTh); + } + } + + std::optional getSramGlobalFreePercentXonThreshold() const { + if (auto sramGlobalFreePercentXonTh = + cref()) { + return sramGlobalFreePercentXonTh->toThrift(); + } + return std::nullopt; + } + + void setSramGlobalFreePercentXonThreshold( + std::optional sramGlobalFreePercentXonTh) { + if (!sramGlobalFreePercentXonTh) { + ref().reset(); + } else { + set( + *sramGlobalFreePercentXonTh); + } + } + SwitchSettings* modify(std::shared_ptr* state); private: diff --git a/fboss/agent/state/SwitchState.cpp b/fboss/agent/state/SwitchState.cpp index 4a3bf5db2c8b2..9fec05ad643ec 100644 --- a/fboss/agent/state/SwitchState.cpp +++ b/fboss/agent/state/SwitchState.cpp @@ -650,26 +650,26 @@ SwitchID SwitchState::getAssociatedSwitchID(PortID portID) const { return getSystemPorts()->getNode(*systemPortID)->getSwitchId(); } -std::optional SwitchState::getAssociatedSystemPortRangeIf( +cfg::SystemPortRanges SwitchState::getAssociatedSystemPortRangesIf( InterfaceID intfID) const { auto intf = getInterfaces()->getNodeIf(intfID); if (!intf || intf->getType() != cfg::InterfaceType::SYSTEM_PORT) { - return std::nullopt; + return cfg::SystemPortRanges(); } auto systemPortID = intf->getSystemPortID(); CHECK(systemPortID.has_value()); auto switchId = getSystemPorts()->getNode(*systemPortID)->getSwitchId(); auto dsfNode = getDsfNodes()->getNodeIf(switchId); - return dsfNode->getSystemPortRange(); + return dsfNode->getSystemPortRanges(); } -std::optional SwitchState::getAssociatedSystemPortRangeIf( +cfg::SystemPortRanges SwitchState::getAssociatedSystemPortRangesIf( PortID portID) const { auto port = getPorts()->getNodeIf(portID); if (!port || port->getInterfaceIDs().size() != 1) { - return std::nullopt; + return cfg::SystemPortRanges(); } - return getAssociatedSystemPortRangeIf(port->getInterfaceID()); + return getAssociatedSystemPortRangesIf(port->getInterfaceID()); } std::optional SwitchState::getClusterId(SwitchID switchId) const { diff --git a/fboss/agent/state/SwitchState.h b/fboss/agent/state/SwitchState.h index a61b0bef761d0..d8d23d2712dab 100644 --- a/fboss/agent/state/SwitchState.h +++ b/fboss/agent/state/SwitchState.h @@ -256,13 +256,13 @@ class SwitchState : public ThriftStructNode { * Get sys port range associated with this interface. Only applicable * for interfaces of type system port */ - std::optional getAssociatedSystemPortRangeIf( + cfg::SystemPortRanges getAssociatedSystemPortRangesIf( InterfaceID intfID) const; /* * Get sys port range associated with this port. Only applicable * for ports that have intf of type SYS_PORT attached. */ - std::optional getAssociatedSystemPortRangeIf(PortID port) const; + cfg::SystemPortRanges getAssociatedSystemPortRangesIf(PortID port) const; std::optional getClusterId(SwitchID switchId) const; std::vector getIntraClusterSwitchIds(SwitchID switchId) const; const std::shared_ptr& getInterfaces() const; @@ -522,6 +522,8 @@ class SwitchState : public ThriftStructNode { std::shared_ptr& getAclTablesForStage( const folly::dynamic& swJson); + void resetRemoteIntfs(const std::shared_ptr& intfs); + static std::shared_ptr fromThrift( const state::SwitchState& data); state::SwitchState toThrift() const; @@ -535,8 +537,6 @@ class SwitchState : public ThriftStructNode { static Type* modify(std::shared_ptr* state); private: - void resetRemoteIntfs(const std::shared_ptr& intfs); - template < typename MultiMapType, typename ThriftType = typename MultiMapType::Node::ThriftType> diff --git a/fboss/agent/state/UdfGroup.cpp b/fboss/agent/state/UdfGroup.cpp index aa2201448a453..c54c70cdb10b4 100644 --- a/fboss/agent/state/UdfGroup.cpp +++ b/fboss/agent/state/UdfGroup.cpp @@ -46,6 +46,13 @@ int UdfGroup::getFieldSizeInBytes() const { return get()->cref(); } +void UdfGroup::setUdfGroupType(std::optional type) { + if (type) { + set(*type); + } else { + ref().reset(); + } +} void UdfGroup::setUdfBaseHeader(cfg::UdfBaseHeaderType header) { set(header); } diff --git a/fboss/agent/state/UdfGroup.h b/fboss/agent/state/UdfGroup.h index 06672ccb35cac..381691f2efc0b 100644 --- a/fboss/agent/state/UdfGroup.h +++ b/fboss/agent/state/UdfGroup.h @@ -33,6 +33,7 @@ class UdfGroup : public ThriftStructNode { int getFieldSizeInBytes() const; std::vector getUdfPacketMatcherIds() const; + void setUdfGroupType(std::optional type); void setUdfBaseHeader(cfg::UdfBaseHeaderType header); void setStartOffsetInBytes(int offset); void setFieldSizeInBytes(int size); diff --git a/fboss/agent/state/tests/AclGroupTests.cpp b/fboss/agent/state/tests/AclGroupTests.cpp index 51a68d9254499..6912786ecda51 100644 --- a/fboss/agent/state/tests/AclGroupTests.cpp +++ b/fboss/agent/state/tests/AclGroupTests.cpp @@ -68,6 +68,15 @@ const std::vector kQualifiers = { cfg::AclTableQualifier::SRC_IPV4, cfg::AclTableQualifier::DST_IPV4}; +const std::string kUdfGroup1 = "udfGroup1"; +const std::string kUdfGroup2 = "udfGroup2"; +const std::string kUdfGroup3 = "udfGroup3"; + +const std::vector kAclUdfGroups = { + kUdfGroup1, + kUdfGroup2, + kUdfGroup3}; + namespace { std::shared_ptr getAclMapFromState( @@ -185,10 +194,12 @@ TEST(AclGroup, TestEquality) { table1->setAclMap(map1); table1->setActionTypes(kActionTypes); table1->setQualifiers(kQualifiers); + table1->setUdfGroups(kAclUdfGroups); auto table2 = std::make_shared(2, kTable1); table2->setAclMap(map2); table2->setActionTypes(kActionTypes); table2->setQualifiers(kQualifiers); + table2->setUdfGroups(kAclUdfGroups); validateNodeSerialization(*table1); validateNodeSerialization(*table2); @@ -292,6 +303,7 @@ TEST(AclGroup, SerializeAclTable) { table->setAclMap(map); table->setActionTypes(kActionTypes); table->setQualifiers(kQualifiers); + table->setUdfGroups(kAclUdfGroups); validateNodeSerialization(*table); auto serialized = table->toThrift(); @@ -303,6 +315,7 @@ TEST(AclGroup, SerializeAclTable) { EXPECT_EQ(*(tableBack->getAclMap()), *map); EXPECT_EQ(tableBack->getActionTypes(), kActionTypes); EXPECT_EQ(tableBack->getQualifiers(), kQualifiers); + EXPECT_EQ(tableBack->getUdfGroups()->toThrift(), kAclUdfGroups); // change the priority table->setPriority(2); @@ -317,6 +330,7 @@ TEST(AclGroup, SerializeAclTable) { EXPECT_EQ(*(tableBack->getAclMap()), *map); EXPECT_EQ(tableBack->getActionTypes(), kActionTypes); EXPECT_EQ(tableBack->getQualifiers(), kQualifiers); + EXPECT_EQ(tableBack->getUdfGroups()->toThrift(), kAclUdfGroups); } TEST(AclGroup, SerializeAclTableMap) { @@ -495,6 +509,7 @@ TEST(AclGroup, ApplyConfigColdbootMultipleAclTable) { table1->setAclMap(map1); table1->setActionTypes(kActionTypes); table1->setQualifiers(kQualifiers); + table1->setUdfGroups(kAclUdfGroups); validateNodeSerialization(*table1); auto tableMap = make_shared(); @@ -521,6 +536,9 @@ TEST(AclGroup, ApplyConfigColdbootMultipleAclTable) { cfgTable1.qualifiers_ref()->resize(kQualifiers.size()); cfgTable1.qualifiers_ref() = kQualifiers; + cfgTable1.udfGroups_ref()->resize(kAclUdfGroups.size()); + cfgTable1.udfGroups_ref() = kAclUdfGroups; + cfg::SwitchConfig config; cfg::AclTableGroup cfgTableGroup; config.aclTableGroup_ref() = cfgTableGroup; @@ -579,6 +597,14 @@ TEST(AclGroup, ApplyConfigColdbootMultipleAclTable) { ->getTableIf(table1->getID()) ->getQualifiers(), kQualifiers); + EXPECT_EQ( + stateV1->getAclTableGroups() + ->getNodeIf(kAclStage1) + ->getAclTableMap() + ->getTableIf(table1->getID()) + ->getUdfGroups() + ->toThrift(), + kAclUdfGroups); EXPECT_EQ( *(stateV1->getAclTableGroups() ->getNodeIf(kAclStage1) diff --git a/fboss/agent/state/tests/AclTests.cpp b/fboss/agent/state/tests/AclTests.cpp index c628605e6d4bb..abeb0b2950e0e 100644 --- a/fboss/agent/state/tests/AclTests.cpp +++ b/fboss/agent/state/tests/AclTests.cpp @@ -486,9 +486,6 @@ TEST(Acl, Icmp) { // test config exceptions config.acls()[0].proto() = 4; - EXPECT_THROW( - publishAndApplyConfig(stateV1, &config, platform.get()), FbossError); - config.acls()[0].proto().reset(); EXPECT_THROW( publishAndApplyConfig(stateV1, &config, platform.get()), FbossError); config.acls()[0].proto() = 58; diff --git a/fboss/agent/state/tests/DsfNodeTests.cpp b/fboss/agent/state/tests/DsfNodeTests.cpp index 6d4221bcee2d6..ba86da25aaf28 100644 --- a/fboss/agent/state/tests/DsfNodeTests.cpp +++ b/fboss/agent/state/tests/DsfNodeTests.cpp @@ -251,3 +251,26 @@ TEST(DSFNode, loopackIpsSorted) { }); EXPECT_EQ(loopbacksSorted, dsfNode->getLoopbackIpsSorted()); } + +TEST(DsfNode, localGlobalSysPortOffset) { + auto dsfNode = makeDsfNode(); + EXPECT_TRUE(dsfNode->getLocalSystemPortOffset().has_value()); + EXPECT_TRUE(dsfNode->getGlobalSystemPortOffset().has_value()); + dsfNode->setGlobalSystemPortOffset(std::nullopt); + dsfNode->setLocalSystemPortOffset(std::nullopt); + EXPECT_FALSE(dsfNode->getLocalSystemPortOffset().has_value()); + EXPECT_FALSE(dsfNode->getGlobalSystemPortOffset().has_value()); + dsfNode->setLocalSystemPortOffset(42); + dsfNode->setGlobalSystemPortOffset(43); + ASSERT_TRUE(dsfNode->getLocalSystemPortOffset().has_value()); + EXPECT_EQ(dsfNode->getLocalSystemPortOffset().value(), 42); + ASSERT_TRUE(dsfNode->getGlobalSystemPortOffset().has_value()); + EXPECT_EQ(dsfNode->getGlobalSystemPortOffset().value(), 43); +} + +TEST(DsfNode, systemPortRanges) { + auto dsfNode = makeDsfNode(); + auto sysPortRanges = *dsfNode->getSystemPortRanges().systemPortRanges(); + EXPECT_FALSE(sysPortRanges.empty()); + EXPECT_EQ(sysPortRanges.size(), 1); +} diff --git a/fboss/agent/state/tests/InterfaceTests.cpp b/fboss/agent/state/tests/InterfaceTests.cpp index 8e9c794b54384..612c5acd9a0aa 100644 --- a/fboss/agent/state/tests/InterfaceTests.cpp +++ b/fboss/agent/state/tests/InterfaceTests.cpp @@ -786,8 +786,9 @@ TEST(Interface, getInterfaceSysPortRangeVoqSwitch) { ASSERT_NE(nullptr, stateV1); auto multiIntfs = stateV1->getInterfaces(); auto intf = multiIntfs->cbegin()->second->cbegin()->second; - EXPECT_TRUE( - stateV1->getAssociatedSystemPortRangeIf(intf->getID()).has_value()); + EXPECT_FALSE(stateV1->getAssociatedSystemPortRangesIf(intf->getID()) + .systemPortRanges() + ->empty()); } TEST(Interface, getInterfaceSysPortRange) { @@ -798,8 +799,9 @@ TEST(Interface, getInterfaceSysPortRange) { ASSERT_NE(nullptr, stateV1); auto multiIntfs = stateV1->getInterfaces(); auto intf = multiIntfs->cbegin()->second->cbegin()->second; - EXPECT_FALSE( - stateV1->getAssociatedSystemPortRangeIf(intf->getID()).has_value()); + EXPECT_TRUE(stateV1->getAssociatedSystemPortRangesIf(intf->getID()) + .systemPortRanges() + ->empty()); } TEST(Interface, getInterfacePortsVoqSwitch) { diff --git a/fboss/agent/state/tests/PortTests.cpp b/fboss/agent/state/tests/PortTests.cpp index 56ccb79fea5f3..fd7ebc0396bae 100644 --- a/fboss/agent/state/tests/PortTests.cpp +++ b/fboss/agent/state/tests/PortTests.cpp @@ -9,6 +9,7 @@ */ #include "fboss/agent/ApplyThriftConfig.h" #include "fboss/agent/FbossError.h" +#include "fboss/agent/SwitchIdScopeResolver.h" #include "fboss/agent/gen-cpp2/switch_config_constants.h" #include "fboss/agent/hw/mock/MockPlatform.h" #include "fboss/agent/state/DeltaFunctions.h" @@ -937,12 +938,14 @@ TEST(Port, verifyInterfaceIDsForVoqSwitches) { auto stateV1 = publishAndApplyConfig(stateV0, &config, platform.get()); ASSERT_NE(nullptr, stateV1); + SwitchIdScopeResolver scopeResolver( + *config.switchSettings()->switchIdToSwitchInfo()); for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); - auto expectedIntfID = InterfaceID( - *stateV1->getAssociatedSystemPortRangeIf(portID)->minimum() + - port.second->getID()); + auto sysPortId = getSystemPortID( + portID, stateV1, scopeResolver.scope(portID).switchId()); + auto expectedIntfID = InterfaceID(static_cast(sysPortId)); EXPECT_EQ(expectedIntfID, port.second->getInterfaceID()); } } @@ -959,7 +962,9 @@ TEST(Port, verifySysPortRangeForNonVoqSwitches) { for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); - EXPECT_FALSE(stateV1->getAssociatedSystemPortRangeIf(portID).has_value()); + EXPECT_TRUE(stateV1->getAssociatedSystemPortRangesIf(portID) + .systemPortRanges() + ->empty()); } } } @@ -1011,7 +1016,9 @@ TEST(Port, verifySysPortRangeForVoqSwitches) { for (const auto& portMap : std::as_const(*(stateV1->getPorts()))) { for (auto port : *portMap.second) { auto portID = port.second->getID(); - EXPECT_TRUE(stateV1->getAssociatedSystemPortRangeIf(portID).has_value()); + EXPECT_FALSE(stateV1->getAssociatedSystemPortRangesIf(portID) + .systemPortRanges() + ->empty()); } } } diff --git a/fboss/agent/state/tests/SwitchSettingsTests.cpp b/fboss/agent/state/tests/SwitchSettingsTests.cpp index ba02fc299f64d..bda2f39c9d434 100644 --- a/fboss/agent/state/tests/SwitchSettingsTests.cpp +++ b/fboss/agent/state/tests/SwitchSettingsTests.cpp @@ -351,7 +351,16 @@ TEST(SwitchSettingsTest, ThrifyMigration) { TEST(SwitchSettingsTest, applyVoqSwitch) { auto platform = createMockPlatform(); auto stateV0 = make_shared(); - addSwitchInfo(stateV0, cfg::SwitchType::VOQ, kVoqSwitchIdBegin /* switchId*/); + addSwitchInfo( + stateV0, + cfg::SwitchType::VOQ, + kVoqSwitchIdBegin /* switchId*/, + cfg::AsicType::ASIC_TYPE_MOCK, + cfg::switch_config_constants::DEFAULT_PORT_ID_RANGE_MIN(), + cfg::switch_config_constants::DEFAULT_PORT_ID_RANGE_MAX(), + 0, + 10, + 54); // Check default value auto switchSettingsV0 = utility::getFirstNodeIf(stateV0->getSwitchSettings()); @@ -413,7 +422,10 @@ TEST(SwitchSettingsTest, applyVoqSwitch) { cfg::Range64 sysPortRange; sysPortRange.minimum() = 100; sysPortRange.maximum() = 200; - switchInfo2.systemPortRange() = sysPortRange; + switchInfo2.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); + switchInfo2.localSystemPortOffset() = *sysPortRange.minimum(); + switchInfo2.globalSystemPortOffset() = *sysPortRange.minimum(); + switchInfo2.inbandPortId() = kSingleStageInbandPortId; config.switchSettings()->switchIdToSwitchInfo() = { std::make_pair(kVoqSwitchIdBegin, switchInfo2)}; auto stateV2 = publishAndApplyConfig(stateV1, &config, platform.get()); diff --git a/fboss/agent/state/tests/SystemPortTests.cpp b/fboss/agent/state/tests/SystemPortTests.cpp index ac23e519a718c..8703ccc2ed2ea 100644 --- a/fboss/agent/state/tests/SystemPortTests.cpp +++ b/fboss/agent/state/tests/SystemPortTests.cpp @@ -8,6 +8,7 @@ * */ +#include "fboss/agent/Utils.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/state/SystemPort.h" #include "fboss/agent/test/TestUtils.h" @@ -109,11 +110,15 @@ TEST(SystemPort, sysPortApplyConfig) { stateV1->getSystemPorts()->numNodes(), stateV1->getPorts()->numNodes()); // Flip one port to fabric port type and see that sys ports are updated config.ports()->begin()->portType() = cfg::PortType::FABRIC_PORT; - // Prune the interface corresponding to now changed port type - auto sysPortRange = stateV1->getAssociatedSystemPortRangeIf( - PortID(*config.ports()->begin()->logicalID())); - auto intfIDToPrune = - *sysPortRange->minimum() + *config.ports()->begin()->logicalID(); + auto portConfig = *config.ports()->begin(); + SwitchIdScopeResolver scopeResolver( + *config.switchSettings()->switchIdToSwitchInfo()); + auto portSwitchId = + scopeResolver.scope(PortID(*config.ports()->begin()->logicalID())) + .switchId(); + auto sysPortId = + getSystemPortID(PortID(*portConfig.logicalID()), stateV1, portSwitchId); + auto intfIDToPrune = static_cast(sysPortId); std::vector intfs; for (const auto& intf : *config.interfaces()) { if (*intf.intfID() != intfIDToPrune) { diff --git a/fboss/agent/switch_config.thrift b/fboss/agent/switch_config.thrift index b383318e53c49..62f3cecc36dfc 100644 --- a/fboss/agent/switch_config.thrift +++ b/fboss/agent/switch_config.thrift @@ -540,6 +540,7 @@ struct AclEntry { 30: optional i32 vlanID; + /* 31-34 not to be used for SAI */ 31: optional list udfGroups; 32: optional byte roceOpcode; @@ -597,6 +598,7 @@ struct AclTable { 3: list aclEntries = []; 4: list actionTypes = []; 5: list qualifiers = []; + 6: list udfGroups = []; } enum AclStage { @@ -932,6 +934,7 @@ enum PacketRxReason { SAMPLEPACKET = 18, // Sample Packet TTL_0 = 19, // Packets with TTL as 0 EAPOL = 20, // EAPOL for Macsec + PORT_MTU_ERROR = 21, // Packet size exceeds port MTU, should not use together with L3_MTU_ERROR } enum PortLoopbackMode { @@ -1153,6 +1156,7 @@ struct Port { 31: Scope scope = Scope.LOCAL; 32: optional PortQueueConfigName portVoqConfigName; + 33: bool conditionalEntropyRehash = false; } enum LacpPortRate { @@ -1344,6 +1348,7 @@ enum AsicType { ASIC_TYPE_JERICHO3 = 14, ASIC_TYPE_YUBA = 15, ASIC_TYPE_RAMON3 = 16, + ASIC_TYPE_CHENAB = 17, } /** * The configuration for an interface @@ -1613,6 +1618,10 @@ const i16 DEFAULT_FLOWLET_TABLE_SIZE = 4096; const i64 DEFAULT_PORT_ID_RANGE_MIN = 0; const i64 DEFAULT_PORT_ID_RANGE_MAX = 2047; +struct SystemPortRanges { + 1: list systemPortRanges; +} + struct SwitchInfo { 1: SwitchType switchType; 2: AsicType asicType; @@ -1622,6 +1631,18 @@ struct SwitchInfo { 5: optional Range64 systemPortRange; 6: optional string switchMac; 7: optional string connectionHandle; + 8: SystemPortRanges systemPortRanges; + // Offset from where to start local system port + // ID allocation from + 9: optional i32 localSystemPortOffset; + // Offset from where to start global system port + // ID allocation from + 10: optional i32 globalSystemPortOffset; + // Inband port ID - port used by this DSF node + // for inband communication. This must be known + // as part of config for other nodes to bootstrap + // communication to this node + 11: optional i32 inbandPortId; } /* @@ -1683,6 +1704,12 @@ struct SwitchSettings { // When queue-per-host is enabled, MACs matching any OUI from this list could get any queue. 17: list metaMacOuis = []; 18: optional bool needL2EntryForNeighbor; + // Once the SRAM free buffers fall below this threshold, + // specified as a percent of total SRAM buffers, send XOFF. + 19: optional byte sramGlobalFreePercentXoffThreshold; + // Once the SRAM free buffers goes above this threshold, + // specified as a percent of total SRAM buffers, send XON. + 20: optional byte sramGlobalFreePercentXonThreshold; } // Global buffer pool @@ -1715,14 +1742,26 @@ struct PortPgConfig { 6: optional i32 resumeOffsetBytes; // global buffer pool as used by this PG 7: string bufferPoolName; -} - -// Sdk version information that will be parsed by the wrapper script -// -> asicSdk would be the native SDK for a binary -// -> saiSdk would be the SDK required for a Sai device, if the Native SDK does not provide support + // Shared buffer min/max threshold range at which to trigger PFC + 8: optional i64 maxSharedXoffThresholdBytes; + 9: optional i64 minSharedXoffThresholdBytes; + // SRAM/OCB buffer min/max threshold range at which to trigger PFC + 10: optional i64 maxSramXoffThresholdBytes; + 11: optional i64 minSramXoffThresholdBytes; + // Offset from XOFF in SRAM before allowing XON + 12: optional i64 sramResumeOffsetBytes; +} + +// asicSdk: Native SDK version. may or may not support SAI +// saiSdk: Set to SAI SDK version on SAI device if asicSdk does not support SAI +// firmware: Set to firmware version if a device uses firmware +// +// asicSdk and saiSdk are consumed by the wrapper script. +// firmware version will be consumed by Agent. struct SdkVersion { 1: optional string asicSdk; 2: optional string saiSdk; + 3: optional string firmware; } enum IpTunnelMode { @@ -1779,6 +1818,18 @@ struct DsfNode { // Denotes the level for fabric switch in // the DSF n/w topology. Value is either 1 or 2 10: optional i32 fabricLevel; + // Offset from where to start local system port + // ID allocation from + 11: optional i32 localSystemPortOffset; + // Offset from where to start local system port + // ID allocation from + 12: optional i32 globalSystemPortOffset; + 13: SystemPortRanges systemPortRanges; + // Inband port ID - port used by this DSF node + // for inband communication. This must be known + // as part of config for other nodes to bootstrap + // communication to this node + 14: optional i32 inbandPortId; } /** diff --git a/fboss/agent/switch_state.thrift b/fboss/agent/switch_state.thrift index aa1fbc75c6310..7c288670dbcbb 100644 --- a/fboss/agent/switch_state.thrift +++ b/fboss/agent/switch_state.thrift @@ -28,6 +28,11 @@ struct PortPgFields { 6: string bufferPoolName; 7: optional string scalingFactor; 8: optional common.BufferPoolFields bufferPoolConfig; + 9: optional i64 maxSharedXoffThresholdBytes; + 10: optional i64 minSharedXoffThresholdBytes; + 11: optional i64 maxSramXoffThresholdBytes; + 12: optional i64 minSramXoffThresholdBytes; + 13: optional i64 sramResumeOffsetBytes; } struct MKASakKey { @@ -129,6 +134,7 @@ struct PortFields { 52: list activeErrors; 53: switch_config.Scope scope = switch_config.Scope.LOCAL; 54: optional i32 reachabilityGroupId; + 55: bool conditionalEntropyRehash = false; } typedef ctrl.SystemPortThrift SystemPortFields @@ -384,6 +390,9 @@ struct SwitchSettingsFields { 42: Address.BinaryAddress icmpV4UnavailableSrcAddress; // Switch property of reachability group size, for the use of input balanced mode. 43: optional i32 reachabilityGroupListSize; + // SRAM global thresholds to send PFC XOFF/XON + 44: optional byte sramGlobalFreePercentXoffThreshold; + 45: optional byte sramGlobalFreePercentXonThreshold; } struct RoutePrefix { @@ -574,6 +583,7 @@ struct AclTableFields { 3: optional map aclMap; 4: list actionTypes; 5: list qualifiers; + 6: list udfGroups; } struct AclTableGroupFields { diff --git a/fboss/agent/test/AgentEnsemble.cpp b/fboss/agent/test/AgentEnsemble.cpp index 1cfe2f03fa5a9..8dc3793fe84d0 100644 --- a/fboss/agent/test/AgentEnsemble.cpp +++ b/fboss/agent/test/AgentEnsemble.cpp @@ -36,6 +36,8 @@ facebook::fboss::PlatformInitFn kPlatformInitFn; static std::string kInputConfigFile; std::optional kStreamTypeOpt{std::nullopt}; static const int kMsWaitForStatsRetry = 2000; +constexpr auto kConfig = "config"; +constexpr auto kMultiSwitch = "multi_switch"; } // namespace namespace facebook::fboss { @@ -53,18 +55,20 @@ void AgentEnsemble::setupEnsemble( FLAGS_verify_apply_oper_delta = true; if (bootType_ == BootType::COLD_BOOT) { - auto agentConf = + auto inputAgentConfig = AgentConfig::fromFile(AgentEnsemble::getInputConfigFile())->thrift; if (platformConfigFn) { - platformConfigFn(*(agentConf.platform())); + platformConfigFn( + *(inputAgentConfig.sw()), *(inputAgentConfig.platform())); } // some platform config may need cold boots. so overwrite the config before // creating a switch - writeConfig(agentConf, configFile_); + writeConfig(inputAgentConfig, configFile_); } + auto agentConf = AgentConfig::fromFile(configFile_); + dumpConfigForHwAgent(agentConf.get()); overrideConfigFlag(configFile_); - createSwitch( - AgentConfig::fromFile(configFile_), hwFeaturesDesired, kPlatformInitFn); + createSwitch(std::move(agentConf), hwFeaturesDesired, kPlatformInitFn); for (auto switchId : getSw()->getHwAsicTable()->getSwitchIDs()) { HwAsic* asic = getHwAsicTable()->getHwAsicIf(switchId); @@ -141,16 +145,17 @@ void AgentEnsemble::startAgent(bool failHwCallsOnWarmboot) { initializer->initAgent(this, hwWriteBehavior); })); initializer->initializer()->waitForInitDone(); - // if cold booting, invoke link toggler - if (getSw()->getBootType() != BootType::WARM_BOOT && - linkToggler_ != nullptr) { - linkToggler_->applyInitialConfig(initialConfig_); + + if (getSw()->getBootType() == BootType::COLD_BOOT) { + if (linkToggler_ != nullptr) { + linkToggler_->applyInitialConfig(initialConfig_); + } + // With link state toggler, initial config is applied with ports down to + // later bring up the ports. This causes the config to be written as + // loopback mode = None. Write the init config again to have the proper + // config. + applyNewConfig(initialConfig_); } - // With link state toggler, initial config is applied with ports down to - // later bring up the ports. This causes the config to be written as - // loopback mode = None. Write the init config again to have the proper - // config. - applyNewConfig(initialConfig_); } void AgentEnsemble::writeConfig(const cfg::SwitchConfig& config) { @@ -605,4 +610,34 @@ AgentEnsemble::getHwAgentTestClient(SwitchID switchId) { std::move(reconnectingChannel)); } +void AgentEnsemble::dumpConfigForHwAgent(AgentConfig* agentConf) { + if (FLAGS_multi_switch || + folly::get_default( + *agentConf->thrift.defaultCommandLineArgs(), kMultiSwitch, "") == + "true") { + cfg::AgentConfig newAgentConf; + std::map defaultCommandLineArgs = + *agentConf->thrift.defaultCommandLineArgs(); + std::vector flags; + gflags::GetAllFlags(&flags); + for (const auto& flag : flags) { + // Skip writing flags if 1) default value, and 2) config itself. + if (!flag.is_default && flag.name != kConfig) { + defaultCommandLineArgs[flag.name] = flag.current_value; + } + } + + newAgentConf.defaultCommandLineArgs() = defaultCommandLineArgs; + newAgentConf.sw() = *agentConf->thrift.sw(); + newAgentConf.platform() = *agentConf->thrift.platform(); + auto agentConfig = AgentConfig(newAgentConf); + utilCreateDir(AgentDirectoryUtil().agentEnsembleConfigDir()); + for (const auto& [_, switchInfo] : + *newAgentConf.sw()->switchSettings()->switchIdToSwitchInfo()) { + agentConfig.dumpConfig(AgentDirectoryUtil().getTestHwAgentConfigFile( + *switchInfo.switchIndex())); + } + } +} + } // namespace facebook::fboss diff --git a/fboss/agent/test/AgentEnsemble.h b/fboss/agent/test/AgentEnsemble.h index d185fe65c6052..57dc7ce59ae76 100644 --- a/fboss/agent/test/AgentEnsemble.h +++ b/fboss/agent/test/AgentEnsemble.h @@ -32,7 +32,8 @@ class HwSwitch; using AgentEnsembleSwitchConfigFn = std::function; -using AgentEnsemblePlatformConfigFn = std::function; +using AgentEnsemblePlatformConfigFn = + std::function; class AgentEnsemble : public TestEnsembleIf { public: @@ -134,13 +135,14 @@ class AgentEnsemble : public TestEnsembleIf { void linkStateChanged( PortID port, bool up, + cfg::PortType portType, std::optional iPhyFaultStatus = std::nullopt) override { if (getSw()->getSwitchRunState() >= SwitchRunState::CONFIGURED) { if (linkToggler_) { linkToggler_->linkStateChanged(port, up); } - getSw()->linkStateChanged(port, up); + getSw()->linkStateChanged(port, up, portType); } } @@ -292,6 +294,7 @@ class AgentEnsemble : public TestEnsembleIf { void setConfigFiles(const std::string& fileName); void setBootType(); void overrideConfigFlag(const std::string& fileName); + void dumpConfigForHwAgent(AgentConfig* agentConf); void writeConfig(const cfg::SwitchConfig& config); void writeConfig(const cfg::AgentConfig& config); diff --git a/fboss/agent/test/AgentEnsembleTest.cpp b/fboss/agent/test/AgentEnsembleTest.cpp index de453a701d047..c1f1468205729 100644 --- a/fboss/agent/test/AgentEnsembleTest.cpp +++ b/fboss/agent/test/AgentEnsembleTest.cpp @@ -4,6 +4,7 @@ #include #include #include "fboss/agent/AgentConfig.h" +#include "fboss/agent/AgentFeatures.h" #include "fboss/agent/CommonInit.h" #include "fboss/agent/HwAsicTable.h" #include "fboss/agent/Main.h" @@ -57,6 +58,8 @@ void AgentEnsembleTest::setupAgentEnsemble() { void AgentEnsembleTest::setCmdLineFlagOverrides() const { // Looped ports are the common case in tests FLAGS_disable_looped_fabric_ports = false; + // Set HW agent connection timeout to 120 seconds + FLAGS_hw_agent_connection_timeout_ms = 120000; } void AgentEnsembleTest::TearDown() { diff --git a/fboss/agent/test/AgentHwTest.cpp b/fboss/agent/test/AgentHwTest.cpp index 60cf09f36cecd..f2ab6b7ab004f 100644 --- a/fboss/agent/test/AgentHwTest.cpp +++ b/fboss/agent/test/AgentHwTest.cpp @@ -51,7 +51,9 @@ void AgentHwTest::SetUp() { agentEnsemble_ = createAgentEnsemble( initialConfigFn, FLAGS_disable_link_toggler /*disableLinkStateToggler*/, - platformConfigFn_, + [this](const cfg::SwitchConfig& sw, cfg::PlatformConfig& cfg) { + applyPlatformConfigOverrides(sw, cfg); + }, (HwSwitch::FeaturesDesired::PACKET_RX_DESIRED | HwSwitch::FeaturesDesired::LINKSCAN_DESIRED | HwSwitch::FeaturesDesired::TAM_EVENT_NOTIFY_DESIRED), @@ -90,6 +92,8 @@ void AgentHwTest::setCmdLineFlagOverrides() const { FLAGS_detect_wrong_fabric_connections = false; // Disable DSF subscription on single-box test FLAGS_dsf_subscribe = false; + // Set HW agent connection timeout to 120 seconds + FLAGS_hw_agent_connection_timeout_ms = 120000; } void AgentHwTest::TearDown() { diff --git a/fboss/agent/test/AgentHwTest.h b/fboss/agent/test/AgentHwTest.h index 253b77a8e2c8f..f7a0edd58b266 100644 --- a/fboss/agent/test/AgentHwTest.h +++ b/fboss/agent/test/AgentHwTest.h @@ -91,10 +91,6 @@ class AgentHwTest : public ::testing::Test { verifyAcrossWarmBoots([]() {}, verify, []() {}, []() {}); } - void setupPlatformConfig(AgentEnsemblePlatformConfigFn platformConfigFn) { - platformConfigFn_ = std::move(platformConfigFn); - } - void runForever() const; std::shared_ptr applyNewConfig(const cfg::SwitchConfig& config); void applyNewState(StateUpdateFn fn, const std::string& name = "agent-test") { @@ -206,6 +202,14 @@ class AgentHwTest : public ::testing::Test { */ virtual void setCmdLineFlagOverrides() const; + /* + * For tests to override the platform config. A read-only SwitchConfig is + * also provided for the implementation to use. + */ + virtual void applyPlatformConfigOverrides( + const cfg::SwitchConfig&, + cfg::PlatformConfig&) const {} + SwitchID switchIdForPort(PortID port) const; const HwAsic* hwAsicForPort(PortID port) const; const HwAsic* hwAsicForSwitch(SwitchID switchID) const; @@ -236,7 +240,6 @@ class AgentHwTest : public ::testing::Test { return true; } - AgentEnsemblePlatformConfigFn platformConfigFn_ = nullptr; std::unique_ptr agentEnsemble_; }; diff --git a/fboss/agent/test/ArpTest.cpp b/fboss/agent/test/ArpTest.cpp index a12d39e97d72a..a94cfcbc60946 100644 --- a/fboss/agent/test/ArpTest.cpp +++ b/fboss/agent/test/ArpTest.cpp @@ -1172,7 +1172,7 @@ TYPED_TEST(ArpTest, FlushEntryWithConcurrentUpdate) { PortID portID(1); // ensure port is up - sw->linkStateChanged(portID, true); + sw->linkStateChanged(portID, true, cfg::PortType::INTERFACE_PORT); VlanID vlanID(1); std::vector targetIPs; @@ -1248,7 +1248,7 @@ TYPED_TEST(ArpTest, PortFlapRecover) { auto sw = handle->getSw(); // ensure port is up - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); VlanID vlanID(1); IPAddressV4 senderIP = IPAddressV4("10.0.0.1"); @@ -1303,7 +1303,7 @@ TYPED_TEST(ArpTest, PortFlapRecover) { // send a port down event to the switch for port 1 EXPECT_STATE_UPDATE_TIMES_ATLEAST(sw, 1); - sw->linkStateChanged(PortID(1), false); + sw->linkStateChanged(PortID(1), false, cfg::PortType::INTERFACE_PORT); // purging neighbor entries occurs on the background EVB via NeighorUpdater as // a StateObserver. @@ -1326,7 +1326,7 @@ TYPED_TEST(ArpTest, PortFlapRecover) { // send a port up event to the switch for port 1 EXPECT_STATE_UPDATE_TIMES_ATLEAST(sw, 1); - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(sw); // Receive arp replies for entries on flapped port, port 1 diff --git a/fboss/agent/test/BUCK b/fboss/agent/test/BUCK index faae147d14c1b..94b7e58bbf35a 100644 --- a/fboss/agent/test/BUCK +++ b/fboss/agent/test/BUCK @@ -38,6 +38,7 @@ cpp_unittest( "OperDeltaFilterTests.cpp", "PortUpdateHandlerTest.cpp", "ReachabilityGroupTests.cpp", + "RemoteSystemInterfaceTests.cpp", "RemoteSystemPortTests.cpp", "ResolvedNexthopMonitorTest.cpp", "ResourceAccountantTest.cpp", @@ -115,6 +116,7 @@ cpp_unittest( "//fboss/agent/test/utils:trap_packet_utils", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//folly:dynamic", "//folly:memory", "//folly:move_wrapper", "//folly:network_address", @@ -192,6 +194,7 @@ cpp_library( "//fb303:service_data", "//fb303:thread_cached_service_data", "//fboss/agent:apply_thrift_config", + "//fboss/agent:constants", "//fboss/agent:core", "//fboss/agent:fboss-error", "//fboss/agent:load_agent_config", @@ -462,6 +465,7 @@ cpp_library( exported_deps = [ "fbsource//third-party/googletest:gtest", ":agent_ensemble", + "//fboss/agent:agent_features", "//fboss/agent:fboss_common_init", "//fboss/agent:hw_asic_table", "//fboss/agent:hw_switch", @@ -722,6 +726,7 @@ cpp_library( "//fboss/agent:hw_switch", "//fboss/agent:platform_base", "//fboss/agent:switch_config-cpp2-types", + "//fboss/agent:utils", "//fboss/agent/state:state", "//fboss/agent/state:state_update", "//folly/gen:base", diff --git a/fboss/agent/test/DsfSubscriptionTests.cpp b/fboss/agent/test/DsfSubscriptionTests.cpp index 781a9bc6e976e..7684daccf30c5 100644 --- a/fboss/agent/test/DsfSubscriptionTests.cpp +++ b/fboss/agent/test/DsfSubscriptionTests.cpp @@ -118,7 +118,7 @@ class DsfSubscriptionTest : public ::testing::Test { sysPortRange.minimum() = remoteSwitchId / kSwitchIdGap * kSysPortBlockSize; sysPortRange.maximum() = *sysPortRange.minimum() + kSysPortBlockSize; - dsfNode.systemPortRange() = sysPortRange; + dsfNode.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); dsfNode.loopbackIps() = {"::1/128", "169.254.0.1/24"}; config.dsfNodes()->insert(std::make_pair(remoteSwitchId, dsfNode)); } @@ -278,7 +278,6 @@ class DsfSubscriptionTest : public ::testing::Test { std::unique_ptr streamConnectPool_; std::unique_ptr streamServePool_; std::unique_ptr hwUpdatePool_; - std::optional serverOptions_; std::unique_ptr handle_; std::shared_ptr subscription_; SwSwitch* sw_; diff --git a/fboss/agent/test/EcmpSetupHelper.cpp b/fboss/agent/test/EcmpSetupHelper.cpp index 4de7be8c6e0f7..e1d3a347c501e 100644 --- a/fboss/agent/test/EcmpSetupHelper.cpp +++ b/fboss/agent/test/EcmpSetupHelper.cpp @@ -382,15 +382,16 @@ std::optional BaseEcmpSetupHelper::getInterface( CHECK(intf->getVlanID() == *vlan); return intf->getID(); } else if (port.isPhysicalPort()) { - // Look for port RIF - auto sysPortRange = state->getAssociatedSystemPortRangeIf(port.phyPortID()); - if (!sysPortRange.has_value()) { + auto sysPortRanges = + state->getAssociatedSystemPortRangesIf(port.phyPortID()); + if (sysPortRanges.systemPortRanges()->empty()) { return std::nullopt; } - auto sysPortBase = *sysPortRange->minimum(); - SystemPortID sysPortId{// static_cast to avoid spurious narrowing conversion - // compiler warning. PortID is just 16 bits - static_cast(port.intID()) + sysPortBase}; + // Look for port RIF + auto sysPortId = getSystemPortID( + port.phyPortID(), + state, + state->getAssociatedSwitchID(port.phyPortID())); if (auto intf = state->getInterfaces()->getNodeIf( InterfaceID(static_cast(sysPortId)))) { return intf->getID(); diff --git a/fboss/agent/test/LacpTest.cpp b/fboss/agent/test/LacpTest.cpp index a74cf489adb7b..77361fadeb451 100644 --- a/fboss/agent/test/LacpTest.cpp +++ b/fboss/agent/test/LacpTest.cpp @@ -43,7 +43,7 @@ namespace { class LacpTest : public ::testing::Test { protected: - LacpTest() : lacpEvb_() {} + LacpTest() : lacpEvb_("LacpEventBase") {} void SetUp() override { lacpThread_.reset(new std::thread([this] { @@ -65,7 +65,7 @@ class LacpTest : public ::testing::Test { } private: - FbossEventBase lacpEvb_; + FbossEventBase lacpEvb_{"LacpEventBase"}; std::unique_ptr lacpThread_{nullptr}; }; diff --git a/fboss/agent/test/LookupClassUpdaterTests.cpp b/fboss/agent/test/LookupClassUpdaterTests.cpp index 11321432f7ea2..829089d30e085 100644 --- a/fboss/agent/test/LookupClassUpdaterTests.cpp +++ b/fboss/agent/test/LookupClassUpdaterTests.cpp @@ -432,7 +432,7 @@ class LookupClassUpdaterTest : public ::testing::Test { } void bringPortDown(PortID portID) const { - this->sw_->linkStateChanged(portID, false); + this->sw_->linkStateChanged(portID, false, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(this->sw_); this->sw_->getNeighborUpdater()->waitForPendingUpdates(); diff --git a/fboss/agent/test/MacTableManagerTests.cpp b/fboss/agent/test/MacTableManagerTests.cpp index 1ba00379d016f..f204169e7f1ed 100644 --- a/fboss/agent/test/MacTableManagerTests.cpp +++ b/fboss/agent/test/MacTableManagerTests.cpp @@ -11,6 +11,7 @@ #include #include "fboss/agent/L2Entry.h" +#include "fboss/agent/ResourceAccountant.h" #include "fboss/agent/state/Port.h" #include "fboss/agent/state/SwitchState.h" #include "fboss/agent/state/Vlan.h" @@ -29,6 +30,7 @@ class MacTableManagerTest : public ::testing::Test { void SetUp() override { handle_ = createTestHandle(testStateA()); sw_ = handle_->getSw(); + FLAGS_enable_mac_update_protection = true; } void verifyStateUpdate(Func func) { @@ -61,6 +63,24 @@ class MacTableManagerTest : public ::testing::Test { facebook::fboss::L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_DELETE, wait); } + void triggerMacBulkLearnedCb( + const std::vector& macs, + bool wait = true) { + triggerMacBulkCbHelper( + macs, + facebook::fboss::L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD, + wait); + } + + void triggerMacBulkAgedCb( + const std::vector& macs, + bool wait = true) { + triggerMacBulkCbHelper( + macs, + facebook::fboss::L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_DELETE, + wait); + } + void verifyMacIsAdded() { verifyStateUpdate([=]() { auto vlan = sw_->getState()->getVlans()->getNode(kVlan()); @@ -73,6 +93,22 @@ class MacTableManagerTest : public ::testing::Test { }); } + // verify mac entris in switchState is in sync with resourceAccountant + // l2Entries_ + void verifyMacEntryCount(int l2ResourceAccountantEntries) { + verifyStateUpdate([=, this]() { + auto vlan = sw_->getState()->getVlans()->getNode(kVlan()); + auto* macTable = vlan->getMacTable().get(); + XLOG(DBG2) << "macTable size: " << macTable->size() + << ", l2ResourceAccountantEntries: " + << l2ResourceAccountantEntries + << ", getMacTableUpdateFailure: " + << sw_->stats()->getMacTableUpdateFailure(); + + EXPECT_EQ(l2ResourceAccountantEntries, macTable->size()); + }); + } + void verifyMacIsDeleted() { verifyStateUpdate([=]() { auto vlan = sw_->getState()->getVlans()->getNode(kVlan()); @@ -114,6 +150,24 @@ class MacTableManagerTest : public ::testing::Test { } } + void triggerMacBulkCbHelper( + const std::vector& macs, + L2EntryUpdateType l2EntryUpdateType, + bool wait = true) { + for (const auto& mac : macs) { + auto l2Entry = L2Entry( + mac, + kVlan(), + PortDescriptor(kPortID()), + L2Entry::L2EntryType::L2_ENTRY_TYPE_PENDING); + sw_->l2LearningUpdateReceived(l2Entry, l2EntryUpdateType); + } + if (wait) { + waitForBackgroundThread(sw_); + waitForStateUpdates(sw_); + } + } + std::unique_ptr handle_; SwSwitch* sw_; }; @@ -167,5 +221,42 @@ TEST_F(MacTableManagerTest, SameMacAgedCbTwice) { verifyMacIsDeleted(); } +// This test is to verify resourceAccountant is updated correctly +TEST_F(MacTableManagerTest, MacLearnedBulkCb) { + int16_t numMac = 100; + int16_t deleted = 0; + int16_t batchSize = 10; + std::vector macs; + for (int16_t i = 0; i < numMac; i++) { + macs.push_back(MacAddress::fromHBO(i)); + } + + // learn 10 mac entries + triggerMacBulkLearnedCb( + std::vector(macs.begin(), macs.begin() + batchSize)); + // expect 10 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); + + // age 10 mac entries + triggerMacBulkAgedCb( + std::vector(macs.begin(), macs.begin() + batchSize)); + deleted = batchSize; + // expect 0 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); + + // learn 90 mac entries + triggerMacBulkLearnedCb( + std::vector(macs.begin() + batchSize, macs.end())); + // expect 90 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); + + // age 20 mac entries + batchSize = 20; + triggerMacBulkAgedCb(std::vector( + macs.begin() + deleted, macs.begin() + deleted + batchSize)); + deleted += batchSize; + // expect 70 mac entries in switchState and resourceAccountant + verifyMacEntryCount(getSw()->getResourceAccountant()->l2Entries_); +} } // namespace facebook::fboss diff --git a/fboss/agent/test/MockAgentNetWhoAmI.h b/fboss/agent/test/MockAgentNetWhoAmI.h index 44d2b6f7b9df2..bc498edaa9e64 100644 --- a/fboss/agent/test/MockAgentNetWhoAmI.h +++ b/fboss/agent/test/MockAgentNetWhoAmI.h @@ -18,6 +18,7 @@ class MockAgentNetWhoAmI : public AgentNetWhoAmI { MOCK_CONST_METHOD0(isCiscoMorgan800ccPlatform, bool()); MOCK_CONST_METHOD0(isBcmVoqPlatform, bool()); MOCK_CONST_METHOD0(isFdsw, bool()); + MOCK_CONST_METHOD0(isSdsw, bool()); MOCK_CONST_METHOD0(isNotDrainable, bool()); MOCK_CONST_METHOD0(hasRoutingProtocol, bool()); MOCK_CONST_METHOD0(hasBgpRoutingProtocol, bool()); diff --git a/fboss/agent/test/MultiNodeLacpTests.cpp b/fboss/agent/test/MultiNodeLacpTests.cpp index 33ef76694195b..b50f3f2b57985 100644 --- a/fboss/agent/test/MultiNodeLacpTests.cpp +++ b/fboss/agent/test/MultiNodeLacpTests.cpp @@ -70,7 +70,8 @@ class MultiNodeLacpTest : public MultiNodeTest { } cfg::SwitchConfig getConfigWithAggPort( - cfg::LacpPortRate rate = cfg::LacpPortRate::SLOW) const { + cfg::LacpPortRate rate = cfg::LacpPortRate::SLOW, + double minLinkPercentage = 1.0) const { auto config = utility::multiplePortsPerIntfConfig( platform()->getPlatformMapping(), platform()->getAsic(), @@ -84,7 +85,12 @@ class MultiNodeLacpTest : public MultiNodeTest { auto idx = 0; auto portList = testPorts(); for (const auto& aggId : getAggPorts()) { - addAggPort(aggId, {portList[idx++], portList[idx++]}, &config, rate); + addAggPort( + aggId, + {portList[idx++], portList[idx++]}, + &config, + rate, + minLinkPercentage); } config.loadBalancers() = utility::getEcmpFullTrunkHalfHashConfig({platform()->getAsic()}); @@ -161,22 +167,25 @@ class MultiNodeLacpTest : public MultiNodeTest { aggPortUp, isDUT() ? kMaxRetries : kRemoteSwitchMaxRetries)); } - // Verify that LACP converged on all member ports - void verifyLacpState() const { - for (const auto& aggId : getAggPorts()) { - const auto& aggPort = - sw()->getState()->getAggregatePorts()->getNode(aggId); - EXPECT_NE(aggPort, nullptr); - EXPECT_EQ(aggPort->forwardingSubportCount(), aggPort->subportsCount()); - for (const auto& memberAndState : aggPort->subportAndFwdState()) { - // Verify that member port is enabled - EXPECT_EQ(memberAndState.second, AggregatePort::Forwarding::ENABLED); - // Verify that partner has synced - EXPECT_TRUE( - aggPort->getPartnerState(memberAndState.first).state & - LacpState::IN_SYNC); - } + // Verify that LACP converged on expected number of member ports + void verifyLacpState(AggregatePortID aggId, int expectedUpMemberPort) const { + const auto& aggPort = sw()->getState()->getAggregatePorts()->getNode(aggId); + EXPECT_NE(aggPort, nullptr); + CHECK_LE(expectedUpMemberPort, aggPort->subportsCount()); + EXPECT_EQ(aggPort->forwardingSubportCount(), expectedUpMemberPort); + int enabledCount = 0; + int syncedPartnerStateCount = 0; + for (const auto& memberAndState : aggPort->subportAndFwdState()) { + // Verify that member port is enabled + enabledCount += + memberAndState.second == AggregatePort::Forwarding::ENABLED; + // Verify that partner has synced + syncedPartnerStateCount += + (aggPort->getPartnerState(memberAndState.first).state & + LacpState::IN_SYNC) > 0; } + EXPECT_EQ(enabledCount, expectedUpMemberPort); + EXPECT_EQ(syncedPartnerStateCount, expectedUpMemberPort); } void verifyReachability( @@ -256,12 +265,14 @@ class MultiNodeLacpTest : public MultiNodeTest { } // verify lacp state information - verifyLacpState(); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } verifyReachability(); } std::vector getSubPorts( - AggregatePortID aggId) { + AggregatePortID aggId) const { const auto& aggPort = sw()->getState()->getAggregatePorts()->getNode(aggId); EXPECT_NE(aggPort, nullptr); return aggPort->sortedSubports(); @@ -308,7 +319,9 @@ TEST_F(MultiNodeLacpTest, Bringup) { // ensure that lacp session can stay up post timeout XLOG(DBG2) << "Waiting for LACP timeout period"; std::this_thread::sleep_for(period); - verifyLacpState(); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } }; verifyAcrossWarmBoots(verify); @@ -331,7 +344,7 @@ TEST_F(MultiNodeLacpTest, LinkDown) { setPortStatus(testPort, true); waitForAggPortStatus(aggPort, true); - verifyLacpState(); + verifyLacpState(aggPort, getSubPorts(aggPort).size()); // Remote port flap XLOG(DBG2) << "Disable an Agg member port on remote switch"; @@ -345,7 +358,7 @@ TEST_F(MultiNodeLacpTest, LinkDown) { XLOG(DBG2) << "Enable Agg member port on remote switch"; client->sync_setPortState(remotePortID, true); waitForAggPortStatus(aggPort, true); - verifyLacpState(); + verifyLacpState(aggPort, getSubPorts(aggPort).size()); }; verifyAcrossWarmBoots(verify); } @@ -366,7 +379,9 @@ TEST_F(MultiNodeLacpTest, LacpSlowFastInterop) { waitForAggPortStatus(aggPort, true); // verify lacp state information - verifyLacpState(); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } }; verifyAcrossWarmBoots(setup, verify); } @@ -511,3 +526,35 @@ TEST_F(MultiNodeRoutingLoop, LoopTraffic) { }; verifyAcrossWarmBoots(setup, verify, setup, verify); } + +class MultiNodeLacpMinLinkTest : public MultiNodeLacpTest { + protected: + cfg::SwitchConfig initialConfig() const override { + auto config = getConfigWithAggPort( + cfg::LacpPortRate::SLOW /* rate */, 0.5 /* minLinkPercentage */); + // Bring down one port for each agg port + for (auto& aggPort : *config.aggregatePorts()) { + const auto portId = *aggPort.key(); + for (auto& port : *config.ports()) { + if (*port.logicalID() == portId) { + port.state() = cfg::PortState::DISABLED; + break; + } + } + } + return config; + } +}; +TEST_F(MultiNodeLacpMinLinkTest, Bringup) { + auto verify = [=, this]() { + auto period = PeriodicTransmissionMachine::LONG_PERIOD * 3; + // ensure that lacp session can stay up post timeout + XLOG(DBG2) << "Waiting for LACP timeout period"; + std::this_thread::sleep_for(period); + for (const auto& aggId : getAggPorts()) { + verifyLacpState(aggId, getSubPorts(aggId).size()); + } + }; + + verifyAcrossWarmBoots(verify); +} diff --git a/fboss/agent/test/NDPTest.cpp b/fboss/agent/test/NDPTest.cpp index acb3880ab411e..721b32d22a223 100644 --- a/fboss/agent/test/NDPTest.cpp +++ b/fboss/agent/test/NDPTest.cpp @@ -1819,7 +1819,7 @@ TYPED_TEST(NdpTest, FlushEntryWithConcurrentUpdate) { PortID portID(1); // ensure port is up - sw->linkStateChanged(portID, true); + sw->linkStateChanged(portID, true, cfg::PortType::INTERFACE_PORT); VlanID vlanID(5); std::vector targetIPs; @@ -1926,7 +1926,7 @@ TYPED_TEST(NdpTest, PortFlapRecover) { this->addRoutes(); // ensure port is up - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); auto vlanID = VlanID(5); @@ -2110,7 +2110,7 @@ TYPED_TEST(NdpTest, PortFlapRecover) { WaitForNdpEntryPending neigbor0Pending(sw, targetIP, vlanID); WaitForNdpEntryPending neigbor1Pending(sw, targetIP2, vlanID); - sw->linkStateChanged(PortID(1), false); + sw->linkStateChanged(PortID(1), false, cfg::PortType::INTERFACE_PORT); // purging neighbor entries occurs on the background EVB via NeighorUpdater as // a StateObserver. @@ -2135,7 +2135,7 @@ TYPED_TEST(NdpTest, PortFlapRecover) { // send a port up event to the switch for port 1 EXPECT_STATE_UPDATE_TIMES_ATLEAST(sw, 1); - sw->linkStateChanged(PortID(1), true); + sw->linkStateChanged(PortID(1), true, cfg::PortType::INTERFACE_PORT); sendNeighborAdvertisement( handle.get(), diff --git a/fboss/agent/test/ReachabilityGroupTests.cpp b/fboss/agent/test/ReachabilityGroupTests.cpp index 27c7e7b6b3782..14813a551a960 100644 --- a/fboss/agent/test/ReachabilityGroupTests.cpp +++ b/fboss/agent/test/ReachabilityGroupTests.cpp @@ -16,6 +16,7 @@ class ReachabilityGroupTest : public ::testing::Test { public: void SetUp() override { FLAGS_multi_switch = true; + fLB::FLAGS_enable_balanced_input_mode = true; auto config = initialConfig(); handle_ = createTestHandle(&config); sw_ = handle_->getSw(); diff --git a/fboss/agent/test/RemoteSystemInterfaceTests.cpp b/fboss/agent/test/RemoteSystemInterfaceTests.cpp new file mode 100644 index 0000000000000..717dfce329d92 --- /dev/null +++ b/fboss/agent/test/RemoteSystemInterfaceTests.cpp @@ -0,0 +1,169 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/test/HwTestHandle.h" +#include "fboss/agent/test/TestUtils.h" + +#include +#include + +namespace { +const auto kInterfaceID = facebook::fboss::InterfaceID(101); +const auto kSystemPortID = facebook::fboss::SystemPortID(101); +const auto kIpV6Address = folly::IPAddressV6("201::10"); +const auto kIpV4Address = folly::IPAddressV4("200.0.0.10"); +} // namespace + +namespace facebook::fboss { + +class RemoteSystemInterfaceTest : public ::testing::Test { + public: + void SetUp() override { + FLAGS_multi_switch = true; + auto config = initialConfig(); + handle_ = createTestHandle(&config); + sw_ = handle_->getSw(); + waitForStateUpdates(sw_); + } + + cfg::SwitchConfig initialConfig() const { + return testConfigB(); + } + + void TearDown() override { + sw_->stop(false, false); + } + + void verify(int expectedSize = 2) { + auto state = sw_->getState(); + auto local = state->getInterfaces(); + auto remote = state->getRemoteInterfaces(); + + EXPECT_EQ(remote->size(), expectedSize); + + auto intfs1 = state->getInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(1)})); + auto intfs2 = state->getInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(2)})); + + auto remoteIntfs1 = state->getRemoteInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(1)})); + auto remoteIntfs2 = state->getRemoteInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(2)})); + + for (auto intf : std::as_const(*intfs1)) { + auto intfID = intf.second->getID(); + EXPECT_NE(remoteIntfs2->getNodeIf(intfID), nullptr); + } + for (auto intf : std::as_const(*intfs2)) { + auto intfID = intf.second->getID(); + EXPECT_NE(remoteIntfs1->getNodeIf(intfID), nullptr); + } + } + + protected: + SwSwitch* sw_; + std::unique_ptr handle_; +}; + +TEST_F(RemoteSystemInterfaceTest, ConfigureSystemPortInterfaces) { + verify(); +} + +TEST_F(RemoteSystemInterfaceTest, ReConfigureSystemPortInterfaces) { + auto matchAll = sw_->getScopeResolver()->scope(cfg::SwitchType::VOQ); + ; + sw_->updateStateBlocking( + "Add System Interface", [=](const std::shared_ptr& state) { + auto newState = state->clone(); + auto remoteSysIntfs = state->getRemoteInterfaces()->modify(&newState); + remoteSysIntfs->addNode( + std::make_shared( + InterfaceID(512), + RouterID(0), + std::optional(std::nullopt), + folly::StringPiece("512"), + folly::MacAddress("00:02:00:00:00:01"), + 9000, + true, + true, + cfg::InterfaceType::SYSTEM_PORT), + matchAll); + remoteSysIntfs->addNode( + std::make_shared( + InterfaceID(513), + RouterID(0), + std::optional(std::nullopt), + folly::StringPiece("513"), + folly::MacAddress("00:02:00:00:00:02"), + 9000, + true, + true, + cfg::InterfaceType::SYSTEM_PORT), + matchAll); + return newState; + }); + + verify(3); + auto allRemoteSysIntfs0 = + sw_->getState()->getRemoteInterfaces()->getMapNodeIf(matchAll); + EXPECT_NE(nullptr, allRemoteSysIntfs0); + EXPECT_NE(0, allRemoteSysIntfs0->size()); + auto newCfg = initialConfig(); + for (auto port : *newCfg.ports()) { + port.minFrameSize() = 1024; + } + sw_->applyConfig("Reconfigure", newCfg); + verify(3); + auto allRemoteSysIntfs1 = + sw_->getState()->getRemoteInterfaces()->getMapNodeIf(matchAll); + EXPECT_NE(nullptr, allRemoteSysIntfs1); + EXPECT_EQ(allRemoteSysIntfs0, allRemoteSysIntfs1); + auto config = initialConfig(); + config.interfaces()->resize(0); + sw_->applyConfig("Remove System Interface", config); + waitForStateUpdates(sw_); + auto newRemoteSystemIntfs = sw_->getState()->getRemoteInterfaces(); + EXPECT_EQ(newRemoteSystemIntfs->getNodeIf(InterfaceID(101)), nullptr); +} + +TEST_F(RemoteSystemInterfaceTest, verifyNeighborEntries) { + sw_->updateStateBlocking( + "Add Ndp Entry", [=](const std::shared_ptr& state) { + auto newState = state->clone(); + auto interfaces = newState->getInterfaces()->modify(&newState); + auto intf = interfaces->getNodeIf(kInterfaceID); + auto ndpTable = intf->getNdpTable()->modify(kInterfaceID, &newState); + ndpTable->addEntry( + kIpV6Address, + MacAddress("00:02:00:00:00:01"), + PortDescriptor(kSystemPortID), + kInterfaceID); + return newState; + }); + sw_->updateStateBlocking( + "Add Arp Entry", [=](const std::shared_ptr& state) { + auto newState = state->clone(); + auto interfaces = newState->getInterfaces()->modify(&newState); + auto intf = interfaces->getNodeIf(kInterfaceID); + auto arpTable = intf->getArpTable()->modify(kInterfaceID, &newState); + arpTable->addEntry( + kIpV4Address, + MacAddress("00:02:00:00:00:01"), + PortDescriptor(kSystemPortID), + kInterfaceID); + return newState; + }); + waitForStateUpdates(sw_); + waitForStateUpdates(sw_); + auto remoteIntfs = sw_->getState()->getRemoteInterfaces()->getMapNodeIf( + HwSwitchMatcher(std::unordered_set{SwitchID(2)})); + auto remoteIntf = remoteIntfs->getNodeIf(kInterfaceID); + EXPECT_NE(remoteIntf, nullptr); + auto ndpEntry = remoteIntf->getNdpTable()->getEntry(kIpV6Address); + EXPECT_NE(ndpEntry, nullptr); + EXPECT_FALSE(ndpEntry->getIsLocal()); + auto arpEntry = remoteIntf->getArpTable()->getEntry(kIpV4Address); + EXPECT_NE(arpEntry, nullptr); + EXPECT_FALSE(arpEntry->getIsLocal()); +} +} // namespace facebook::fboss diff --git a/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp b/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp index a557934a31528..c3f8e1aa676ef 100644 --- a/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp +++ b/fboss/agent/test/StaticL2ForNeighborObserverTests.cpp @@ -231,7 +231,7 @@ class StaticL2ForNeighorObserverTest : public ::testing::Test { } void bringPortDown(PortID portID) { - this->sw_->linkStateChanged(portID, false); + this->sw_->linkStateChanged(portID, false, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(this->sw_); this->sw_->getNeighborUpdater()->waitForPendingUpdates(); diff --git a/fboss/agent/test/SwSwitchTest.cpp b/fboss/agent/test/SwSwitchTest.cpp index 1c9807daf6b09..3291b92a0a010 100644 --- a/fboss/agent/test/SwSwitchTest.cpp +++ b/fboss/agent/test/SwSwitchTest.cpp @@ -189,8 +189,8 @@ TEST_F(SwSwitchTest, overlappingUpdatesWithExit) { const PortID kPort1{1}; while (!done) { // Now flap the port. This should schedule non coalescing updates. - sw->linkStateChanged(kPort1, false); - sw->linkStateChanged(kPort1, true); + sw->linkStateChanged(kPort1, false, cfg::PortType::INTERFACE_PORT); + sw->linkStateChanged(kPort1, true, cfg::PortType::INTERFACE_PORT); } }); std::thread blockingUpdates([this, &done] { @@ -406,8 +406,8 @@ TYPED_TEST(SwSwitchTestNbrs, TestStateNonCoalescing) { // 2 neighbor entries expected verifyReachableCnt(2); // Now flap the port. This should schedule non coalescing updates. - sw->linkStateChanged(kPort1, false); - sw->linkStateChanged(kPort1, true); + sw->linkStateChanged(kPort1, false, cfg::PortType::INTERFACE_PORT); + sw->linkStateChanged(kPort1, true, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(sw); // Neighbor purge is scheduled on BG thread. Wait for it to be scheduled. waitForBackgroundThread(sw); diff --git a/fboss/agent/test/TestEnsembleIf.cpp b/fboss/agent/test/TestEnsembleIf.cpp index e4c2971f3cfa9..f6becffb6f89d 100644 --- a/fboss/agent/test/TestEnsembleIf.cpp +++ b/fboss/agent/test/TestEnsembleIf.cpp @@ -3,6 +3,7 @@ #include "fboss/agent/test/TestEnsembleIf.h" #include "fboss/agent/Platform.h" +#include "fboss/agent/Utils.h" #include "fboss/agent/state/Port.h" #include "fboss/agent/state/SwitchState.h" @@ -67,15 +68,10 @@ std::vector TestEnsembleIf::masterLogicalSysPortIds() const { } auto switchId = asic->getSwitchId(); CHECK(switchId.has_value()); - auto sysPortRange = getProgrammedState() - ->getDsfNodes() - ->getNodeIf(SwitchID(*switchId)) - ->getSystemPortRange(); - CHECK(sysPortRange.has_value()); for (auto port : masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})) { if (scopeResolver().scope(port).switchId() == SwitchID(*switchId)) { - sysPorts.push_back( - SystemPortID(*sysPortRange->minimum() + static_cast(port))); + sysPorts.push_back(getSystemPortID( + PortID(port), getProgrammedState(), SwitchID(*switchId))); } } } diff --git a/fboss/agent/test/TestUtils.cpp b/fboss/agent/test/TestUtils.cpp index c0afd17b7991d..c65d6a1e6516f 100644 --- a/fboss/agent/test/TestUtils.cpp +++ b/fboss/agent/test/TestUtils.cpp @@ -32,6 +32,7 @@ #include "fboss/agent/test/HwTestHandle.h" #include "fboss/agent/test/MockTunManager.h" +#include "fboss/agent/Constants.h" #include "fboss/agent/SwSwitchRouteUpdateWrapper.h" #include "fboss/agent/gen-cpp2/switch_config_constants.h" #include "fboss/agent/rib/RoutingInformationBase.h" @@ -164,13 +165,13 @@ std::vector getLoopbackIps(int64_t switchIdVal) { return {v6, v4}; } -uint16_t recycleSysPortId(const cfg::DsfNode& node) { - return *node.systemPortRange()->minimum() + 1; -} - -cfg::Interface getRecyclePortRif(const cfg::DsfNode& myNode) { +cfg::Interface getRecyclePortRif( + const cfg::DsfNode& myNode, + const cfg::SwitchConfig& cfg) { cfg::Interface recyclePortRif; - recyclePortRif.intfID() = recycleSysPortId(myNode); + recyclePortRif.intfID() = static_cast(getInbandSystemPortID( + *cfg.switchSettings()->switchIdToSwitchInfo(), + SwitchID(*myNode.switchId()))); recyclePortRif.type() = cfg::InterfaceType::SYSTEM_PORT; for (const auto& address : getLoopbackIps(*myNode.switchId())) { recyclePortRif.ipAddresses()->push_back(address); @@ -179,7 +180,7 @@ cfg::Interface getRecyclePortRif(const cfg::DsfNode& myNode) { } void addRecyclePortRif(const cfg::DsfNode& myNode, cfg::SwitchConfig& cfg) { - cfg::Interface recyclePortRif = getRecyclePortRif(myNode); + cfg::Interface recyclePortRif = getRecyclePortRif(myNode, cfg); cfg.interfaces()->push_back(recyclePortRif); } @@ -386,7 +387,10 @@ cfg::SwitchConfig testConfigBImpl() { const auto& port = cfg.ports()->at(index); cfg::Interface intf; auto intfId = getSystemPortID( - PortID(*port.logicalID()), switchId2SwitchInfo, switchIndex + 1); + PortID(*port.logicalID()), + *port.scope(), + switchId2SwitchInfo, + SwitchID(switchIndex + 1)); XLOG(INFO) << "Port id : " << *port.logicalID() << ", intf id : " << intfId; intf.intfID() = static_cast(intfId); @@ -411,7 +415,7 @@ cfg::SwitchConfig testConfigBImpl() { recyclePort.portType() = cfg::PortType::RECYCLE_PORT; recyclePorts.push_back(recyclePort); - auto recycleRif = getRecyclePortRif(myNode); + auto recycleRif = getRecyclePortRif(myNode, cfg); recycleIntfs.push_back(recycleRif); } for (auto recyclePort : recyclePorts) { @@ -495,6 +499,10 @@ cfg::DsfNode makeDsfNodeCfg( dsfNodeCfg.systemPortRange() = sysPortRange; dsfNodeCfg.loopbackIps() = getLoopbackIps(switchId); dsfNodeCfg.nodeMac() = "02:00:00:00:0F:0B"; + dsfNodeCfg.localSystemPortOffset() = *sysPortRange.minimum(); + dsfNodeCfg.globalSystemPortOffset() = *sysPortRange.minimum(); + dsfNodeCfg.systemPortRanges()->systemPortRanges()->push_back(sysPortRange); + dsfNodeCfg.inbandPortId() = kSingleStageInbandPortId; } dsfNodeCfg.asicType() = asicType; dsfNodeCfg.platformType() = type == cfg::DsfNodeType::INTERFACE_NODE @@ -553,7 +561,7 @@ cfg::SwitchConfig testConfigFabricSwitch( for (int p = 0; p < kPortCount; ++p) { cfg.ports()[p].logicalID() = p + 1; - cfg.ports()[p].name() = folly::to("port", p + 1); + cfg.ports()[p].name() = folly::to("eth1/", p + 1, "/1"); cfg.ports()[p].state() = cfg::PortState::ENABLED; cfg.ports()[p].speed() = cfg::PortSpeed::TWENTYFIVEG; cfg.ports()[p].profileID() = @@ -1468,6 +1476,13 @@ cfg::SwitchInfo createSwitchInfo( systemPortRange.minimum() = *sysPortMin; systemPortRange.maximum() = *sysPortMax; switchInfo.systemPortRange() = systemPortRange; + switchInfo.systemPortRanges()->systemPortRanges()->push_back( + systemPortRange); + switchInfo.localSystemPortOffset() = *sysPortMin; + switchInfo.globalSystemPortOffset() = *sysPortMin; + } + if (switchType == cfg::SwitchType::VOQ) { + switchInfo.inbandPortId() = kSingleStageInbandPortId; } if (mac) { switchInfo.switchMac() = *mac; diff --git a/fboss/agent/test/ThriftServerTest.cpp b/fboss/agent/test/ThriftServerTest.cpp index ed7cdd9c2878f..7a952bd29c094 100644 --- a/fboss/agent/test/ThriftServerTest.cpp +++ b/fboss/agent/test/ThriftServerTest.cpp @@ -203,7 +203,7 @@ TEST_F(ThriftServerTest, setPortDownOnSwitchExit) { folly::coro::blockingWait(fbossCtlClient_->co_setPortState(port5, true)); // Bring the port up - sw_->linkStateChanged(port5, true); + sw_->linkStateChanged(port5, true, cfg::PortType::INTERFACE_PORT); WITH_RETRIES({ auto port = sw_->getState()->getPorts()->getNodeIf(port5); EXPECT_EVENTUALLY_TRUE(port->isUp()); diff --git a/fboss/agent/test/ThriftTest.cpp b/fboss/agent/test/ThriftTest.cpp index 2e78b4ab6ad40..f3a642270593b 100644 --- a/fboss/agent/test/ThriftTest.cpp +++ b/fboss/agent/test/ThriftTest.cpp @@ -173,13 +173,12 @@ class ThriftTestAllSwitchTypes : public ::testing::Test { } int interfaceIdBegin() const { auto switchId = getSwitchIdAndType().first; - return isVoq() ? *sw_->getState() - ->getDsfNodes() - ->getNodeIf(switchId) - ->getSystemPortRange() - ->minimum() + - 5 - : 1; + if (isVoq()) { + auto dsfNode = sw_->getState()->getDsfNodes()->getNodeIf(switchId); + CHECK(dsfNode->getGlobalSystemPortOffset().has_value()); + return *dsfNode->getGlobalSystemPortOffset() + 5; + } + return 1; } std::pair getSwitchIdAndType() const { @@ -353,14 +352,14 @@ TYPED_TEST(ThriftTestAllSwitchTypes, setPortState) { const PortID port5{5}; ThriftHandler handler(this->sw_); handler.setPortState(port5, true); - this->sw_->linkStateChanged(port5, true); + this->sw_->linkStateChanged(port5, true, cfg::PortType::INTERFACE_PORT); waitForStateUpdates(this->sw_); auto port = this->sw_->getState()->getPorts()->getNodeIf(port5); EXPECT_TRUE(port->isUp()); EXPECT_TRUE(port->isEnabled()); - this->sw_->linkStateChanged(port5, false); + this->sw_->linkStateChanged(port5, false, cfg::PortType::INTERFACE_PORT); handler.setPortState(port5, false); waitForStateUpdates(this->sw_); diff --git a/fboss/agent/test/TrunkUtils.cpp b/fboss/agent/test/TrunkUtils.cpp index 519468b6ce041..eaeb6f49c4be1 100644 --- a/fboss/agent/test/TrunkUtils.cpp +++ b/fboss/agent/test/TrunkUtils.cpp @@ -29,13 +29,15 @@ void addAggPort( int key, const std::vector& ports, cfg::SwitchConfig* config, - cfg::LacpPortRate rate) { + cfg::LacpPortRate rate, + double minLinkPercentage) { // Create agg port with requisite members static constexpr auto kAggPortName = "AGG"; cfg::AggregatePort aggPort; - *aggPort.key() = key; + aggPort.key() = key; aggPort.name() = folly::to(kAggPortName, "-", key); - *aggPort.description() = kAggPortName; + aggPort.description() = kAggPortName; + aggPort.minimumCapacity()->set_linkPercentage(minLinkPercentage); for (auto port : ports) { aggPort.memberPorts()->push_back(makePortMember(port, rate)); } diff --git a/fboss/agent/test/TrunkUtils.h b/fboss/agent/test/TrunkUtils.h index 1313719a22ab9..a868c597eac03 100644 --- a/fboss/agent/test/TrunkUtils.h +++ b/fboss/agent/test/TrunkUtils.h @@ -28,7 +28,8 @@ void addAggPort( int key, const std::vector& ports, cfg::SwitchConfig* config, - cfg::LacpPortRate rate = cfg::LacpPortRate::FAST); + cfg::LacpPortRate rate = cfg::LacpPortRate::FAST, + double minLinkPercentage = 1.0); std::shared_ptr enableTrunkPorts( std::shared_ptr curState); std::shared_ptr setTrunkMinLinkCount( diff --git a/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp b/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp index c3b8e81ab54d6..f33700ab1af85 100644 --- a/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentAqmTests.cpp @@ -237,8 +237,7 @@ class AgentAqmTest : public AgentHwTest { // watermarks for ECN traffic for VoQ switches. auto sysPortId = getSystemPortID( portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), + getProgrammedState(), scopeResolver().scope(portId).switchId()); auto sysPortStats = getLatestSysPortStats(sysPortId); extractAqmTestStats(sysPortStats, portStats, queueId, stats); diff --git a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp index 3694e90b265b3..14ab506784427 100644 --- a/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentCoppTests.cpp @@ -205,7 +205,7 @@ class AgentCoppTest : public AgentHwTest { void sendPkt( std::unique_ptr pkt, bool outOfPort, - bool snoopAndVerify = false, + bool expectRxPacket = false, bool skipTtlDecrement = true) { XLOG(DBG2) << "Packet Dump::" << folly::hexDump(pkt->buf()->data(), pkt->buf()->length()); @@ -220,11 +220,14 @@ class AgentCoppTest : public AgentHwTest { } else { getSw()->sendPacketSwitchedAsync(std::move(pkt)); } - if (snoopAndVerify) { + if (expectRxPacket) { WITH_RETRIES({ auto frameRx = snooper.waitForPacket(1); EXPECT_EVENTUALLY_TRUE(frameRx.has_value()); }); + } else { + auto frameRx = snooper.waitForPacket(10); + EXPECT_FALSE(frameRx.has_value()); } } @@ -256,7 +259,7 @@ class AgentCoppTest : public AgentHwTest { sendPkt( std::move(pkt), outOfPort, - expectQueueHit /*snoopAndVerify*/, + expectQueueHit /*expectRxPacket*/, skipTtlDecrement); }; utility::sendPktAndVerifyCpuQueue( @@ -296,7 +299,7 @@ class AgentCoppTest : public AgentHwTest { XLOG(DBG2) << "UDP packet Dump::" << folly::hexDump( txPacket->buf()->data(), txPacket->buf()->length()); - sendPkt(std::move(txPacket), outOfPort, expectPktTrap /*snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, expectPktTrap /*expectRxPacket*/); } void sendUdpPktAndVerify( @@ -349,7 +352,7 @@ class AgentCoppTest : public AgentHwTest { dstMac ? *dstMac : intfMac, etherType, payload); - sendPkt(std::move(txPacket), true /*outOfPort*/, true /*snoopAndVerify*/); + sendPkt(std::move(txPacket), true /*outOfPort*/, true /*expectRxPacket*/); } } @@ -429,7 +432,7 @@ class AgentCoppTest : public AgentHwTest { folly::IPAddress("1.1.1.2"), dstIpAddress, arpType); - sendPkt(std::move(txPacket), outOfPort); + sendPkt(std::move(txPacket), outOfPort, true /*expectRxPacket*/); } } @@ -467,7 +470,8 @@ class AgentCoppTest : public AgentHwTest { const folly::IPAddressV6& neighborIp, ICMPv6Type type, bool outOfPort, - bool selfSolicit) { + bool selfSolicit, + bool expectRxPacket = true) { auto vlanId = utility::firstVlanID(getProgrammedState()); auto intfMac = utility::getFirstInterfaceMac(getProgrammedState()); auto neighborMac = utility::MacAddressGenerator().get(intfMac.u64NBO() + 1); @@ -489,7 +493,7 @@ class AgentCoppTest : public AgentHwTest { intfMac, // my mac neighborIp, // sender ip folly::IPAddressV6("1::")); // sent to me - sendPkt(std::move(txPacket), outOfPort, true /*snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, expectRxPacket); } } @@ -500,7 +504,8 @@ class AgentCoppTest : public AgentHwTest { bool selfSolicit = true, bool outOfPort = true, const int numPktsToSend = 1, - const int expectedPktDelta = 1) { + const int expectedPktDelta = 1, + bool expectRxPacket = true) { auto beforeOutPkts = utility::getQueueOutPacketsWithRetry( getSw(), @@ -510,7 +515,13 @@ class AgentCoppTest : public AgentHwTest { queueId, 0 /* retryTimes */, 0 /* expectedNumPkts */); - sendNdpPkts(numPktsToSend, neighborIp, ndpType, outOfPort, selfSolicit); + sendNdpPkts( + numPktsToSend, + neighborIp, + ndpType, + outOfPort, + selfSolicit, + expectRxPacket); auto afterOutPkts = utility::getQueueOutPacketsWithRetry( getSw(), @@ -602,7 +613,7 @@ class AgentCoppTest : public AgentHwTest { DHCPv6Packet::DHCP6_SERVERAGENT_UDPPORT, // DstPort: 547 0 /* dscp */, ttl); // sent to me - sendPkt(std::move(txPacket), outOfPort, true /* snoopAndVerify*/); + sendPkt(std::move(txPacket), outOfPort, true /* expectRxPacket*/); } } @@ -1050,6 +1061,62 @@ TYPED_TEST(AgentCoppTest, L3MTUErrorToLowPriQ) { this->verifyAcrossWarmBoots(setup, verify); } +template +class AgentCoppPortMtuTest : public AgentCoppTest { + public: + std::vector + getProductionFeaturesVerified() const override { + if constexpr (std::is_same_v) { + return { + production_features::ProductionFeature::COPP, + production_features::ProductionFeature::PORT_MTU_ERROR_TRAP}; + } else { + return { + production_features::ProductionFeature::COPP, + production_features::ProductionFeature::LAG, + production_features::ProductionFeature::PORT_MTU_ERROR_TRAP}; + } + } +}; + +TYPED_TEST_SUITE(AgentCoppPortMtuTest, TestTypes); +TYPED_TEST(AgentCoppPortMtuTest, PortMTUErrorToLowPriQ) { + auto setup = [=, this]() { + this->setup(); + this->setupEcmp(); + }; + auto verify = [=, this]() { + // Make sure all packets packet with large payload (> MTU) + // are sent to cpu low priority queue. + // Port Max Frame size is set to 9412 + // Ethernet header size is 14 bytes Ipv6 header size is 40, TCP header size + // is 20. Thus paload 9412 - 20 - 40 - 14 = 9338 + + // send packet with payload 9338, should not be trapped + this->sendTcpPktAndVerifyCpuQueue( + utility::kCoppLowPriQueueId, + kRandomIP, + utility::kNonSpecialPort1, + utility::kNonSpecialPort2, + std::nullopt, + 0, /* traffic class*/ + std::vector(9338, 0xff), + false /* expectQueueHit */); + + // send packet with payload 9339, should be trapped + this->sendTcpPktAndVerifyCpuQueue( + utility::kCoppLowPriQueueId, + kRandomIP, + utility::kNonSpecialPort1, + utility::kNonSpecialPort2, + std::nullopt, + 0, /* traffic class*/ + std::vector(9339, 0xff), + true /* expectQueueHit */); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + TYPED_TEST(AgentCoppTest, ArpRequestAndReplyToHighPriQ) { auto setup = [=, this]() { this->setup(); }; auto verify = [=, this]() { @@ -1102,9 +1169,18 @@ TYPED_TEST(AgentCoppTest, NdpSolicitNeighbor) { // again. // More explanation in the test plan section of - D34782575 - auto setup = [=, this]() { this->setup(); }; + auto setup = [=, this]() { + this->setup(); + if (!this->isSupportedOnAllAsics(HwAsic::Feature::BRIDGE_PORT_8021Q)) { + this->setupEcmp(true); + } + }; auto verify = [=, this]() { XLOG(DBG2) << "verifying solicitation"; + // do not snoop when L2 is not supported, e.g. J3, where NDP packets goes + // through L3 pipeline and might change ttl and dst mac + bool expectRxPacket = + this->isSupportedOnAllAsics(HwAsic::Feature::BRIDGE_PORT_8021Q); this->sendPktAndVerifyNdpPacketsCpuQueue( utility::getCoppHighPriQueueId(utility::checkSameAndGetAsic( this->getAgentEnsemble()->getL3Asics())), @@ -1113,7 +1189,8 @@ TYPED_TEST(AgentCoppTest, NdpSolicitNeighbor) { false, false, 1, - 1); + 1, + expectRxPacket); }; this->verifyAcrossWarmBoots(setup, verify); } @@ -1660,7 +1737,7 @@ TEST_F(AgentCoppQueueStuckTest, CpuQueueHighRateTraffic) { TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { constexpr int kReceiveRetries = 2; - constexpr int kHighPriorityPacketCount = 30000; + constexpr int kHigherPriorityPacketCount = 30000; constexpr int packetsPerBurst = 1000; auto setup = [=, this]() { setupEcmpDataplaneLoop(); }; @@ -1668,7 +1745,7 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { auto verify = [&]() { auto configIntf = folly::copy( *(this->initialConfig(*getAgentEnsemble())).interfaces())[1]; - const auto ipForHighPriorityQueue = + const auto ipForHigherPriorityQueue = folly::IPAddress::createNetwork(configIntf.ipAddresses()[1], -1, false) .first; auto baseVlan = utility::firstVlanID(getProgrammedState()); @@ -1685,6 +1762,7 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { auto switchId = getSw()->getScopeResolver()->scope(portId).switchId(); auto asic = getSw()->getHwAsicTable()->getHwAsic(switchId); + // first verify high priority traffic vs low priority traffic auto highPriorityCoppQueueStatsBefore = utility::getQueueOutPacketsWithRetry( getSw(), @@ -1698,9 +1776,9 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { sendPacketBursts( portId, nextVlan, - kHighPriorityPacketCount, + kHigherPriorityPacketCount, packetsPerBurst, - ipForHighPriorityQueue, + ipForHigherPriorityQueue, utility::kNonSpecialPort1, utility::kBgpPort); @@ -1711,12 +1789,44 @@ TEST_F(AgentCoppQosTest, HighVsLowerPriorityCpuQueueTrafficPrioritization) { this->masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})[0]), utility::getCoppHighPriQueueId(asic), kReceiveRetries, - highPriorityCoppQueueStatsBefore + kHighPriorityPacketCount); + highPriorityCoppQueueStatsBefore + kHigherPriorityPacketCount); EXPECT_EQ( - kHighPriorityPacketCount, + kHigherPriorityPacketCount, highPriorityCoppQueueStatsAfter - highPriorityCoppQueueStatsBefore); + // then verify mid priority traffic vs low priority traffic + auto midPriorityCoppQueueStatsBefore = utility::getQueueOutPacketsWithRetry( + getSw(), + this->switchIdForPort( + this->masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})[0]), + utility::getCoppMidPriQueueId(this->getAgentEnsemble()->getL3Asics()), + kReceiveRetries, + 0); + + // Send a fixed number of mid priority packets on port1 + sendPacketBursts( + portId, + nextVlan, + kHigherPriorityPacketCount, + packetsPerBurst, + ipForHigherPriorityQueue, + utility::kNonSpecialPort1, + utility::kNonSpecialPort2); + + // Check mid priority queue stats to see if all packets are received + auto midPriorityCoppQueueStatsAfter = utility::getQueueOutPacketsWithRetry( + getSw(), + this->switchIdForPort( + this->masterLogicalPortIds({cfg::PortType::INTERFACE_PORT})[0]), + utility::getCoppMidPriQueueId(this->getAgentEnsemble()->getL3Asics()), + kReceiveRetries, + highPriorityCoppQueueStatsBefore + kHigherPriorityPacketCount); + + EXPECT_EQ( + kHigherPriorityPacketCount, + midPriorityCoppQueueStatsAfter - midPriorityCoppQueueStatsBefore); + if (asic->isSupported(HwAsic::Feature::CPU_VOQ_BUFFER_PROFILE)) { // check watermark of low priority voq should reach max shared buffer size const double kVariance = 0.01; diff --git a/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp b/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp index 9f428255614cf..3e97d4afefc24 100644 --- a/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentDiagShellStressTests.cpp @@ -27,6 +27,7 @@ class AgentDiagShellStressTest : public AgentHwTest { case cfg::AsicType::ASIC_TYPE_JERICHO3: case cfg::AsicType::ASIC_TYPE_RAMON: case cfg::AsicType::ASIC_TYPE_RAMON3: + case cfg::AsicType::ASIC_TYPE_CHENAB: // No diag shell to test for these ASICs break; case cfg::AsicType::ASIC_TYPE_EBRO: diff --git a/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp b/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp index f7e2e2acb043f..1eb29278e4b72 100644 --- a/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentEgressForwardingDiscardCounterTests.cpp @@ -18,16 +18,9 @@ class AgentEgressForwardingDiscardsCounterTest : public AgentHwTest { const AgentEnsemble& ensemble) const override { auto cfg = AgentHwTest::initialConfig(ensemble); auto firstPortId = ensemble.masterLogicalInterfacePortIds()[0]; - auto firstPortSwitchId = - ensemble.scopeResolver().scope(firstPortId).switchId(); - auto sysPortRange = - cfg.dsfNodes()->find(firstPortSwitchId)->second.systemPortRange(); - CHECK(sysPortRange.has_value()); - auto firstPortRifId = - *sysPortRange->minimum() + static_cast(firstPortId); - for (auto& intf : *cfg.interfaces()) { - if (intf.intfID() == firstPortRifId) { - intf.mtu() = 1500; + for (auto& port : *cfg.ports()) { + if (PortID(*port.logicalID()) == firstPortId) { + port.maxFrameSize() = 1500; } } return cfg; diff --git a/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp index 4df932be54c91..97098ae5c2e20 100644 --- a/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentFabricSwitchTests.cpp @@ -138,7 +138,12 @@ TEST_F(AgentFabricSwitchTest, collectStats) { port->getName() + ".load_bearing_link_state.flap.sum.60"); EXPECT_EVENTUALLY_TRUE(loadBearingInErrors.has_value()); EXPECT_EVENTUALLY_TRUE(loadBearingFecErrors.has_value()); - EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + if (getAgentEnsemble()->getBootType() == BootType::COLD_BOOT) { + EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + } else { + // No port flaps after wb, hence no port flap stats being recorded + EXPECT_FALSE(loadBearingFlaps.has_value()); + } } } }); diff --git a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp index eaeec4f65d88e..b441f91345edc 100644 --- a/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentMacLearningTests.cpp @@ -8,7 +8,10 @@ * */ +#include "fboss/agent/FbossHwUpdateError.h" +#include "fboss/agent/MacTableManager.h" #include "fboss/agent/MacTableUtils.h" +#include "fboss/agent/ResourceAccountant.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" @@ -39,7 +42,24 @@ using folly::IPAddress; using folly::IPAddressV4; using folly::IPAddressV6; +// mac l2 entry limit is used to bypass resourceAccountant check +DECLARE_int32(max_l2_entries); + namespace { +// this is for mac overflow test for TH3/TH4 +// setting max L2 entries to 8194 for TH3/TH4 +// Maximum theortical MAC/L2 scale is 8k for TH3/TH4. +// MAC overflow test case is not supported in TH and Cisco gibralta, +// as Cisco gibraltar(300K) and TH supports higher scale and exhausting +// them will lead to large test time +constexpr auto kL2MaxMacCount = 8194; +// update switchState mac table with 7800 static entry, this should +// return success. here sdk should be able to program 7800 MACs +// without getting TABLE FULL error +constexpr auto kBulkProgrammedMacCount = 7800; +class L2Entry; +class MacTableManager; + // Even when running the same test repeatedly could result in different // learning counts based on hash insertion order. // Maximum theortical is 8k for TH ..but practically we hit numbers below it @@ -67,6 +87,7 @@ getMacsForPort(facebook::fboss::SwSwitch* sw, int port, bool isTrunk) { namespace facebook::fboss { +using std::string; using utility::addAggPort; using utility::enableTrunkPorts; @@ -1060,7 +1081,7 @@ class AgentMacLearningBatchEntriesTest : public AgentMacLearningTest { kAsicToMacChunkSizeAndSleepUsecs = { {cfg::AsicType::ASIC_TYPE_TOMAHAWK3, {16, 500000}}, {cfg::AsicType::ASIC_TYPE_TOMAHAWK4, {32, 10000}}, - }; + {cfg::AsicType::ASIC_TYPE_TOMAHAWK, {16, 10000}}}; auto switchId = getSw() ->getScopeResolver() ->scope(masterLogicalPortIds()[0]) @@ -1181,6 +1202,118 @@ class AgentMacLearningBatchEntriesTest : public AgentMacLearningTest { } }; +class AgentMacOverFlowTest : public AgentMacLearningBatchEntriesTest { + public: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + auto cfg = AgentMacLearningTest::initialConfig(ensemble); + cfg.switchSettings()->l2LearningMode() = cfg::L2LearningMode::SOFTWARE; + + // set mac l2 entry limit to 10000 to bypass resourceAccountant check + FLAGS_max_l2_entries = 10000; + // to enable mac update protection + FLAGS_enable_mac_update_protection = true; + return cfg; + } + + // adds L2 entries to mac table + void addMacsBulk( + const std::vector& l2Entries, + L2EntryUpdateType l2EntryUpdateType) { + auto updateMacTableFn = [l2Entries, l2EntryUpdateType, this]( + const std::shared_ptr& state) { + return updateMacTableBulk(state, l2Entries, l2EntryUpdateType); + }; + getSw()->updateStateWithHwFailureProtection( + ("test MAC Programming : "), std::move(updateMacTableFn)); + } + + protected: + void VerifyMacOverFlow(const std::vector& l2Entries) { + WITH_RETRIES({ + const auto& learntMacs = + getMacsForPort(getSw(), masterLogicalPortIds()[0], false); + // check total macs programmed + EXPECT_EVENTUALLY_GE(learntMacs.size(), kBulkProgrammedMacCount); + EXPECT_EQ(getSw()->stats()->getMacTableUpdateFailure(), 0); + }); + + for (int i = kBulkProgrammedMacCount; i < l2Entries.size(); i++) { + XLOG(DBG2) << "Adding i " << i << "MAC " << l2Entries[i].str(); + getSw()->l2LearningUpdateReceived( + l2Entries[i], L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD); + // as soon as we get hw failure, terminate the test and verify + // rollback + if (getSw()->stats()->getMacTableUpdateFailure()) { + XLOG(DBG2) << "MacTableUpdateFailure = " + << getSw()->stats()->getMacTableUpdateFailure(); + break; + } + } + + const auto& learntMacs = + getMacsForPort(getSw(), masterLogicalPortIds()[0], false); + XLOG(DBG2) << "learntMacs.size() = " << learntMacs.size() + << ", macTableUpdateFailure = " + << getSw()->stats()->getMacTableUpdateFailure() + << ", l2Entries.size() = " << l2Entries.size(); + + EXPECT_GE(learntMacs.size(), kBulkProgrammedMacCount); + EXPECT_GT(getSw()->stats()->getMacTableUpdateFailure(), 0); + } + + // generate L2Entries with macs + std::vector generateL2Entries( + const std::vector& macs) { + std::vector l2Entries; + const auto portDescr = physPortDescr(); + VlanID vlanId = + (VlanID)*initialConfig(*getAgentEnsemble()).vlanPorts()[0].vlanID(); + + for (auto& mac : macs) { + l2Entries.push_back(L2Entry( + mac, + vlanId, + portDescr, + L2Entry::L2EntryType::L2_ENTRY_TYPE_VALIDATED)); + } + return l2Entries; + } + + // update mac table entries in switchState + std::shared_ptr updateMacTableBulk( + const std::shared_ptr& state, + const std::vector& l2Entries, + L2EntryUpdateType l2EntryUpdateType) { + std::shared_ptr newState{state}; + + for (int i = 0; i < kBulkProgrammedMacCount; i++) { + newState = MacTableUtils::updateMacTable( + newState, l2Entries[i], l2EntryUpdateType); + } + return newState; + } +}; + +TEST_F(AgentMacOverFlowTest, VerifyMacUpdateOverFlow) { + std::vector macs = generateMacs(kL2MaxMacCount); + auto portDescr = physPortDescr(); + auto l2Entries = generateL2Entries(macs); + VlanID vlanId = + (VlanID)*initialConfig(*getAgentEnsemble()).vlanPorts()[0].vlanID(); + auto setup = [this, portDescr, vlanId, &l2Entries]() { + setupHelper(cfg::L2LearningMode::SOFTWARE, portDescr); + // Disable aging, so entry stays in L2 table when we verify. + utility::setMacAgeTimerSeconds(getAgentEnsemble(), 0); + addMacsBulk(l2Entries, L2EntryUpdateType::L2_ENTRY_UPDATE_TYPE_ADD); + EXPECT_EQ(getSw()->stats()->getMacTableUpdateFailure(), 0); + }; + + auto verify = [this, &l2Entries]() { VerifyMacOverFlow(l2Entries); }; + // MACs learned should be preserved across warm boot + verifyAcrossWarmBoots(setup, verify); +} + // Intent of this test is to attempt to learn large number of macs // (L2_LEARN_MAX_MAC_COUNT) and ensure HW can learn them. TEST_F(AgentMacLearningBatchEntriesTest, VerifyMacLearningScale) { diff --git a/fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp b/fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp new file mode 100644 index 0000000000000..14b76dd592bb8 --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentMemoryUsageTests.cpp @@ -0,0 +1,84 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include +#include + +#include "fboss/agent/test/AgentHwTest.h" + +using namespace ::testing; + +DEFINE_int32( + memory_test_stats_iterations, + 1000, + "Number of iterations for the test"); + +namespace facebook::fboss { + +constexpr int kWarmupIterations = 60; +constexpr size_t kMemoryHeadroom = 10 << 20; // 10MB + +class AgentMemoryUsageTest : public AgentHwTest { + public: + std::vector + getProductionFeaturesVerified() const override { + return {}; + } + + protected: + void setCmdLineFlagOverrides() const override { + AgentHwTest::setCmdLineFlagOverrides(); + // Disable stats update to improve performance + FLAGS_enable_stats_update_thread = false; + } + + void setupJeMalloc() { + // Disable caching to make stats more accurate. + folly::mallctlWrite("thread.tcache.enabled", false); + folly::mallctlWrite("arenas.dirty_decay_ms", 100); // milliseconds + } + + size_t getMemoryUsage() { + // Update the statistics cached by mallctl. + uint64_t epoch = 1; + folly::mallctlWrite("epoch", epoch); + + size_t usage = 0; + folly::mallctlRead("stats.allocated", &usage); + return usage; + } +}; + +TEST_F(AgentMemoryUsageTest, MeasureStatsCollection) { + if (!folly::usingJEMalloc()) { +#ifdef GTEST_SKIP + GTEST_SKIP() << "This test only works with jemalloc"; +#endif + return; + } + + size_t baseline = 0; + + // The first ~60 updateStats() calls perform some allocation, so measure the + // baseline memory usage after that. + for (int i = 0; i < kWarmupIterations; ++i) { + getAgentEnsemble()->updateStats(); + + size_t current = getMemoryUsage(); + if (current > baseline) { + baseline = current; + } + XLOG(DBG2) << "baseline stats.allocated[" << i << "] = " << baseline; + } + + // Make sure stats collection don't grow memory. We still allow for some + // headroom due to memory usage from other threads, vector resizing, etc. + for (int i = 0; i < FLAGS_memory_test_stats_iterations; i++) { + getAgentEnsemble()->updateStats(); + + size_t current = getMemoryUsage(); + XLOG(DBG2) << "stats.allocated[" << i << "] = " << current; + EXPECT_LE(current, baseline + kMemoryHeadroom); + } +} + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp index 8fd03f4ffc12b..f9cda569121a2 100644 --- a/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentNeighborTests.cpp @@ -117,6 +117,8 @@ class AgentNeighborTest : public AgentHwTest { if (isIntfNbrTable) { features.push_back( production_features::ProductionFeature::INTERFACE_NEIGHBOR_TABLE); + } else { + features.push_back(production_features::ProductionFeature::VLAN); } if (programToTrunk) { features.push_back(production_features::ProductionFeature::LAG); @@ -257,7 +259,6 @@ class AgentNeighborTest : public AgentHwTest { kIntfID(), NeighborT::getNeighborAddress(), *getAgentEnsemble()); EXPECT_EVENTUALLY_TRUE(neighborInfo.classId().has_value()); if (neighborInfo.classId().has_value()) { - XLOG(INFO) << " GOT CLASSID: " << neighborInfo.classId().value(); EXPECT_EVENTUALLY_TRUE( programToTrunk || classID == neighborInfo.classId().value()); } @@ -457,6 +458,10 @@ class AgentNeighborOnMultiplePortsTest : public AgentHwTest { return utility::onePortPerInterfaceConfig( ensemble.getSw(), ensemble.masterLogicalPortIds()); } + folly::IPAddressV6 neighborIP(PortID port) const { + utility::EcmpSetupAnyNPorts6 ecmpHelper6(getProgrammedState()); + return ecmpHelper6.ip(PortDescriptor(port)); + } void oneNeighborPerPortSetup(const std::vector& portIds) { auto cfg = initialConfig(*getAgentEnsemble()); @@ -477,8 +482,7 @@ class AgentNeighborOnMultiplePortsTest : public AgentHwTest { this->applyNewState([&](const std::shared_ptr& in) { utility::EcmpSetupAnyNPorts6 ecmpHelper6( in, utility::MacAddressGenerator().get(dstMac.u64NBO() + idx + 1)); - return ecmpHelper6.resolveNextHops( - getProgrammedState(), {PortDescriptor(portIds[idx])}); + return ecmpHelper6.resolveNextHops(in, {PortDescriptor(portIds[idx])}); }); } @@ -532,9 +536,11 @@ TYPED_TEST(AgentNeighborOnMultiplePortsTest, ResolveOnTwoPorts) { }; auto verify = [&]() { EXPECT_FALSE(this->isProgrammedToCPU( - this->masterLogicalInterfacePortIds()[0], folly::IPAddressV6("1::1"))); + this->masterLogicalInterfacePortIds()[0], + this->neighborIP(this->masterLogicalInterfacePortIds()[0]))); EXPECT_FALSE(this->isProgrammedToCPU( - this->masterLogicalInterfacePortIds()[1], folly::IPAddressV6("2::2"))); + this->masterLogicalInterfacePortIds()[1], + this->neighborIP(this->masterLogicalInterfacePortIds()[1]))); }; this->verifyAcrossWarmBoots(setup, verify); } diff --git a/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp index da08a1ff0432b..d510b78e2ee5a 100644 --- a/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentPfcTests.cpp @@ -63,7 +63,7 @@ TEST_F(AgentPfcTest, verifyPfcCounters) { auto setup = [&]() { auto cfg = getAgentEnsemble()->getCurrentConfig(); - utility::setupPfcBuffers(cfg, portIds, losslessPgIds); + utility::setupPfcBuffers(getAgentEnsemble(), cfg, portIds, losslessPgIds); applyNewConfig(cfg); for (auto portId : portIds) { @@ -116,7 +116,7 @@ TEST_F(AgentPfcTest, verifyPfcLoopback) { auto setup = [&]() { auto cfg = getAgentEnsemble()->getCurrentConfig(); - utility::setupPfcBuffers(cfg, portIds, losslessPgIds); + utility::setupPfcBuffers(getAgentEnsemble(), cfg, portIds, losslessPgIds); utility::addPuntPfcPacketAcl( cfg, utility::getCoppMidPriQueueId(getAgentEnsemble()->getL3Asics())); applyNewConfig(cfg); diff --git a/fboss/agent/test/agent_hw_tests/AgentPortTests.cpp b/fboss/agent/test/agent_hw_tests/AgentPortTests.cpp new file mode 100644 index 0000000000000..67da68266c520 --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentPortTests.cpp @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/test/AgentHwTest.h" + +#include "fboss/agent/ApplyThriftConfig.h" +#include "fboss/agent/gen-cpp2/switch_config_types.h" +#include "fboss/agent/test/utils/AsicUtils.h" +#include "fboss/agent/test/utils/ConfigUtils.h" + +namespace facebook::fboss { + +class AgentPortTest : public AgentHwTest { + protected: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + return utility::onePortPerInterfaceConfig( + ensemble.getSw(), + ensemble.masterLogicalPortIds(), + true /*interfaceHasSubnet*/); + } + + std::vector + getProductionFeaturesVerified() const override { + return {production_features::ProductionFeature::HW_SWITCH}; + } + + std::vector getPortInfos(std::vector ports) { + auto switchId = getAgentEnsemble() + ->getSw() + ->getScopeResolver() + ->scope(getAgentEnsemble()->masterLogicalPortIds()) + .switchId(); + auto client = getAgentEnsemble()->getHwAgentTestClient(switchId); + std::vector portIds; + for (auto port : ports) { + portIds.push_back(port); + } + std::vector portInfos; + client->sync_getPortInfo(portInfos, std::move(portIds)); + return portInfos; + } +}; + +TEST_F(AgentPortTest, PortLoopbackMode) { + auto setup = [this]() { applyNewConfig(initialConfig(*getAgentEnsemble())); }; + auto verify = [this]() { + auto asic = + utility::checkSameAndGetAsic(this->getAgentEnsemble()->getL3Asics()); + for (const auto& loopbackMode : asic->desiredLoopbackModes()) { + auto portInfos = + getPortInfos({PortID(masterLogicalPortIds({loopbackMode.first})[0])}); + EXPECT_EQ( + *portInfos[0].loopbackMode(), static_cast(loopbackMode.second)); + } + }; + + verifyAcrossWarmBoots(setup, verify); +} + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp b/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp index ce3317d6328aa..54dfc9c2c54ce 100644 --- a/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentRouteOverflowTests.cpp @@ -87,6 +87,7 @@ TEST_F(AgentRouteOverflowTest, overflowRoutes) { break; case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: // No overflow test for MERU400BIU yet @@ -105,6 +106,9 @@ TEST_F(AgentRouteOverflowTest, overflowRoutes) { break; case PlatformType::PLATFORM_TAHAN800BC: break; + case PlatformType::PLATFORM_YANGRA: + // No overflow test for Yangra + break; } if (routeChunks.size() == 0) { return; diff --git a/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp b/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp new file mode 100644 index 0000000000000..90cc129731943 --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentRouteTests.cpp @@ -0,0 +1,803 @@ +/* + * Copyright (c) 2004-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +#include "fboss/agent/TxPacket.h" +#include "fboss/agent/packet/PktUtil.h" +#include "fboss/agent/state/LabelForwardingAction.h" +#include "fboss/agent/state/NodeBase-defs.h" +#include "fboss/agent/state/Port.h" +#include "fboss/agent/state/StateUtils.h" +#include "fboss/agent/test/AgentHwTest.h" +#include "fboss/agent/test/EcmpSetupHelper.h" +#include "fboss/agent/test/utils/AsicUtils.h" +#include "fboss/agent/test/utils/ConfigUtils.h" +#include "fboss/agent/test/utils/CoppTestUtils.h" +#include "fboss/agent/test/utils/OlympicTestUtils.h" +#include "fboss/agent/test/utils/PacketTestUtils.h" +#include "fboss/lib/CommonUtils.h" + +#include "fboss/agent/AddressUtil.h" +#include "fboss/agent/if/gen-cpp2/common_types.h" +#include "folly/IPAddressV4.h" +#include "folly/IPAddressV6.h" + +#include + +using facebook::network::toBinaryAddress; + +DECLARE_bool(intf_nbr_tables); +DECLARE_bool(classid_for_unresolved_routes); + +namespace { +facebook::fboss::utility::RouteInfo getRouteInfo( + const folly::IPAddress& ip, + int prefixLength, + facebook::fboss::AgentEnsemble& ensemble) { + auto switchId = ensemble.getSw() + ->getScopeResolver() + ->scope(ensemble.masterLogicalPortIds()) + .switchId(); + facebook::fboss::IpPrefix prefix; + prefix.ip() = toBinaryAddress(ip); + prefix.prefixLength() = prefixLength; + auto client = ensemble.getHwAgentTestClient(switchId); + facebook::fboss::utility::RouteInfo routeInfo; + client->sync_getRouteInfo(routeInfo, prefix); + return routeInfo; +} + +bool isRouteToNexthop( + const folly::IPAddress& ip, + int prefixLength, + const folly::IPAddress& nexthop, + facebook::fboss::AgentEnsemble& ensemble) { + auto switchId = ensemble.getSw() + ->getScopeResolver() + ->scope(ensemble.masterLogicalPortIds()) + .switchId(); + facebook::fboss::IpPrefix prefix; + prefix.ip() = toBinaryAddress(ip); + prefix.prefixLength() = prefixLength; + auto client = ensemble.getHwAgentTestClient(switchId); + return client->sync_isRouteToNexthop(prefix, toBinaryAddress(nexthop)); +} + +template +bool verifyProgrammedStack( + typename facebook::fboss::Route::Prefix routePrefix, + const facebook::fboss::InterfaceID& intfID, + const facebook::fboss::LabelForwardingAction::LabelStack& stack, + long refCount, + facebook::fboss::AgentEnsemble& ensemble) { + auto switchId = ensemble.getSw() + ->getScopeResolver() + ->scope(ensemble.masterLogicalPortIds()) + .switchId(); + facebook::fboss::IpPrefix prefix; + prefix.ip() = toBinaryAddress(routePrefix.network()); + prefix.prefixLength() = routePrefix.mask(); + auto client = ensemble.getHwAgentTestClient(switchId); + return client->sync_isProgrammedInHw(intfID, prefix, stack, refCount); +} +} // namespace + +namespace facebook::fboss { + +template +class AgentRouteTest : public AgentHwTest { + public: + using Type = AddrT; + + protected: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + return utility::onePortPerInterfaceConfig( + ensemble.getSw(), + ensemble.masterLogicalPortIds(), + true /*interfaceHasSubnet*/); + } + + std::vector + getProductionFeaturesVerified() const override { + return {production_features::ProductionFeature::L3_FORWARDING}; + } + + RouterID kRouterID() const { + return RouterID(0); + } + + cfg::AclLookupClass kLookupClass() const { + return cfg::AclLookupClass::CLASS_QUEUE_PER_HOST_QUEUE_2; + } + + std::vector portDescs() const { + std::vector ports; + for (auto i = 0; i < 4; ++i) { + ports.push_back(PortDescriptor(masterLogicalInterfacePortIds()[i])); + } + return ports; + } + RoutePrefix getSubnetIpForInterface() const { + auto state = this->getProgrammedState(); + const VlanID vlanID{utility::kBaseVlanId}; + auto vlan = state->getVlans()->getNodeIf(vlanID); + auto interface = state->getInterfaces()->getNodeIf(vlan->getInterfaceID()); + if (interface) { + for (auto iter : std::as_const(*interface->getAddresses())) { + std::pair address( + folly::IPAddress(iter.first), iter.second->ref()); + if constexpr (std::is_same_v) { + if (address.first.isV4()) { + return RoutePrefix{ + address.first.asV4(), address.second}; + } + } else { + if (address.first.isV6()) { + return RoutePrefix{ + address.first.asV6(), address.second}; + } + } + } + } + XLOG(FATAL) << "Invald configuration vlan " << utility::kBaseVlanId; + } + const std::vector> kGetRoutePrefixes() const { + if constexpr (std::is_same_v) { + static const std::vector> routePrefixes = { + RoutePrefix{folly::IPAddressV4{"10.10.1.0"}, 24}, + RoutePrefix{folly::IPAddressV4{"10.20.1.0"}, 24}, + RoutePrefix{folly::IPAddressV4{"10.30.1.0"}, 24}, + RoutePrefix{folly::IPAddressV4{"10.40.1.1"}, 32}}; + + return routePrefixes; + } else { + static const std::vector> routePrefixes = { + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3063::"}, 64}, + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3064::"}, 64}, + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3065::"}, 64}, + RoutePrefix{ + folly::IPAddressV6{"2803:6080:d038:3065::1"}, 128}}; + + return routePrefixes; + } + } + + RoutePrefix kDefaultPrefix() const { + if constexpr (std::is_same_v) { + return RoutePrefix{folly::IPAddressV4{"0.0.0.0"}, 0}; + + } else { + return RoutePrefix{folly::IPAddressV6{"::"}, 0}; + } + } + + const AddrT kStaticIp2MplsNextHop() const { + if constexpr (std::is_same_v) { + return folly::IPAddressV4{"10.10.1.1"}; + } else { + return folly::IPAddressV6{"2803:6080:d038:3063::1"}; + } + } + + RoutePrefix kGetRoutePrefix0() const { + return kGetRoutePrefixes()[0]; + } + + RoutePrefix kGetRoutePrefix1() const { + return kGetRoutePrefixes()[1]; + } + + RoutePrefix kGetRoutePrefix2() const { + return kGetRoutePrefixes()[2]; + } + + RoutePrefix kGetRoutePrefix3() const { + return kGetRoutePrefixes()[3]; + } + + std::shared_ptr addRoutes( + const std::shared_ptr& inState, + const std::vector>& routePrefixes) { + auto kEcmpWidth = 1; + utility::EcmpSetupAnyNPorts ecmpHelper(inState, kRouterID()); + applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, kEcmpWidth); + return newState; + }); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, kEcmpWidth, routePrefixes); + return getProgrammedState(); + } + + void verifyClassIDHelper( + RoutePrefix routePrefix, + std::optional classID) { + auto routeInfo = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + std::optional classIDFromHw; + if (routeInfo.classId().has_value()) { + classIDFromHw = + facebook::fboss::cfg::AclLookupClass(routeInfo.classId().value()); + } + EXPECT_EQ(classIDFromHw, classID); + } +}; + +using IpTypes = ::testing::Types; + +TYPED_TEST_SUITE(AgentRouteTest, IpTypes); + +TYPED_TEST(AgentRouteTest, VerifyClassID) { + auto setup = [=, this]() { + // 3 routes r0, r1, r2. r0 & r1 have classID, r2 does not. + this->addRoutes( + this->getProgrammedState(), + {this->kGetRoutePrefix0(), + this->kGetRoutePrefix1(), + this->kGetRoutePrefix2()}); + auto updater = this->getSw()->getRouteUpdater(); + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix0().toCidrNetwork(), + this->kGetRoutePrefix1().toCidrNetwork()}, + this->kLookupClass(), + false /*sync*/); + + // verify classID programming + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + this->verifyClassIDHelper(this->kGetRoutePrefix1(), this->kLookupClass()); + this->verifyClassIDHelper(this->kGetRoutePrefix2(), std::nullopt); + + // remove r1's classID, add classID for r2 + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix1().toCidrNetwork()}, + std::nullopt, + false /*sync*/); + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix2().toCidrNetwork()}, + this->kLookupClass(), + false /*sync*/); + }; + + auto verify = [=, this]() { + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + this->verifyClassIDHelper(this->kGetRoutePrefix1(), std::nullopt); + this->verifyClassIDHelper(this->kGetRoutePrefix2(), this->kLookupClass()); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyClassIDForConnectedRoute) { + auto verify = [=, this]() { + auto ipAddr = this->getSubnetIpForInterface(); + // verify if the connected route of the interface is present + auto routeInfo = getRouteInfo( + ipAddr.network(), ipAddr.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.exists()); + auto asic = + utility::checkSameAndGetAsic(this->getAgentEnsemble()->getL3Asics()); + if (asic->getAsicVendor() != HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { + if (FLAGS_set_classid_for_my_subnet_and_ip_routes) { + this->verifyClassIDHelper( + ipAddr, cfg::AclLookupClass::DST_CLASS_L3_LOCAL_2); + } + } + }; + + this->verifyAcrossWarmBoots([] {}, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyClassIdWithNhopResolutionFlap) { + auto setup = [=, this]() { + this->addRoutes(this->getProgrammedState(), {this->kGetRoutePrefix0()}); + auto updater = this->getSw()->getRouteUpdater(); + updater.programClassID( + this->kRouterID(), + {this->kGetRoutePrefix0().toCidrNetwork()}, + this->kLookupClass(), + false /*sync*/); + + // verify classID programming + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + auto kEcmpWidth = 1; + using AddrT = typename TestFixture::Type; + utility::EcmpSetupAnyNPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + // Unresolve nhop + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, kEcmpWidth); + return newState; + }); + // Resolve nhop + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, kEcmpWidth); + return newState; + }); + }; + auto verify = [=, this]() { + this->verifyClassIDHelper(this->kGetRoutePrefix0(), this->kLookupClass()); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, UnresolvedAndResolvedNextHop) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[0]}, {this->kGetRoutePrefix0()}); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[1]}); + return newState; + }); + ecmpHelper.programRoutes(&wrapper, {ports[1]}, {this->kGetRoutePrefix1()}); + }; + auto verify = [=, this]() { + auto routePrefix0 = this->kGetRoutePrefix0(); + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto routeInfo = getRouteInfo( + routePrefix0.network(), routePrefix0.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.isProgrammedToCpu()); + EXPECT_FALSE(*routeInfo.isMultiPath()); + + auto routePrefix1 = this->kGetRoutePrefix1(); + EXPECT_TRUE(isRouteToNexthop( + routePrefix1.network(), + routePrefix1.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + + auto routeInfo1 = getRouteInfo( + routePrefix1.network(), routePrefix1.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo1.isMultiPath()); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, UnresolveResolvedNextHop) { + using AddrT = typename TestFixture::Type; + + auto setup = [=, this]() { + utility::EcmpSetupAnyNPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, 1); + return newState; + }); + + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, 1, {this->kGetRoutePrefix0()}); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, 1); + return newState; + }); + }; + auto verify = [=, this]() { + auto routePrefix = this->kGetRoutePrefix0(); + auto routeInfo = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.isProgrammedToCpu()); + EXPECT_FALSE(*routeInfo.isMultiPath()); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, UnresolvedAndResolvedMultiNextHop) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes( + &wrapper, {ports[0], ports[1]}, {this->kGetRoutePrefix0()}); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[2], ports[3]}); + return newState; + }); + ecmpHelper.programRoutes( + &wrapper, {ports[2], ports[3]}, {this->kGetRoutePrefix1()}); + }; + auto verify = [=, this]() { + auto routePrefix0 = this->kGetRoutePrefix0(); + auto routeInfo = getRouteInfo( + routePrefix0.network(), routePrefix0.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo.isProgrammedToCpu()); + EXPECT_TRUE(*routeInfo.isMultiPath()); + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + EXPECT_FALSE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[0]).ip, + *this->getAgentEnsemble())); + EXPECT_FALSE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + + auto routePrefix1 = this->kGetRoutePrefix1(); + auto routeInfo1 = getRouteInfo( + routePrefix1.network(), routePrefix1.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo1.isProgrammedToCpu()); + EXPECT_TRUE(*routeInfo1.isMultiPath()); + EXPECT_TRUE(isRouteToNexthop( + routePrefix1.network(), + routePrefix1.mask(), + ecmpHelper.nhop(ports[2]).ip, + *this->getAgentEnsemble())); + EXPECT_TRUE(isRouteToNexthop( + routePrefix1.network(), + routePrefix1.mask(), + ecmpHelper.nhop(ports[3]).ip, + *this->getAgentEnsemble())); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, ResolvedMultiNexthopToUnresolvedSingleNexthop) { + auto ports = this->portDescs(); + using AddrT = typename TestFixture::Type; + auto verify = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[0], ports[1]}); + return newState; + }); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes( + &wrapper, {ports[0], ports[1]}, {this->kGetRoutePrefix0()}); + auto routePrefix0 = this->kGetRoutePrefix0(); + auto routeInfo = getRouteInfo( + routePrefix0.network(), routePrefix0.mask(), *this->getAgentEnsemble()); + EXPECT_FALSE(*routeInfo.isProgrammedToCpu()); + EXPECT_TRUE(*routeInfo.isMultiPath()); + EXPECT_TRUE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[0]).ip, + *this->getAgentEnsemble())); + EXPECT_TRUE(isRouteToNexthop( + routePrefix0.network(), + routePrefix0.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops( + in, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), + PortDescriptor(this->masterLogicalInterfacePortIds()[1])}); + return newState; + }); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops( + in, {PortDescriptor(this->masterLogicalInterfacePortIds()[0])}); + return newState; + }); + ecmpHelper.programRoutes( + &wrapper, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0])}, + {this->kGetRoutePrefix0()}); + }; + this->verifyAcrossWarmBoots([] {}, verify); +} + +TYPED_TEST(AgentRouteTest, StaticIp2MplsRoutes) { + using AddrT = typename TestFixture::Type; + + auto setup = [=, this]() { + auto config = this->initialConfig(*this->getAgentEnsemble()); + + config.staticIp2MplsRoutes()->resize(1); + config.staticIp2MplsRoutes()[0].prefix() = this->kGetRoutePrefix1().str(); + + NextHopThrift nexthop; + nexthop.address() = toBinaryAddress(folly::IPAddress( + this->kStaticIp2MplsNextHop().str())); // in prefix 0 subnet + MplsAction action; + action.action() = MplsActionCode::PUSH; + action.pushLabels() = {1001, 1002}; + nexthop.mplsAction() = action; + + config.staticIp2MplsRoutes()[0].nexthops()->resize(1); + config.staticIp2MplsRoutes()[0].nexthops()[0] = nexthop; + this->applyNewConfig(config); + + // resolve prefix 0 subnet + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes( + &wrapper, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), + PortDescriptor(this->masterLogicalInterfacePortIds()[1])}, + {this->kGetRoutePrefix0()}); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops( + in, + {PortDescriptor(this->masterLogicalInterfacePortIds()[0]), + PortDescriptor(this->masterLogicalInterfacePortIds()[1])}); + return newState; + }); + }; + auto verify = [=, this]() { + // prefix 1 subnet reachable via prefix 0 with mpls stack over this stack + WITH_RETRIES({ + EXPECT_EVENTUALLY_TRUE(verifyProgrammedStack( + this->kGetRoutePrefix1(), + InterfaceID(utility::kBaseVlanId), + {1001, 1002}, + 1, + *this->getAgentEnsemble())); + EXPECT_EVENTUALLY_TRUE(verifyProgrammedStack( + this->kGetRoutePrefix1(), + InterfaceID(utility::kBaseVlanId + 1), + {1001, 1002}, + 1, + *this->getAgentEnsemble())); + }); + }; + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyRouting) { + using AddrT = typename TestFixture::Type; + auto constexpr isV4 = std::is_same_v; + auto ports = this->portDescs(); + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[0]}); + return newState; + }); + + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[0]}, {this->kDefaultPrefix()}); + }; + auto verify = [=, this]() { + const auto egressPort = ports[0].phyPortID(); + auto vlanId = utility::firstVlanID(this->getProgrammedState()); + auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); + + auto beforeOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + auto v4TxPkt = utility::makeUDPTxPacket( + this->getSw(), + vlanId, + intfMac, + intfMac, + folly::IPAddressV4("101.0.0.1"), + folly::IPAddressV4("201.0.0.1"), + 1234, + 4321); + + auto v6TxPkt = utility::makeUDPTxPacket( + this->getSw(), + vlanId, + intfMac, + intfMac, + folly::IPAddressV6("101::1"), + folly::IPAddressV6("201::1"), + 1234, + 4321); + + if (isV4) { + this->getAgentEnsemble()->ensureSendPacketOutOfPort( + std::move(v4TxPkt), ports[1].phyPortID()); + } else { + this->getAgentEnsemble()->ensureSendPacketOutOfPort( + std::move(v6TxPkt), ports[1].phyPortID()); + } + WITH_RETRIES({ + auto afterOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts + << " afterOutPkts: " << afterOutPkts; + EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); + }); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, verifyHostRouteChange) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + + auto setup = [=, this]() { + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[0], ports[1]}); + return newState; + }); + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[1]}, {this->kGetRoutePrefix3()}); + ecmpHelper.programRoutes( + &wrapper, {ports[0], ports[1]}, {this->kGetRoutePrefix3()}); + }; + + auto verify = [=, this]() { + auto routePrefix = this->kGetRoutePrefix3(); + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + EXPECT_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[0]).ip, + *this->getAgentEnsemble())); + EXPECT_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, verifyCpuRouteChange) { + using AddrT = typename TestFixture::Type; + auto ports = this->portDescs(); + + auto setup = [=, this]() { + auto cfg = this->initialConfig(*this->getAgentEnsemble()); + auto ensemble = this->getAgentEnsemble(); + utility::addOlympicQosMaps(cfg, ensemble->getL3Asics()); + utility::setDefaultCpuTrafficPolicyConfig( + cfg, ensemble->getL3Asics(), ensemble->isSai()); + utility::addCpuQueueConfig(cfg, ensemble->getL3Asics(), ensemble->isSai()); + this->applyNewConfig(cfg); + + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + // Next hops unresolved - route should point to CPU + auto wrapper = this->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&wrapper, {ports[1]}, {this->kGetRoutePrefix3()}); + }; + + auto verify = [=, this]() { + auto routePrefix = this->kGetRoutePrefix3(); + auto routeInfo = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.isProgrammedToCpu()); + if (FLAGS_classid_for_unresolved_routes) { + EXPECT_TRUE(*routeInfo.isRouteUnresolvedToClassId()); + } + + // Resolve next hops + utility::EcmpSetupTargetedPorts ecmpHelper( + this->getProgrammedState(), this->kRouterID()); + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + EXPECT_EVENTUALLY_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + if (FLAGS_classid_for_unresolved_routes) { + auto routeInfo2 = getRouteInfo( + routePrefix.network(), + routePrefix.mask(), + *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_FALSE(*routeInfo2.isRouteUnresolvedToClassId()); + } + }); + + // Verify routing + const auto egressPort = ports[1].phyPortID(); + auto vlanId = utility::firstVlanID(this->getProgrammedState()); + auto intfMac = utility::getFirstInterfaceMac(this->getProgrammedState()); + auto beforeOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + auto v6TxPkt = utility::makeUDPTxPacket( + this->getSw(), + vlanId, + intfMac, + intfMac, + this->kGetRoutePrefix0().network(), // Randomly pick src IP + routePrefix.network(), + 1234, + 4321); + this->getAgentEnsemble()->ensureSendPacketOutOfPort( + std::move(v6TxPkt), ports[0].phyPortID()); + WITH_RETRIES({ + auto afterOutPkts = + *this->getLatestPortStats(egressPort).outUnicastPkts__ref(); + XLOG(DBG2) << "Stats:: beforeOutPkts: " << beforeOutPkts + << " afterOutPkts: " << afterOutPkts; + EXPECT_EVENTUALLY_EQ(afterOutPkts - 1, beforeOutPkts); + }); + + // Unresolve next hops + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + auto routeInfo3 = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_TRUE(*routeInfo3.isProgrammedToCpu()); + if (FLAGS_classid_for_unresolved_routes) { + EXPECT_EVENTUALLY_TRUE(*routeInfo3.isRouteUnresolvedToClassId()); + } + }); + + // Resolve next hops + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.resolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + EXPECT_EVENTUALLY_TRUE(isRouteToNexthop( + routePrefix.network(), + routePrefix.mask(), + ecmpHelper.nhop(ports[1]).ip, + *this->getAgentEnsemble())); + if (FLAGS_classid_for_unresolved_routes) { + auto routeInfo4 = getRouteInfo( + routePrefix.network(), + routePrefix.mask(), + *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_FALSE(*routeInfo4.isRouteUnresolvedToClassId()); + } + }); + + // Unresolve next hops + this->applyNewState([&](const std::shared_ptr& in) { + auto newState = ecmpHelper.unresolveNextHops(in, {ports[1]}); + return newState; + }); + WITH_RETRIES({ + auto routeInfo5 = getRouteInfo( + routePrefix.network(), routePrefix.mask(), *this->getAgentEnsemble()); + EXPECT_EVENTUALLY_TRUE(*routeInfo5.isProgrammedToCpu()); + if (FLAGS_classid_for_unresolved_routes) { + EXPECT_EVENTUALLY_TRUE(*routeInfo5.isRouteUnresolvedToClassId()); + } + }); + }; + + this->verifyAcrossWarmBoots(setup, verify); +} + +TYPED_TEST(AgentRouteTest, VerifyDefaultRoute) { + auto verify = [=, this]() { + // default routes should exist always. + auto routeInfo = + getRouteInfo(folly::IPAddress("::"), 0, *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo.exists()); + auto routeInfo1 = + getRouteInfo(folly::IPAddress("0.0.0.0"), 0, *this->getAgentEnsemble()); + EXPECT_TRUE(*routeInfo1.exists()); + }; + this->verifyAcrossWarmBoots([] {}, verify); +} +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp b/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp index c1e7380ba6e51..beae61185ad99 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSendPacketToQueueTests.cpp @@ -7,18 +7,21 @@ * of patent rights can be found in the PATENTS file in the same directory. * */ +#include #include "fboss/agent/TxPacket.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" +#include "fboss/agent/hw/test/ConfigFactory.h" #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/test/AgentHwTest.h" #include "fboss/agent/test/EcmpSetupHelper.h" +#include "fboss/agent/test/utils/AsicUtils.h" +#include "fboss/agent/test/utils/TrafficPolicyTestUtils.h" #include "fboss/lib/CommonUtils.h" -#include - namespace { constexpr uint8_t kDefaultQueue = 0; constexpr uint8_t kTestingQueue = 7; +constexpr uint32_t kDscp = 0x24; } // namespace namespace facebook::fboss { @@ -108,4 +111,82 @@ TEST_F(AgentSendPacketToQueueTest, SendPacketSwitchedToDefaultUCQueue) { checkSendPacket(std::nullopt, false); } +TEST_F(AgentSendPacketToQueueTest, SendPacketOutOfPortToMCQueue) { + auto ensemble = getAgentEnsemble(); + auto l3Asics = ensemble->getSw()->getHwAsicTable()->getL3Asics(); + auto asic = utility::checkSameAndGetAsic(l3Asics); + auto masterLogicalPortIds = ensemble->masterLogicalPortIds(); + auto port = masterLogicalPortIds[0]; + + auto setup = [=, this]() { + // put all ports in the same vlan + auto newCfg = utility::oneL3IntfNPortConfig( + ensemble->getSw()->getPlatformMapping(), + asic, + masterLogicalPortIds, + ensemble->getSw()->getPlatformSupportsAddRemovePort(), + asic->desiredLoopbackModes()); + applyNewConfig(newCfg); + }; + + auto verifyFlooding = [=, this]() { + auto beforeOutPkts = *getLatestPortStats(port).outMulticastPkts_(); + WITH_RETRIES({ + auto afterOutPkts = *getLatestPortStats(port).outMulticastPkts_(); + XLOG(DBG2) << "afterOutPkts " << afterOutPkts << ", beforeOutPkts " + << beforeOutPkts; + EXPECT_EVENTUALLY_GT(afterOutPkts - beforeOutPkts, 10000); + }); + }; + + auto verify = [=, this]() { + if (getSw()->getBootType() == BootType::WARM_BOOT) { + return; + } + auto vlanId = utility::firstVlanID(getProgrammedState()); + auto intfMac = utility::getFirstInterfaceMac(getProgrammedState()); + auto randomMac = folly::MacAddress("01:02:03:04:05:06"); + // send packets with random dst mac to flood the vlan + for (int i = 0; i < 100; i++) { + auto pkt = utility::makeUDPTxPacket( + getSw(), + vlanId, + intfMac, + randomMac, + folly::IPAddressV6("2620:0:1cfe:face:b00c::3"), + folly::IPAddressV6("2620:0:1cfe:face:b00c::4"), + 8000, + 8001, + kDscp << 2); + ensemble->sendPacketAsync( + std::move(pkt), + PortDescriptor(masterLogicalPortIds[0]), + std::nullopt); + } + + XLOG(DBG2) << "Verify multicast traffic is flooding"; + verifyFlooding(); + + XLOG(DBG2) + << "Add ACL to send packet to queue 7. This should only affect unicast traffic but not multicast traffic here"; + // In S422033, multicast traffic was also send to multicast queue 7, which + // does not exist on TH4 and corrupted the asic. This caused parity error + // later. All packets are also dropped and no traffic flooding any more. + auto newCfg = ensemble->getCurrentConfig(); + utility::addDscpAclToCfg(asic, &newCfg, "acl1", kDscp); + utility::addQueueMatcher(&newCfg, "acl1", kTestingQueue, ensemble->isSai()); + applyNewConfig(newCfg); + + XLOG(DBG2) << "Wait 10 seconds and verify multicast traffic still flooding"; + sleep(10); + verifyFlooding(); + }; + + auto verifyPostWb = [&]() { + XLOG(DBG2) << "Verify multicast traffic still flooding after warmboot"; + verifyFlooding(); + }; + verifyAcrossWarmBoots(setup, verify, []() {}, verifyPostWb); +} + } // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp index e98e0c71ac968..03d182a403d82 100644 --- a/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentSflowMirrorTest.cpp @@ -10,14 +10,19 @@ #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/packet/PktUtil.h" +#include "fboss/agent/test/AgentEnsemble.h" #include "fboss/agent/test/EcmpSetupHelper.h" #include "fboss/agent/test/ResourceLibUtil.h" #include "fboss/agent/test/TrunkUtils.h" #include "fboss/agent/test/utils/AsicUtils.h" #include "fboss/agent/test/utils/ConfigUtils.h" +#include "fboss/agent/test/utils/CoppTestUtils.h" #include "fboss/agent/test/utils/MirrorTestUtils.h" +#include "fboss/agent/test/utils/MultiPortTrafficTestUtils.h" #include "fboss/agent/test/utils/OlympicTestUtils.h" #include "fboss/agent/test/utils/PacketSnooper.h" +#include "fboss/agent/test/utils/PfcTestUtils.h" +#include "fboss/agent/test/utils/QosTestUtils.h" #include "fboss/lib/CommonUtils.h" #include "fboss/agent/SflowShimUtils.h" @@ -531,6 +536,134 @@ class AgentSflowMirrorOnTrunkTest : public AgentSflowMirrorTruncateTest { } }; +class AgentSflowMirrorWithLineRateTrafficTest + : public AgentSflowMirrorTruncateTest { + public: + static const int kLosslessPriority{2}; + void testSflowEgressCongestion() { + constexpr int kNumDataTrafficPorts{6}; + auto setup = [=, this]() { + auto allPorts = masterLogicalInterfacePortIds(); + std::vector portIds( + allPorts.begin(), allPorts.begin() + kNumDataTrafficPorts); + std::vector losslessPgIds = {kLosslessPriority}; + auto config = initialConfig(*getAgentEnsemble()); + // Configure 1:1 sampling to ensure high rate on mirror egress port + configSampling(config, 1); + // PFC buffer configurations to ensure we have lossless traffic + const std::map tcToPgOverride{}; + const utility::PfcBufferParams bufferParams{ + .scalingFactor = cfg::MMUScalingFactor::ONE}; + utility::setupPfcBuffers( + getAgentEnsemble(), + config, + portIds, + losslessPgIds, + tcToPgOverride, + bufferParams); + // Make sure that traffic is going to loop for ever! + utility::setTTLZeroCpuConfig(getAgentEnsemble()->getL3Asics(), config); + applyNewConfig(config); + resolveRouteForMirrorDestination(); + utility::setupEcmpDataplaneLoopOnAllPorts(getAgentEnsemble()); + utility::createTrafficOnMultiplePorts( + getAgentEnsemble(), + kNumDataTrafficPorts, + sendPacket, + 50 /*desiredPctLineRate*/); + }; + auto verify = [=, this]() { + verifySflowEgressPortNotStuck(); + if (checkSameAndGetAsic()->isSupported( + HwAsic::Feature::EVENTOR_PORT_FOR_SFLOW)) { + validateEventorPortQueueLimitRespected(); + } + }; + verifyAcrossWarmBoots(setup, verify); + } + + private: + static void sendPacket( + facebook::fboss::AgentEnsemble* ensemble, + const folly::IPAddressV6& dstIp) { + folly::IPAddressV6 kSrcIp("2402::1"); + const auto dstMac = + utility::getFirstInterfaceMac(ensemble->getProgrammedState()); + const auto srcMac = utility::MacAddressGenerator().get(dstMac.u64NBO() + 1); + + auto txPacket = utility::makeUDPTxPacket( + ensemble->getSw(), + std::nullopt, // vlanID + srcMac, + dstMac, + kSrcIp, + dstIp, + 8000, // l4 src port + 8001, // l4 dst port + kLosslessPriority * 8 << 2, // dscp for lossless traffic + 255, // hopLimit + std::vector(4500)); + // Forward the packet in the pipeline + ensemble->getSw()->sendPacketSwitchedAsync(std::move(txPacket)); + } + + void verifySflowEgressPortNotStuck() { + auto portId = getNonSflowSampledInterfacePorts(); + // Expect atleast 1Gbps of mirror traffic! + const uint64_t kDesiredMirroredTrafficRate{1000000000}; + EXPECT_NO_THROW(getAgentEnsemble()->waitForSpecificRateOnPort( + portId, kDesiredMirroredTrafficRate)); + // Make sure that we can sustain the rate for longer duration + constexpr int kNumberOfIterations{6}; + constexpr int kWaitPeriod{5}; + auto prevPortStats = getLatestPortStats(portId); + for (int iter = 0; iter < kNumberOfIterations; iter++) { + sleep(kWaitPeriod); + auto curPortStats = getLatestPortStats(portId); + auto rate = getAgentEnsemble()->getTrafficRate( + prevPortStats, curPortStats, kWaitPeriod); + // Ensure that we always see greater than the desired rate + EXPECT_GT(rate, kDesiredMirroredTrafficRate); + prevPortStats = curPortStats; + } + } + + void validateEventorPortQueueLimitRespected() { + auto config{initialConfig(*getAgentEnsemble())}; + uint32_t maxExpectedQueueLimitBytes{0}; + PortID eventorPortId; + for (auto& port : *config.ports()) { + if (*port.portType() == cfg::PortType::EVENTOR_PORT) { + auto voqConfigName = *port.portVoqConfigName(); + for (auto& voqConfig : config.portQueueConfigs()[voqConfigName]) { + // Set the expected queue limit bytes to be 15% higher than + // what we are configuring, as queue limit is not always + // respected accurately. + if (voqConfig.id() == 0) { + maxExpectedQueueLimitBytes = + *voqConfig.maxDynamicSharedBytes() * 1.15; + break; + } + } + eventorPortId = *port.logicalID(); + break; + } + } + EXPECT_GT(maxExpectedQueueLimitBytes, 0); + auto eventorSysPortId = getSystemPortID( + eventorPortId, + getProgrammedState(), + SwitchID(*checkSameAndGetAsic()->getSwitchId())); + WITH_RETRIES({ + auto latestStats = getLatestSysPortStats(eventorSysPortId); + auto watermarkBytes = latestStats.queueWatermarkBytes_()->at(0); + EXPECT_EVENTUALLY_GT(watermarkBytes, 0); + EXPECT_LT(watermarkBytes, maxExpectedQueueLimitBytes); + EXPECT_EVENTUALLY_GT(latestStats.queueOutDiscardBytes_()->at(0), 0); + }); + } +}; + using AgentSflowMirrorTestV4 = AgentSflowMirrorTest; using AgentSflowMirrorTestV6 = AgentSflowMirrorTest; using AgentSflowMirrorTruncateTestV4 = @@ -578,6 +711,10 @@ SFLOW_SAMPLING_TRUNK_TEST_V4_V6(VerifySampledPacketRate, { this->testSampledPacketRate(true); }) +TEST_F(AgentSflowMirrorWithLineRateTrafficTest, VerifySflowEgressCongestion) { + this->testSflowEgressCongestion(); +} + TEST_F(AgentSflowMirrorTestV4, MoveToV6) { // Test to migrate v4 mirror to v6 auto setup = [=, this]() { diff --git a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp index fab0a883b70f6..d82deeea397eb 100644 --- a/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentTrafficPfcTests.cpp @@ -2,12 +2,14 @@ #include +#include "fboss/agent/AgentFeatures.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/test/AgentHwTest.h" #include "fboss/agent/test/EcmpSetupHelper.h" #include "fboss/agent/test/utils/AsicUtils.h" #include "fboss/agent/test/utils/ConfigUtils.h" +#include "fboss/agent/test/utils/CoppTestUtils.h" #include "fboss/agent/test/utils/PfcTestUtils.h" #include "fboss/agent/test/utils/QosTestUtils.h" #include "fboss/lib/CommonUtils.h" @@ -173,7 +175,6 @@ class AgentTrafficPfcTest : public AgentHwTest { public: void setCmdLineFlagOverrides() const override { AgentHwTest::setCmdLineFlagOverrides(); - // TODO: do the equivalent of FLAGS_mmu_lossless_mode = true; /* * Makes this flag available so that it can be used in early * stages of init to setup common buffer pool for specific @@ -182,12 +183,54 @@ class AgentTrafficPfcTest : public AgentHwTest { FLAGS_ingress_egress_buffer_pool_size = kGlobalIngressEgressBufferPoolSize; } + void applyPlatformConfigOverrides( + const cfg::SwitchConfig& sw, + cfg::PlatformConfig& config) const override { + // These configs only work for Broadcom SDK. + if (utility::isSaiConfig(sw)) { + return; + } + + // Equivalent to FLAGS_mmu_lossless_mode=true in hw tests. + utility::modifyPlatformConfig( + config, + [](std::string& yamlCfg) { + std::string toReplace("LOSSY"); + std::size_t pos = yamlCfg.find(toReplace); + if (pos != std::string::npos) { + // for TH4 we skip buffer reservation in prod + // but it doesn't seem to work for pfc tests which + // play around with other variables. For unblocking + // skip it for now + if (FLAGS_skip_buffer_reservation) { + yamlCfg.replace( + pos, + toReplace.length(), + "LOSSY_AND_LOSSLESS\n SKIP_BUFFER_RESERVATION: 1"); + } else { + yamlCfg.replace(pos, toReplace.length(), "LOSSY_AND_LOSSLESS"); + } + } + }, + [](std::map& cfg) { + cfg["mmu_lossless"] = "0x2"; + cfg["buf.mqueue.guarantee.0"] = "0C"; + cfg["mmu_config_override"] = "0"; + cfg["buf.prigroup7.guarantee"] = "0C"; + if (FLAGS_qgroup_guarantee_enable) { + cfg["buf.qgroup.guarantee_mc"] = "0"; + cfg["buf.qgroup.guarantee"] = "0"; + } + }); + } + cfg::SwitchConfig initialConfig( const AgentEnsemble& ensemble) const override { auto config = utility::onePortPerInterfaceConfig( ensemble.getSw(), ensemble.masterLogicalPortIds(), true /*interfaceHasSubnet*/); + utility::setTTLZeroCpuConfig(ensemble.getL3Asics(), config); return config; } @@ -367,14 +410,34 @@ class AgentTrafficPfcTest : public AgentHwTest { // Apply PFC config to all ports portIdsToConfigure = masterLogicalInterfacePortIds(); } - setupPfcBuffers( + utility::setupPfcBuffers( + getAgentEnsemble(), cfg, portIdsToConfigure, kLosslessPgIds, tcToPgOverride, testParams.buffer); + auto asic = + utility::checkSameAndGetAsic(getAgentEnsemble()->getL3Asics()); if (isSupportedOnAllAsics(HwAsic::Feature::MULTIPLE_EGRESS_BUFFER_POOL)) { - utility::setupMultipleEgressPoolAndQueueConfigs(cfg, kLosslessPgIds); + utility::setupMultipleEgressPoolAndQueueConfigs( + cfg, kLosslessPgIds, asic->getMMUSizeBytes()); + } + if (asic->getAsicType() == cfg::AsicType::ASIC_TYPE_YUBA) { + // For YUBA, lossless queues needs to be configured with static + // queue limit equal to the MMU size to ensure its lossless. + for (auto& queueConfigs : *cfg.portQueueConfigs()) { + for (auto& queueCfg : queueConfigs.second) { + if (std::find( + kLosslessPgIds.begin(), + kLosslessPgIds.end(), + *queueCfg.id()) != kLosslessPgIds.end()) { + // Given the 1:1 mapping for queueID to PG ID, + // this is a lossless queue. + queueCfg.sharedBytes() = asic->getMMUSizeBytes(); + } + } + } } applyNewConfig(cfg); @@ -504,7 +567,13 @@ class AgentTrafficPfcWatchdogTest : public AgentTrafficPfcTest { protected: void setupConfigAndEcmpTraffic(const std::vector& portIds) { cfg::SwitchConfig cfg = getAgentEnsemble()->getCurrentConfig(); - setupPfcBuffers(cfg, portIds, kLosslessPgIds, {}, PfcBufferParams{}); + utility::setupPfcBuffers( + getAgentEnsemble(), + cfg, + portIds, + kLosslessPgIds, + {}, + PfcBufferParams{}); applyNewConfig(cfg); setupEcmpTraffic(portIds); } diff --git a/fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp b/fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp new file mode 100644 index 0000000000000..87ce8e29dab4d --- /dev/null +++ b/fboss/agent/test/agent_hw_tests/AgentTunnelMgrTests.cpp @@ -0,0 +1,123 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/hw/test/ConfigFactory.h" +#include "fboss/agent/test/AgentHwTest.h" +#include "fboss/agent/test/TestUtils.h" + +namespace facebook::fboss { + +class AgentTunnelMgrTest : public AgentHwTest { + public: + std::vector + getProductionFeaturesVerified() const override { + return {}; + } + + void setCmdLineFlagOverrides() const override { + AgentHwTest::setCmdLineFlagOverrides(); + FLAGS_tun_intf = true; + } + + // Clear any stale kernel entries + void clearKernelEntries() { + // Delete the source route rule entries from the kernel + auto cmd = folly::to("ip rule delete table 1"); + + runShellCmd(cmd); + + // Delete the tunnel address entries from the kernel + cmd = folly::to("ip link delete fboss2000"); + + runShellCmd(cmd); + } + + void checkKernelEntriesRemoved() { + auto config = initialConfig(*getAgentEnsemble()); + auto intfIp = folly::IPAddress::createNetwork( + config.interfaces()[0].ipAddresses()[0], -1, false) + .first; + + // Check that the source route rule entries are not present in the kernel + auto cmd = folly::to("ip rule list | grep ", intfIp); + + auto output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) == std::string::npos); + + // Check that the tunnel address entries are not present in the kernel + cmd = folly::to("ip addr list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) == std::string::npos); + + // Check that the default route entries are not present in the kernel + cmd = folly::to("ip route list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) == std::string::npos); + } + + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + auto cfg = utility::oneL3IntfConfig( + ensemble.getSw()->getPlatformMapping(), + ensemble.getL3Asics(), + ensemble.masterLogicalPortIds()[0], + ensemble.getSw()->getPlatformSupportsAddRemovePort()); + return cfg; + } +}; + +// Test that the tunnel manager is able to create the source route rule entries, +// tunnel address entries and default route entries in the kernel +TEST_F(AgentTunnelMgrTest, checkKernelEntries) { + auto setup = [=]() {}; + auto verify = [=, this]() { + auto config = initialConfig(*getAgentEnsemble()); + auto intfIp = folly::IPAddress::createNetwork( + config.interfaces()[0].ipAddresses()[0], -1, false) + .first; + + // Check that the source route rule entries are present in the kernel + auto cmd = folly::to("ip rule list | grep ", intfIp); + + auto output = runShellCmd(cmd); + + XLOG(DBG2) << "Cmd: " << cmd; + XLOG(DBG2) << "Output: \n" << output; + + EXPECT_TRUE( + output.find(folly::to(intfIp)) != std::string::npos); + + // Check that the tunnel address entries are present in the kernel + cmd = folly::to("ip addr list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) != std::string::npos); + + // Check that the default route entries are present in the kernel + cmd = folly::to("ip route list | grep ", intfIp); + + output = runShellCmd(cmd); + + EXPECT_TRUE( + output.find(folly::to(intfIp)) != std::string::npos); + + // Clear kernel entries + clearKernelEntries(); + + // Check that the kernel entries are removed + checkKernelEntriesRemoved(); + }; + + verifyAcrossWarmBoots(setup, verify); +} + +} // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp index ed7e36c339369..3e7a48d18818d 100644 --- a/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp @@ -1,6 +1,7 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include "fboss/agent/DsfStateUpdaterUtil.h" +#include "fboss/agent/FabricConnectivityManager.h" #include "fboss/agent/FbossHwUpdateError.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/hw/HwResourceStatsPublisher.h" @@ -214,12 +215,12 @@ class AgentVoqSwitchTest : public AgentHwTest { } int sendPacket( - const folly::IPAddressV6& dstIp, + const folly::IPAddress& dstIp, std::optional frontPanelPort, std::optional> payload = std::optional>(), int dscp = 0x24) { - folly::IPAddressV6 kSrcIp("1::1"); + folly::IPAddress kSrcIp(dstIp.isV6() ? "1::1" : "1.0.0.1"); const auto srcMac = utility::kLocalCpuMac(); const auto dstMac = utility::kLocalCpuMac(); @@ -249,15 +250,18 @@ class AgentVoqSwitchTest : public AgentHwTest { return txPacketSize; } - SystemPortID getSystemPortID(const PortDescriptor& port) { + SystemPortID getSystemPortID( + const PortDescriptor& port, + cfg::Scope portScope) { auto switchId = scopeResolver().scope(getProgrammedState(), port).switchId(); - auto sysPortRange = getProgrammedState() - ->getDsfNodes() - ->getNodeIf(switchId) - ->getSystemPortRange(); - CHECK(sysPortRange.has_value()); - return SystemPortID(port.intID() + *sysPortRange->minimum()); + const auto& dsfNode = + getProgrammedState()->getDsfNodes()->getNodeIf(switchId); + auto sysPortOffset = portScope == cfg::Scope::GLOBAL + ? dsfNode->getGlobalSystemPortOffset() + : dsfNode->getLocalSystemPortOffset(); + CHECK(sysPortOffset.has_value()); + return SystemPortID(port.intID() + *sysPortOffset); } std::string kDscpAclName() const { @@ -495,6 +499,10 @@ class AgentVoqSwitchWithFabricPortsTest : public AgentVoqSwitchTest { // Allow disabling of looped ports. This should // be a noop for VOQ switches FLAGS_disable_looped_fabric_ports = true; + // Fabric connectivity manager to expect single NPU + if (!FLAGS_multi_switch) { + FLAGS_janga_single_npu_for_testing = true; + } } }; @@ -543,7 +551,12 @@ TEST_F(AgentVoqSwitchWithFabricPortsTest, collectStats) { if (port->getPortType() == cfg::PortType::FABRIC_PORT) { EXPECT_EVENTUALLY_TRUE(loadBearingInErrors.has_value()); EXPECT_EVENTUALLY_TRUE(loadBearingFecErrors.has_value()); - EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + if (getAgentEnsemble()->getBootType() == BootType::COLD_BOOT) { + EXPECT_EVENTUALLY_TRUE(loadBearingFlaps.has_value()); + } else { + // No port flap after wb, hence there no stats being recorded + EXPECT_FALSE(loadBearingFlaps.has_value()); + } } else { EXPECT_FALSE(loadBearingInErrors.has_value()); EXPECT_FALSE(loadBearingFecErrors.has_value()); @@ -1046,7 +1059,7 @@ TEST_F(AgentVoqSwitchTest, sendPacketCpuAndFrontPanel) { getLatestPortStats(kPort.phyPortID()).get_queueOutBytes_()); }; auto getAllVoQOutBytes = [kPort, this]() { - return getLatestSysPortStats(getSystemPortID(kPort)) + return getLatestSysPortStats(getSystemPortID(kPort, cfg::Scope::GLOBAL)) .get_queueOutBytes_(); }; auto getAclPackets = [this]() { @@ -1468,7 +1481,7 @@ TEST_F(AgentVoqSwitchTest, verifyQueueLatencyWatermark) { utility::setPortTx(getAgentEnsemble(), kPort.phyPortID(), true); WITH_RETRIES({ auto queueLatencyWatermarkNsec = - *getLatestSysPortStats(getSystemPortID(kPort)) + *getLatestSysPortStats(getSystemPortID(kPort, cfg::Scope::GLOBAL)) .queueLatencyWatermarkNsec_(); XLOG(DBG2) << "Port: " << kPort.phyPortID() << " voq queueId: " << queueId << " latency watermark: " << queueLatencyWatermarkNsec[queueId] @@ -1907,6 +1920,75 @@ TEST_F(AgentVoqSwitchWithMultipleDsfNodesTest, voqTailDropCounter) { verifyAcrossWarmBoots(setup, verify); }; +TEST_F( + AgentVoqSwitchWithMultipleDsfNodesTest, + sendPktsToRemoteUnresolvedNeighbor) { + auto constexpr kRemotePortId = 401; + const SystemPortID kRemoteSysPortId(kRemotePortId); + auto setup = [=, this]() { + // in addRemoteIntfNodeCfg, we use numCores to calculate the remoteSwitchId + // keeping remote switch id passed below in sync with it + int numCores = + utility::checkSameAndGetAsic(getAgentEnsemble()->getL3Asics()) + ->getNumCores(); + applyNewState([&](const std::shared_ptr& in) { + return utility::addRemoteSysPort( + in, + scopeResolver(), + kRemoteSysPortId, + static_cast( + numCores * getAgentEnsemble()->getNumL3Asics())); + }); + const InterfaceID kIntfId(kRemotePortId); + applyNewState([&](const std::shared_ptr& in) { + return utility::addRemoteInterface( + in, + scopeResolver(), + kIntfId, + { + {folly::IPAddress("100::1"), 64}, + {folly::IPAddress("100.0.0.1"), 24}, + }); + }); + }; + + auto verify = [=, this]() { + PortID portId = masterLogicalInterfacePortIds()[0]; + folly::IPAddressV6 kNeighbor6Ip("100::2"); + folly::IPAddressV4 kNeighbor4Ip("100.0.0.2"); + auto portStatsBefore = getLatestPortStats(portId); + auto switchDropStatsBefore = getAggregatedSwitchDropStats(); + sendPacket(kNeighbor6Ip, portId); + sendPacket(kNeighbor4Ip, portId); + WITH_RETRIES({ + auto portStatsAfter = getLatestPortStats(portId); + auto switchDropStatsAfter = getAggregatedSwitchDropStats(); + EXPECT_EVENTUALLY_EQ( + 2, + *portStatsAfter.inDiscardsRaw_() - *portStatsBefore.inDiscardsRaw_()); + EXPECT_EVENTUALLY_EQ( + 2, + *portStatsAfter.inDstNullDiscards_() - + *portStatsBefore.inDstNullDiscards_()); + EXPECT_EVENTUALLY_EQ( + *portStatsAfter.inDiscardsRaw_(), + *portStatsAfter.inDstNullDiscards_()); + EXPECT_EVENTUALLY_EQ( + *switchDropStatsAfter.ingressPacketPipelineRejectDrops() - + *switchDropStatsBefore.ingressPacketPipelineRejectDrops(), + 2); + // Pipeline reject drop, not a queue resolution drop, + // which happens say when a pkt comes in with a non router + // MAC + EXPECT_EQ( + *switchDropStatsAfter.queueResolutionDrops() - + *switchDropStatsBefore.queueResolutionDrops(), + 0); + }); + }; + verifyAcrossWarmBoots(setup, verify); +}; + TEST_F(AgentVoqSwitchWithMultipleDsfNodesTest, verifyDscpToVoqMapping) { folly::IPAddressV6 kNeighborIp("100::2"); auto constexpr remotePortId = 401; @@ -2014,7 +2096,7 @@ class AgentVoqSwitchFullScaleDsfNodesTest : public AgentVoqSwitchTest { // Resolve and return list of local nhops (only NIF ports) std::vector resolveLocalNhops( utility::EcmpSetupTargetedPorts6& ecmpHelper) { - std::vector portDescs = getLocalSysPortDesc(); + std::vector portDescs = getInterfacePortSysPortDesc(); applyNewState([&](const std::shared_ptr& in) { auto out = in->clone(); @@ -2062,7 +2144,7 @@ class AgentVoqSwitchFullScaleDsfNodesTest : public AgentVoqSwitchTest { return sysPortDescs; } - std::vector getLocalSysPortDesc() { + std::vector getInterfacePortSysPortDesc() { auto ports = getProgrammedState()->getPorts()->getAllNodes(); std::vector portDescs; std::for_each( @@ -2071,8 +2153,8 @@ class AgentVoqSwitchFullScaleDsfNodesTest : public AgentVoqSwitchTest { [this, &portDescs](const auto& idAndPort) { const auto port = idAndPort.second; if (port->getPortType() == cfg::PortType::INTERFACE_PORT) { - portDescs.push_back( - PortDescriptor(getSystemPortID(PortDescriptor(port->getID())))); + portDescs.push_back(PortDescriptor(getSystemPortID( + PortDescriptor(port->getID()), cfg::Scope::GLOBAL))); } }); return portDescs; @@ -2096,6 +2178,10 @@ class AgentVoqSwitchFullScaleDsfNodesWithFabricPortsTest AgentVoqSwitchFullScaleDsfNodesTest::setCmdLineFlagOverrides(); // Unhide fabric ports FLAGS_hide_fabric_ports = false; + // Fabric connectivity manager to expect single NPU + if (!FLAGS_multi_switch) { + FLAGS_janga_single_npu_for_testing = true; + } } }; @@ -2204,7 +2290,7 @@ TEST_F(AgentVoqSwitchFullScaleDsfNodesTest, remoteAndLocalLoadBalance) { auto verify = [&]() { std::vector sysPortDescs; auto remoteSysPortDescs = getRemoteSysPortDesc(); - auto localSysPortDescs = getLocalSysPortDesc(); + auto localSysPortDescs = getInterfacePortSysPortDesc(); sysPortDescs.insert( sysPortDescs.end(), @@ -2252,10 +2338,8 @@ TEST_F(AgentVoqSwitchFullScaleDsfNodesTest, remoteAndLocalLoadBalance) { TEST_F(AgentVoqSwitchFullScaleDsfNodesTest, stressProgramEcmpRoutes) { auto kEcmpWidth = getMaxEcmpWidth(); - // Stress add/delete 40 iterations of 5 routes with ECMP width. - // 40 iterations take ~17 mins on j3. const auto routeScale = 5; - const auto numIterations = 40; + const auto numIterations = 20; auto setup = [&]() { setupRemoteIntfAndSysPorts(); utility::EcmpSetupTargetedPorts6 ecmpHelper(getProgrammedState()); @@ -2432,4 +2516,35 @@ TEST_F( verifyAcrossWarmBoots(setup, verify); } +class AgentVoqSwitchConditionalEntropyTest : public AgentVoqSwitchTest { + public: + cfg::SwitchConfig initialConfig( + const AgentEnsemble& ensemble) const override { + auto cfg = AgentVoqSwitchTest::initialConfig(ensemble); + // Enable Conditional Entropy on Interface Ports + for (auto& port : *cfg.ports()) { + if (port.portType() == cfg::PortType::INTERFACE_PORT) { + port.conditionalEntropyRehash() = true; + } + } + return cfg; + } +}; + +TEST_F(AgentVoqSwitchConditionalEntropyTest, init) { + auto setup = []() {}; + + auto verify = [this]() { + auto state = getProgrammedState(); + for (const auto& portMap : std::as_const(*state->getPorts())) { + for (const auto& port : std::as_const(*portMap.second)) { + if (port.second->getPortType() == cfg::PortType::INTERFACE_PORT) { + EXPECT_TRUE(port.second->getConditionalEntropyRehash()); + } + } + } + // TODO: Program ECMP route, insert traffic and verify change in next hop. + }; + verifyAcrossWarmBoots(setup, verify); +} } // namespace facebook::fboss diff --git a/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp b/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp index d3bb72d141f78..4f2a3d8d96b50 100644 --- a/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp +++ b/fboss/agent/test/agent_hw_tests/AgentWatermarkTests.cpp @@ -126,8 +126,7 @@ class AgentWatermarkTest : public AgentHwTest { } else { auto systemPortId = getSystemPortID( portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), + getProgrammedState(), scopeResolver().scope(portId).switchId()); portName = getProgrammedState() ->getSystemPorts() @@ -152,10 +151,7 @@ class AgentWatermarkTest : public AgentHwTest { bool isVoq) { if (isVoq) { auto sysPortId = getSystemPortID( - portId, - utility::getFirstNodeIf(getProgrammedState()->getSwitchSettings()) - ->getSwitchIdToSwitchInfo(), - switchIdForPort(portId)); + portId, getProgrammedState(), switchIdForPort(portId)); return *getLatestSysPortStats(sysPortId).queueWatermarkBytes_(); } else { return *getLatestPortStats(portId).queueWatermarkBytes_(); diff --git a/fboss/agent/test/agent_hw_tests/BUCK b/fboss/agent/test/agent_hw_tests/BUCK index aba568e27d059..d889ace4fc957 100644 --- a/fboss/agent/test/agent_hw_tests/BUCK +++ b/fboss/agent/test/agent_hw_tests/BUCK @@ -37,6 +37,7 @@ cpp_library( "AgentLoopBackTests.cpp", "AgentMacLearningAndNeighborResolutionTests.cpp", "AgentMacLearningTests.cpp", + "AgentMemoryUsageTests.cpp", "AgentMirroringTests.cpp", "AgentMmuTuningTests.cpp", "AgentNeighborTests.cpp", @@ -46,6 +47,7 @@ cpp_library( "AgentPacketSendTests.cpp", "AgentPfcTests.cpp", "AgentPortBandWidthTests.cpp", + "AgentPortTests.cpp", "AgentPrbsTests.cpp", "AgentQueuePerHostL2Tests.cpp", "AgentQueuePerHostRouteTests.cpp", @@ -53,6 +55,7 @@ cpp_library( "AgentRouteOverDifferentAddressFamilyNhopTests.cpp", "AgentRouteOverflowTests.cpp", "AgentRouteScaleTests.cpp", + "AgentRouteTests.cpp", "AgentRxReasonTests.cpp", "AgentSendPacketToQueueTests.cpp", "AgentSflowMirrorTest.cpp", @@ -61,6 +64,7 @@ cpp_library( "AgentSwitchStatsTxCounterTests.cpp", "AgentTrafficPfcTests.cpp", "AgentTrunkLoadBalancerTests.cpp", + "AgentTunnelMgrTests.cpp", "AgentVoqSwitchInterruptsTests.cpp", "AgentVoqSwitchTests.cpp", "AgentWatermarkTests.cpp", @@ -119,6 +123,7 @@ cpp_library( "fbcode//fboss/agent/test/utils:load_balancer_test_utils", "fbcode//fboss/agent/test/utils:mac_test_utils", "fbcode//fboss/agent/test/utils:mirror_test_utils", + "fbcode//fboss/agent/test/utils:multi_port_traffic_test_utils", "fbcode//fboss/agent/test/utils:olympic_qos_utils", "fbcode//fboss/agent/test/utils:packet_snooper", "fbcode//fboss/agent/test/utils:pkt_test_utils", @@ -161,14 +166,17 @@ cpp_library( "//fboss/agent/hw/test:config_factory", "//fboss/agent/hw/test:hw_test_acl_utils", "//fboss/agent/hw/test:prod_config_factory", + "//fboss/agent/if:common-cpp2-types", "//fboss/agent/packet:ether_type", "//fboss/agent/packet:packet", "//fboss/agent/packet:packet_factory", "//fboss/agent/packet:pktutil", "//fboss/agent/rib:fib_updater", "//fboss/agent/state:label_forwarding_action", + "//fboss/agent/state:nodebase", "//fboss/agent/state:state", "//fboss/agent/state:state_utils", + "//fboss/agent/test:agent_ensemble", "//fboss/agent/test:agent_hw_test", "//fboss/agent/test:ecmp_helper", "//fboss/agent/test:production_features-cpp2-types", @@ -210,6 +218,7 @@ cpp_library( "//folly:network_address", "//folly/json:dynamic", "//folly/logging:logging", + "//folly/memory:mallctl_helper", "//folly/testing:test_util", ], exported_external_deps = [ @@ -334,6 +343,7 @@ _sai_agent_scale_test_prefix = "sai_agent_scale_test" "//fboss/agent/hw/sai/hw_test:sai_acl_utils{}".format(to_impl_suffix(sai_impl)), "//fboss/agent/platforms/sai:{}".format(sai_switch_dependent_name("sai_platform", sai_impl, True)), "//fboss/agent/test:mono_agent_ensemble", + "//fboss/agent/hw/sai/hw_test:{}".format(sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True)), ] + (["//fboss/agent/platforms/sai:bcm-required-symbols"] if sai_impl.name == "fake" or sai_impl.name == "leaba" else []), ) for sai_impl in SAI_BRCM_IMPLS + SAI_LEABA_IMPLS diff --git a/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp b/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp index 8b1b2b3e41253..8d8bf150a1d67 100644 --- a/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp +++ b/fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp @@ -77,7 +77,7 @@ TEST_F(MultiNodeAgentVoqSwitchTest, verifyInbandPing) { auto switchId = SwitchID(switchSettings->getSwitchIdToSwitchInfo().begin()->first); auto recyclePortIntfID = - getRecyclePortIntfID(getProgrammedState(), switchId); + getInbandPortIntfID(getProgrammedState(), switchId); auto recyclePortIntf = folly::to("fboss", recyclePortIntfID); auto cmd = folly::to( "/usr/sbin/fping6 -I ", recyclePortIntf, " ", ipAddrsToPing); diff --git a/fboss/agent/test/integration_tests/integration_tests.bzl b/fboss/agent/test/integration_tests/integration_tests.bzl deleted file mode 100644 index 233612d54f886..0000000000000 --- a/fboss/agent/test/integration_tests/integration_tests.bzl +++ /dev/null @@ -1,58 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -def _sai_integration_test_binary(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - test_deps = [ - "//fboss/agent/test/integration_tests:agent_integration_test", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent:main-bcm", - "//folly/io/async:async_signal_handler", - "//fboss/agent/test:agent_integration_test_base", - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - return cpp_binary( - name = "sai_agent_integration_test-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "SaiAgentIntegrationTests.cpp", - ], - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def _sai_te_integration_test_binary(sai_impl): - impl_suffix = to_impl_suffix(sai_impl) - test_deps = [ - "//fboss/agent/test/integration_tests:te_agent_integration_test", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_teflow_utils{}".format(impl_suffix), - "//fboss/agent:main-bcm", - "//folly/io/async:async_signal_handler", - "//fboss/agent/test:agent_integration_test_base", - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - return cpp_binary( - name = "sai_te_agent_integration_test-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "SaiAgentIntegrationTests.cpp", - ], - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def all_sai_integration_test_binaries(): - for sai_impl in get_all_impls_for(True): - _sai_integration_test_binary(sai_impl) - _sai_te_integration_test_binary(sai_impl) diff --git a/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp index a4c5f25b872ff..790df09f48e3c 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleEmptyLinkTest.cpp @@ -7,7 +7,14 @@ using namespace ::testing; using namespace facebook::fboss; -class AgentEnsembleEmptyLinkTest : public AgentEnsembleLinkTest {}; +class AgentEnsembleEmptyLinkTest : public AgentEnsembleLinkTest { + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST, + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } +}; TEST_F(AgentEnsembleEmptyLinkTest, CheckInit) { verifyAcrossWarmBoots( diff --git a/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp index 788b7d5011f5d..39c70e02ab3a1 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLacpSanityTests.cpp @@ -27,6 +27,12 @@ class AgentEnsembleLacpTest : public AgentEnsembleLinkTest { AgentEnsembleLinkTest::setCmdLineFlagOverrides(); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void programCabledAggPorts() { auto config = getSw()->getConfig(); diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp index c2d8587b782a3..320bc218aeab0 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkSanityTests.cpp @@ -42,6 +42,20 @@ bool isEqual( getChannelId(left) == getChannelId(right) && getChannels(left) == getChannels(right); } + +// For some reason this flag always evaluates as false if we hardcode the string +// So return it from a function instead +const std::string qsfpUtilPrefix() { + return FLAGS_multi_npu_platform_mapping + ? "wedge_qsfp_util --multi-npu-platform-mapping " + : "wedge_qsfp_util "; +} + +const std::vector l1LinkTestNames = {"qsfpWarmbootIsHitLess"}; + +const std::vector l2LinkTestNames = { + "warmbootIsHitLess", + "ptpEnableIsHitless"}; } // namespace class AgentEnsembleLinkSanityTestDataPlaneFlood : public AgentEnsembleLinkTest { @@ -52,6 +66,25 @@ class AgentEnsembleLinkSanityTestDataPlaneFlood : public AgentEnsembleLinkTest { setupTtl0ForwardingEnable(); return AgentEnsembleLinkTest::initialConfig(ensemble); } + std::vector + getProductionFeatures() const override { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } + } }; // Tests that the link comes up after a flap on the ASIC @@ -229,7 +262,7 @@ TEST_F(AgentEnsembleLinkSanityTestDataPlaneFlood, ptpEnableIsHitless) { TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { auto [opticalPorts, opticalPortNames] = getOpticalCabledPortsAndNames(); EXPECT_FALSE(opticalPorts.empty()) - << "opticsTxDisableEnable: Did not detect any optical transceivers"; + << "opticsTxDisableRandomPorts: Did not detect any optical transceivers"; auto connectedPairPortIds = getConnectedOpticalPortPairWithFeature( TransceiverFeature::TX_DISABLE, phy::Side::LINE); @@ -275,7 +308,7 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 3. Disable the randomly selected port from step 1 const std::string txDisableCmd = - "wedge_qsfp_util " + disabledPortNames + " --tx_disable"; + qsfpUtilPrefix() + disabledPortNames + " --tx_disable"; XLOG(DBG2) << fmt::format( "opticsTxDisableRandomPorts: Disabling ports using command: {:s}", txDisableCmd); @@ -287,7 +320,8 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 4. Verify all Expected Down ports from step 2 go Down EXPECT_NO_THROW(waitForLinkStatus(expectedDownPorts, false)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx disabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx disabled for {:s}", + disabledPortNames); // 5. Verify thet expected Up ports (all optical ports - expected Down ports) // keep @@ -296,7 +330,7 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 6. Enable the randomly selected port from step 1 const std::string txEnableCmd = - "wedge_qsfp_util " + disabledPortNames + " --tx_enable"; + qsfpUtilPrefix() + disabledPortNames + " --tx_enable"; XLOG(DBG2) << fmt::format( "opticsTxDisableRandomPorts: Enabling ports using command: {:s}", txEnableCmd); @@ -308,7 +342,8 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableRandomPorts) { // 7. Make sure all the ports are Up again EXPECT_NO_THROW(waitForLinkStatus(opticalPorts, true)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx enabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx enabled for {:s}", + disabledPortNames); } TEST_F(AgentEnsembleLinkTest, opticsTxDisableEnable) { @@ -317,7 +352,7 @@ TEST_F(AgentEnsembleLinkTest, opticsTxDisableEnable) { << "opticsTxDisableEnable: Did not detect any optical transceivers"; if (!opticalPorts.empty()) { - opticalPortNames = "wedge_qsfp_util " + opticalPortNames; + opticalPortNames = qsfpUtilPrefix() + opticalPortNames; const std::string txDisableCmd = opticalPortNames + "--tx-disable"; XLOG(DBG2) << "opticsTxDisableEnable: About to execute cmd: " @@ -375,7 +410,7 @@ TEST_F(AgentEnsembleLinkTest, testOpticsRemediation) { } const std::string txDisableCmd = - "wedge_qsfp_util " + disabledPortNames + " --tx-disable"; + qsfpUtilPrefix() + disabledPortNames + " --tx-disable"; // @lint-ignore CLANGTIDY folly::Subprocess(txDisableCmd).waitChecked(); diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp index 65af98b1f78b3..db2dcb13c9f4a 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.cpp @@ -25,9 +25,41 @@ #include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include "fboss/qsfp_service/if/gen-cpp2/transceiver_types_custom_protocol.h" +DEFINE_bool( + list_production_feature, + false, + "List production feature needed for every single test."); + +namespace { +int kArgc; +char** kArgv; + +const std::vector l1LinkTestNames = { + "asicLinkFlap", + "getTransceivers", + "opticsTxDisableRandomPorts", + "opticsTxDisableEnable", + "testOpticsRemediation", + "qsfpColdbootAfterAgentUp", + "fabricLinkHealth", + "opticsVdmPerformanceMonitoring", + "iPhyInfoTest", + "xPhyInfoTest", + "verifyIphyFecCounters", + "verifyIphyFecBerCounters"}; + +const std::vector l2LinkTestNames = {"trafficRxTx", "ecmpShrink"}; +} // namespace + namespace facebook::fboss { void AgentEnsembleLinkTest::SetUp() { + gflags::ParseCommandLineFlags(&kArgc, &kArgv, false); + if (FLAGS_list_production_feature) { + printProductionFeatures(); + GTEST_SKIP() << "Skipping this test because list_production_feature is set"; + return; + } AgentEnsembleTest::SetUp(); initializeCabledPorts(); // Wait for all the cabled ports to link up before finishing the setup @@ -37,17 +69,19 @@ void AgentEnsembleLinkTest::SetUp() { } void AgentEnsembleLinkTest::TearDown() { - // Expect the qsfp service to be running at the end of the tests - auto qsfpServiceClient = utils::createQsfpServiceClient(); - EXPECT_EQ( - facebook::fb303::cpp2::fb_status::ALIVE, - qsfpServiceClient.get()->sync_getStatus()) - << "QSFP Service no longer alive after the test"; - EXPECT_EQ( - QsfpServiceRunState::ACTIVE, - qsfpServiceClient.get()->sync_getQsfpServiceRunState()) - << "QSFP Service run state no longer active after the test"; - AgentEnsembleTest::TearDown(); + if (!FLAGS_list_production_feature) { + // Expect the qsfp service to be running at the end of the tests + auto qsfpServiceClient = utils::createQsfpServiceClient(); + EXPECT_EQ( + facebook::fb303::cpp2::fb_status::ALIVE, + qsfpServiceClient.get()->sync_getStatus()) + << "QSFP Service no longer alive after the test"; + EXPECT_EQ( + QsfpServiceRunState::ACTIVE, + qsfpServiceClient.get()->sync_getQsfpServiceRunState()) + << "QSFP Service run state no longer active after the test"; + AgentEnsembleTest::TearDown(); + } } void AgentEnsembleLinkTest::setCmdLineFlagOverrides() const { @@ -517,12 +551,42 @@ void AgentEnsembleLinkTest::setForceTrafficOverFabric(bool force) { }); } +std::vector +AgentEnsembleLinkTest::getProductionFeatures() const { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } +} + +void AgentEnsembleLinkTest::printProductionFeatures() const { + std::vector supportedFeatures; + for (const auto& feature : getProductionFeatures()) { + supportedFeatures.push_back(apache::thrift::util::enumNameSafe(feature)); + } + std::cout << "Feature List: " << folly::join(",", supportedFeatures) << "\n"; +} + int agentEnsembleLinkTestMain( int argc, char** argv, PlatformInitFn initPlatformFn, std::optional streamType) { ::testing::InitGoogleTest(&argc, argv); + kArgc = argc; + kArgv = argv; initAgentEnsembleTest(argc, argv, initPlatformFn, streamType); return RUN_ALL_TESTS(); } diff --git a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h index ebc496824003a..2fabe4b9465ca 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h +++ b/fboss/agent/test/link_tests/AgentEnsembleLinkTest.h @@ -9,10 +9,12 @@ #include "fboss/lib/phy/gen-cpp2/phy_types.h" #include +#include "fboss/agent/test/link_tests/gen-cpp2/link_test_production_features_types.h" DECLARE_string(config); DECLARE_bool(link_stress_test); DECLARE_bool(disable_neighbor_updates); +DECLARE_bool(list_production_feature); namespace facebook::fboss { @@ -105,6 +107,8 @@ class AgentEnsembleLinkTest : public AgentEnsembleTest { void setForceTrafficOverFabric(bool force); + void printProductionFeatures() const; + private: void programDefaultRoute( const boost::container::flat_set& ecmpPorts, @@ -112,6 +116,9 @@ class AgentEnsembleLinkTest : public AgentEnsembleTest { void initializeCabledPorts(); void logLinkDbgMessage(std::vector& portIDs) const override; + virtual std::vector + getProductionFeatures() const; + std::vector cabledPorts_; std::vector cabledFabricPorts_; std::set cabledTransceivers_; diff --git a/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp index 9be14b7e1ce72..0aafb7905bdac 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleMacLearningTests.cpp @@ -28,6 +28,12 @@ class AgentEnsembleMacLearningTest : public AgentEnsembleLinkTest { return AgentEnsembleLinkTest::initialConfig(ensemble); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void updateL2Aging(int ageout) { getSw()->updateStateBlocking("update L2 aging", [ageout](auto state) { diff --git a/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp b/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp index d5b67de49d80d..f5ec9af2cb381 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleOpenBmcUpgradeTests.cpp @@ -48,6 +48,12 @@ class AgentEnsembleOpenBmcUpgradeTest : public AgentEnsembleLinkTest { }); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: void openBmcSanityCheck() const { XLOG(DBG2) << "Checking ssh access to oob"; diff --git a/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp index 27edda685da1d..9b9d2095b74b1 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleOpticsTest.cpp @@ -105,6 +105,13 @@ void validateVdm( } // namespace class AgentEnsembleOpticsTest : public AgentEnsembleLinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + public: std::set> getConnectedOpticalPortPairs() const { // TransceiverFeature::NONE will get us all optical pairs. diff --git a/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp b/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp index 06692aa90658a..1aadea101b800 100644 --- a/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsemblePrbsTest.cpp @@ -83,18 +83,20 @@ class AgentEnsemblePrbsTest : public AgentEnsembleLinkTest { protected: void SetUp() override { AgentEnsembleLinkTest::SetUp(); - waitForLldpOnCabledPorts(); - - // Get the list of ports and their components to enable the test on - portsToTest_ = getPortsToTest(); - CHECK(!portsToTest_.empty()); - - for (auto testPort : portsToTest_) { - XLOG(DBG2) << "Will run the PRBS " - << apache::thrift::util::enumNameSafe(testPort.polynomial) - << " test on " - << apache::thrift::util::enumNameSafe(testPort.component) - << " on " << testPort.portName; + if (!IsSkipped()) { + waitForLldpOnCabledPorts(); + + // Get the list of ports and their components to enable the test on + portsToTest_ = getPortsToTest(); + CHECK(!portsToTest_.empty()); + + for (auto testPort : portsToTest_) { + XLOG(DBG2) << "Will run the PRBS " + << apache::thrift::util::enumNameSafe(testPort.polynomial) + << " test on " + << apache::thrift::util::enumNameSafe(testPort.component) + << " on " << testPort.portName; + } } } @@ -577,6 +579,13 @@ class AgentEnsemblePrbsTest : public AgentEnsembleLinkTest { template class TransceiverLineToTransceiverLinePrbsTest : public AgentEnsemblePrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; @@ -608,6 +617,13 @@ template < phy::PortComponent ComponentA, prbs::PrbsPolynomial PolynomialZ> class PhyToTransceiverSystemPrbsTest : public AgentEnsemblePrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { CHECK( @@ -637,6 +653,13 @@ class PhyToTransceiverSystemPrbsTest : public AgentEnsemblePrbsTest { template class AsicToAsicPrbsTest : public AgentEnsemblePrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; diff --git a/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp b/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp index 2702d4e40ff42..6dd3857b1208d 100644 --- a/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp +++ b/fboss/agent/test/link_tests/AgentEnsemblePtpTests.cpp @@ -24,6 +24,13 @@ const folly::IPAddressV6 kIPv6Dst = folly::IPAddressV6("2::1"); // arbit const auto kSrcMac = folly::MacAddress{"00:00:00:00:01:03"}; // arbit class AgentEnsemblePtpTests : public AgentEnsembleLinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: std::unique_ptr createPtpPkt( PTPMessageType ptpType) { diff --git a/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp b/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp index 42f0b38b35edb..ec01c96dc1b12 100644 --- a/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/AgentEnsembleSpeedChangeTest.cpp @@ -21,6 +21,13 @@ struct SpeedAndProfile { }; class AgentEnsembleSpeedChangeTest : public AgentEnsembleLinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void TearDown() override; void preInitSetup() override; @@ -229,14 +236,16 @@ cfg::SwitchConfig AgentEnsembleSpeedChangeTest::initialConfig( } void AgentEnsembleSpeedChangeTest::TearDown() { - if (!FLAGS_setup_for_warmboot) { - // If this test wasn't setup for warmboot, revert back the original config - // in FLAGS_config path. Also clean up the copy - boost::filesystem::copy_file( - originalConfigCopy, - FLAGS_config, - boost::filesystem::copy_option::overwrite_if_exists); - CHECK(removeFile(originalConfigCopy)); + if (!FLAGS_list_production_feature) { + if (!FLAGS_setup_for_warmboot) { + // If this test wasn't setup for warmboot, revert back the original config + // in FLAGS_config path. Also clean up the copy + boost::filesystem::copy_file( + originalConfigCopy, + FLAGS_config, + boost::filesystem::copy_option::overwrite_if_exists); + CHECK(removeFile(originalConfigCopy)); + } } AgentEnsembleLinkTest::TearDown(); } diff --git a/fboss/agent/test/link_tests/BUCK b/fboss/agent/test/link_tests/BUCK index 4f70abcdcc491..330e9cc8d89d4 100644 --- a/fboss/agent/test/link_tests/BUCK +++ b/fboss/agent/test/link_tests/BUCK @@ -1,5 +1,6 @@ load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") +load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library") load("//fboss:THIRD-PARTY-VERSIONS.bzl", "BCM_SDKS", "to_impl_suffix", "to_versions") load( "//fboss/agent/test/link_tests:link_tests.bzl", @@ -38,6 +39,7 @@ cpp_library( undefined_symbols = True, exported_deps = [ "fbsource//third-party/googletest:gtest", + ":link_test_production_features-cpp2-types", "//common/process:process", "//fboss/agent:agent_stats-cpp2-types", "//fboss/agent:core", @@ -136,6 +138,7 @@ cpp_library( undefined_symbols = True, exported_deps = [ "fbsource//third-party/googletest:gtest", + ":link_test_production_features-cpp2-types", "//fboss/agent:core", "//fboss/agent:fboss-error", "//fboss/agent:fboss-types", @@ -266,6 +269,7 @@ cpp_library( "fbcode//thrift/lib/cpp2/async:rocket_client_channel", "fbcode//thrift/lib/cpp2/protocol:protocol", "fbsource//third-party/googletest:gtest", + ":link_test_production_features-cpp2-types", "//common/process:process", "//fboss/agent:agent_stats-cpp2-types", "//fboss/agent:core", @@ -385,4 +389,31 @@ cpp_library( for sdk in BCM_SDKS ] +thrift_library( + name = "link_test_production_features", + go_thrift_namespaces = { + "link_test_production_features.thrift": "neteng.fboss.link_test_production_features", + }, + languages = [ + "cpp2", + "go", + "py", + "py3", + "py-asyncio", + "rust", + ], + py3_namespace = "neteng.fboss", + py_asyncio_base_module = "neteng.fboss.asyncio", + py_base_module = "neteng.fboss", + thrift_cpp2_options = "json", + thrift_py_options = "json,sort_keys", + thrift_rust_options = [ + "deprecated_default_enum_min_i32", + "serde", + ], + thrift_srcs = {"link_test_production_features.thrift": []}, + deps = [ + ], +) + all_sai_link_test_binaries() diff --git a/fboss/agent/test/link_tests/EmptyLinkTest.cpp b/fboss/agent/test/link_tests/EmptyLinkTest.cpp index 5fb759c21a134..23bde1ad1c131 100644 --- a/fboss/agent/test/link_tests/EmptyLinkTest.cpp +++ b/fboss/agent/test/link_tests/EmptyLinkTest.cpp @@ -7,7 +7,14 @@ using namespace ::testing; using namespace facebook::fboss; -class EmptyLinkTest : public LinkTest {}; +class EmptyLinkTest : public LinkTest { + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST, + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } +}; TEST_F(EmptyLinkTest, CheckInit) { verifyAcrossWarmBoots( diff --git a/fboss/agent/test/link_tests/LacpSanityTests.cpp b/fboss/agent/test/link_tests/LacpSanityTests.cpp index 9de6c00f92e54..b32da67a2d134 100644 --- a/fboss/agent/test/link_tests/LacpSanityTests.cpp +++ b/fboss/agent/test/link_tests/LacpSanityTests.cpp @@ -25,6 +25,12 @@ constexpr int kBaseAggId{500}; } // unnamed namespace class LacpTest : public LinkTest { + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + private: void setCmdLineFlagOverrides() const override { FLAGS_enable_lacp = true; diff --git a/fboss/agent/test/link_tests/LinkSanityTests.cpp b/fboss/agent/test/link_tests/LinkSanityTests.cpp index ba3d374c3ebb6..9de80924b7411 100644 --- a/fboss/agent/test/link_tests/LinkSanityTests.cpp +++ b/fboss/agent/test/link_tests/LinkSanityTests.cpp @@ -44,6 +44,11 @@ bool isEqual( getChannelId(left) == getChannelId(right) && getChannels(left) == getChannels(right); } +const std::vector l1LinkTestNames = {"qsfpWarmbootIsHitLess"}; + +const std::vector l2LinkTestNames = { + "warmbootIsHitLess", + "ptpEnableIsHitless"}; } // namespace class LinkSanityTestDataPlaneFlood : public LinkTest { @@ -53,6 +58,26 @@ class LinkSanityTestDataPlaneFlood : public LinkTest { << "setup up initial config for sw ttl0 to create dataplane flood"; setupTtl0ForwardingEnable(); } + + std::vector + getProductionFeatures() const override { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return {link_test_production_features::LinkTestProductionFeature:: + L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } + } }; // Tests that the link comes up after a flap on the ASIC @@ -235,7 +260,7 @@ TEST_F(LinkSanityTestDataPlaneFlood, ptpEnableIsHitless) { TEST_F(LinkTest, opticsTxDisableRandomPorts) { auto [opticalPorts, opticalPortNames] = getOpticalCabledPortsAndNames(); EXPECT_FALSE(opticalPorts.empty()) - << "opticsTxDisableEnable: Did not detect any optical transceivers"; + << "opticsTxDisableRandomPorts: Did not detect any optical transceivers"; auto connectedPairPortIds = getConnectedOpticalPortPairWithFeature( TransceiverFeature::TX_DISABLE, phy::Side::LINE); @@ -293,7 +318,8 @@ TEST_F(LinkTest, opticsTxDisableRandomPorts) { // 4. Verify all Expected Down ports from step 2 go Down EXPECT_NO_THROW(waitForLinkStatus(expectedDownPorts, false)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx disabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx disabled for {:s}", + disabledPortNames); // 5. Verify thet expected Up ports (all optical ports - expected Down ports) // keep @@ -314,7 +340,8 @@ TEST_F(LinkTest, opticsTxDisableRandomPorts) { // 7. Make sure all the ports are Up again EXPECT_NO_THROW(waitForLinkStatus(opticalPorts, true)); XLOG(DBG2) << fmt::format( - "opticsTxDisableEnable: link Tx enabled for {:s}", disabledPortNames); + "opticsTxDisableRandomPorts: link Tx enabled for {:s}", + disabledPortNames); } TEST_F(LinkTest, opticsTxDisableEnable) { diff --git a/fboss/agent/test/link_tests/LinkTest.cpp b/fboss/agent/test/link_tests/LinkTest.cpp index 2ae1b4102b8ae..fa7f06b20fea0 100644 --- a/fboss/agent/test/link_tests/LinkTest.cpp +++ b/fboss/agent/test/link_tests/LinkTest.cpp @@ -27,9 +27,42 @@ #include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include "fboss/qsfp_service/if/gen-cpp2/transceiver_types_custom_protocol.h" +DEFINE_bool( + list_production_feature, + false, + "List production feature needed for every single test."); + +namespace { +int kArgc; +char** kArgv; + +const std::vector l1LinkTestNames = { + "asicLinkFlap", + "getTransceivers", + "opticsTxDisableRandomPorts", + "opticsTxDisableEnable", + "testOpticsRemediation", + "qsfpColdbootAfterAgentUp", + "fabricLinkHealth", + "opticsVdmPerformanceMonitoring", + "iPhyInfoTest", + "xPhyInfoTest", + "verifyIphyFecCounters", + "verifyIphyFecBerCounters"}; + +const std::vector l2LinkTestNames = {"trafficRxTx", "ecmpShrink"}; +} // namespace + namespace facebook::fboss { void LinkTest::SetUp() { + gflags::ParseCommandLineFlags(&kArgc, &kArgv, false); + if (FLAGS_list_production_feature) { + printProductionFeatures(); + GTEST_SKIP() << "Skipping this test because list_production_feature is set"; + return; + } + AgentTest::SetUp(); initializeCabledPorts(); // Wait for all the cabled ports to link up before finishing the setup @@ -44,17 +77,19 @@ void LinkTest::SetUp() { } void LinkTest::TearDown() { - // Expect the qsfp service to be running at the end of the tests - auto qsfpServiceClient = utils::createQsfpServiceClient(); - EXPECT_EQ( - facebook::fb303::cpp2::fb_status::ALIVE, - qsfpServiceClient.get()->sync_getStatus()) - << "QSFP Service no longer alive after the test"; - EXPECT_EQ( - QsfpServiceRunState::ACTIVE, - qsfpServiceClient.get()->sync_getQsfpServiceRunState()) - << "QSFP Service run state no longer active after the test"; - AgentTest::TearDown(); + if (!FLAGS_list_production_feature) { + // Expect the qsfp service to be running at the end of the tests + auto qsfpServiceClient = utils::createQsfpServiceClient(); + EXPECT_EQ( + facebook::fb303::cpp2::fb_status::ALIVE, + qsfpServiceClient.get()->sync_getStatus()) + << "QSFP Service no longer alive after the test"; + EXPECT_EQ( + QsfpServiceRunState::ACTIVE, + qsfpServiceClient.get()->sync_getQsfpServiceRunState()) + << "QSFP Service run state no longer active after the test"; + AgentTest::TearDown(); + } } void LinkTest::setCmdLineFlagOverrides() const { @@ -511,12 +546,43 @@ std::vector> LinkTest::getPortPairsForFecErrInj() return supportedPorts; } +std::vector +LinkTest::getProductionFeatures() const { + const std::string testName = + testing::UnitTest::GetInstance()->current_test_info()->name(); + + if (std::find(l1LinkTestNames.begin(), l1LinkTestNames.end(), testName) != + l1LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } else if ( + std::find(l2LinkTestNames.begin(), l2LinkTestNames.end(), testName) != + l2LinkTestNames.end()) { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } else { + throw std::runtime_error( + "Test type (L1/L2) not specified for this test case"); + } +} + +void LinkTest::printProductionFeatures() const { + std::vector supportedFeatures; + for (const auto& feature : getProductionFeatures()) { + supportedFeatures.push_back(apache::thrift::util::enumNameSafe(feature)); + } + std::cout << "Feature List: " << folly::join(",", supportedFeatures) << "\n"; +} + int linkTestMain( int argc, char** argv, PlatformInitFn initPlatformFn, std::optional streamType) { ::testing::InitGoogleTest(&argc, argv); + + kArgc = argc; + kArgv = argv; initAgentTest(argc, argv, initPlatformFn, streamType); return RUN_ALL_TESTS(); } diff --git a/fboss/agent/test/link_tests/LinkTest.h b/fboss/agent/test/link_tests/LinkTest.h index 9588548aa880e..c271e45322501 100644 --- a/fboss/agent/test/link_tests/LinkTest.h +++ b/fboss/agent/test/link_tests/LinkTest.h @@ -9,6 +9,7 @@ #include "fboss/lib/phy/gen-cpp2/phy_types.h" #include +#include "fboss/agent/test/link_tests/gen-cpp2/link_test_production_features_types.h" // TODO Movng these to Linktestutils.h causes linker error. Resolve and move // them @@ -18,6 +19,7 @@ DECLARE_string(volatile_state_dir); DECLARE_bool(disable_neighbor_updates); DECLARE_bool(link_stress_test); DECLARE_bool(enable_macsec); +DECLARE_bool(list_production_feature); namespace facebook::fboss { @@ -110,6 +112,8 @@ class LinkTest : public AgentTest { std::vector> getPortPairsForFecErrInj() const; + void printProductionFeatures() const; + private: void programDefaultRoute( const boost::container::flat_set& ecmpPorts, @@ -117,6 +121,9 @@ class LinkTest : public AgentTest { void initializeCabledPorts(); void logLinkDbgMessage(std::vector& portIDs) const override; + virtual std::vector + getProductionFeatures() const; + std::vector cabledPorts_; std::vector cabledFabricPorts_; std::set cabledTransceivers_; diff --git a/fboss/agent/test/link_tests/MacLearningTests.cpp b/fboss/agent/test/link_tests/MacLearningTests.cpp index 378d576f50b73..7760c27ba437f 100644 --- a/fboss/agent/test/link_tests/MacLearningTests.cpp +++ b/fboss/agent/test/link_tests/MacLearningTests.cpp @@ -31,6 +31,11 @@ class MacLearningTest : public LinkTest { << "since changing mode is not fully supported on SAI"; overrideL2LearningConfig(true, kL2AgeTimer); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } public: void updateL2Aging(int ageout) { diff --git a/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp b/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp index 4cc5ef0b561e5..a89eb4becca56 100644 --- a/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp +++ b/fboss/agent/test/link_tests/OpenBmcUpgradeTests.cpp @@ -49,6 +49,12 @@ class OpenBmcUpgradeTest : public LinkTest { }); } + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: void openBmcSanityCheck() const { XLOG(DBG2) << "Checking ssh access to oob"; diff --git a/fboss/agent/test/link_tests/OpticsTest.cpp b/fboss/agent/test/link_tests/OpticsTest.cpp index 7985ed31214f9..015159508a7a8 100644 --- a/fboss/agent/test/link_tests/OpticsTest.cpp +++ b/fboss/agent/test/link_tests/OpticsTest.cpp @@ -100,6 +100,13 @@ void validateVdm( } // namespace class OpticsTest : public LinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + public: std::set> getConnectedOpticalPortPairs() const { // TransceiverFeature::NONE will get us all optical pairs. @@ -174,6 +181,14 @@ TEST_F(OpticsTest, verifyTxRxLatches) { auto& tcvrState = *tcvrInfoInfoItr->second.tcvrState(); auto mediaInterface = tcvrState.moduleMediaInterface().value_or({}); + ASSERT_EVENTUALLY_TRUE( + cachedHostLanes.find(portName) != cachedHostLanes.end()) + << folly::sformat( + "Port {} not found in cachedHostLanes", portName); + ASSERT_EVENTUALLY_TRUE( + cachedMediaLanes.find(portName) != cachedMediaLanes.end()) + << folly::sformat( + "Port {} not found in cachedMediaLanes", portName); auto& hostLanes = cachedHostLanes.at(portName); auto& mediaLanes = cachedMediaLanes.at(portName); auto& hostLaneSignals = *tcvrState.hostLaneSignals(); diff --git a/fboss/agent/test/link_tests/PrbsTest.cpp b/fboss/agent/test/link_tests/PrbsTest.cpp index e69f627b7f823..276711da31dfa 100644 --- a/fboss/agent/test/link_tests/PrbsTest.cpp +++ b/fboss/agent/test/link_tests/PrbsTest.cpp @@ -84,18 +84,21 @@ class PrbsTest : public LinkTest { protected: void SetUp() override { LinkTest::SetUp(); - waitForLldpOnCabledPorts(); - // Get the list of ports and their components to enable the test on - portsToTest_ = getPortsToTest(); - CHECK(!portsToTest_.empty()); + if (!IsSkipped()) { + waitForLldpOnCabledPorts(); + + // Get the list of ports and their components to enable the test on + portsToTest_ = getPortsToTest(); + CHECK(!portsToTest_.empty()); - for (auto testPort : portsToTest_) { - XLOG(DBG2) << "Will run the PRBS " - << apache::thrift::util::enumNameSafe(testPort.polynomial) - << " test on " - << apache::thrift::util::enumNameSafe(testPort.component) - << " on " << testPort.portName; + for (auto testPort : portsToTest_) { + XLOG(DBG2) << "Will run the PRBS " + << apache::thrift::util::enumNameSafe(testPort.polynomial) + << " test on " + << apache::thrift::util::enumNameSafe(testPort.component) + << " on " << testPort.portName; + } } } @@ -578,6 +581,13 @@ class PrbsTest : public LinkTest { template class TransceiverLineToTransceiverLinePrbsTest : public PrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; @@ -609,6 +619,13 @@ template < phy::PortComponent ComponentA, prbs::PrbsPolynomial PolynomialZ> class PhyToTransceiverSystemPrbsTest : public PrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L1_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { CHECK( @@ -638,6 +655,13 @@ class PhyToTransceiverSystemPrbsTest : public PrbsTest { template class AsicToAsicPrbsTest : public PrbsTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + protected: std::vector getPortsToTest() override { std::vector portsToTest; diff --git a/fboss/agent/test/link_tests/PtpTests.cpp b/fboss/agent/test/link_tests/PtpTests.cpp index 4f980c0a3765f..f7ac416d7a14a 100644 --- a/fboss/agent/test/link_tests/PtpTests.cpp +++ b/fboss/agent/test/link_tests/PtpTests.cpp @@ -25,6 +25,13 @@ const folly::IPAddressV6 kIPv6Dst = folly::IPAddressV6("2::1"); // arbit const auto kSrcMac = folly::MacAddress{"00:00:00:00:01:03"}; // arbit class PtpTests : public LinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: std::unique_ptr createPtpPkt( PTPMessageType ptpType) { diff --git a/fboss/agent/test/link_tests/SpeedChangeTest.cpp b/fboss/agent/test/link_tests/SpeedChangeTest.cpp index 2ac7f0f6aa300..fe7a66c948874 100644 --- a/fboss/agent/test/link_tests/SpeedChangeTest.cpp +++ b/fboss/agent/test/link_tests/SpeedChangeTest.cpp @@ -22,6 +22,13 @@ struct SpeedAndProfile { }; class SpeedChangeTest : public LinkTest { + private: + std::vector + getProductionFeatures() const override { + return { + link_test_production_features::LinkTestProductionFeature::L2_LINK_TEST}; + } + public: void TearDown() override; void setupConfigFlag() override; @@ -218,14 +225,16 @@ void SpeedChangeTest::setupConfigFlag() { } void SpeedChangeTest::TearDown() { - if (!FLAGS_setup_for_warmboot) { - // If this test wasn't setup for warmboot, revert back the original config - // in FLAGS_config path. Also clean up the copy - boost::filesystem::copy_file( - originalConfigCopy, - FLAGS_config, - boost::filesystem::copy_option::overwrite_if_exists); - CHECK(removeFile(originalConfigCopy)); + if (!FLAGS_list_production_feature) { + if (!FLAGS_setup_for_warmboot) { + // If this test wasn't setup for warmboot, revert back the original config + // in FLAGS_config path. Also clean up the copy + boost::filesystem::copy_file( + originalConfigCopy, + FLAGS_config, + boost::filesystem::copy_option::overwrite_if_exists); + CHECK(removeFile(originalConfigCopy)); + } } LinkTest::TearDown(); } diff --git a/fboss/agent/test/link_tests/link_test_production_features.thrift b/fboss/agent/test/link_tests/link_test_production_features.thrift new file mode 100644 index 0000000000000..dbcc82ca85a73 --- /dev/null +++ b/fboss/agent/test/link_tests/link_test_production_features.thrift @@ -0,0 +1,15 @@ +# +# Copyright 2004-present Facebook. All Rights Reserved. +# + +namespace py neteng.fboss.link_test_production_features +namespace py3 neteng.fboss +namespace py.asyncio neteng.fboss.asyncio.link_test_production_features +namespace cpp2 facebook.fboss.link_test_production_features +namespace go neteng.fboss.link_test_production_features +namespace php fboss_link_test_production_features + +enum LinkTestProductionFeature { + L1_LINK_TEST = 0, + L2_LINK_TEST = 1, +} diff --git a/fboss/agent/test/link_tests/link_tests.bzl b/fboss/agent/test/link_tests/link_tests.bzl deleted file mode 100644 index dec4e018b1453..0000000000000 --- a/fboss/agent/test/link_tests/link_tests.bzl +++ /dev/null @@ -1,62 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("//fboss/agent/hw/sai/impl:impl.bzl", "get_all_impls_for", "get_link_group_map", "to_impl_lib_name", "to_impl_suffix", "to_versions") -load("//fboss/agent/hw/sai/switch:switch.bzl", "sai_switch_dependent_name") - -TEST_BINARY_MODES = ["legacy", "mono", "multi"] - -def _sai_link_test_binary(sai_impl, mode): - impl_suffix = to_impl_suffix(sai_impl) - test_deps = [ - "//folly/logging:init", - "//fboss/agent/platforms/sai:{}".format( - sai_switch_dependent_name("sai_platform", sai_impl, True), - ), - "//fboss/agent/hw/sai/hw_test:sai_port_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_ecmp_utils{}".format(impl_suffix), - "//fboss/agent/hw/sai/hw_test:sai_fabric_utils{}".format(impl_suffix), - "//fboss/agent:main-sai-{}".format(to_impl_lib_name(sai_impl)), - "//fboss/agent/hw/sai/hw_test:sai_packet_trap_helper{}".format(impl_suffix), - ] - if sai_impl.name == "fake" or sai_impl.name == "leaba": - test_deps.append("//fboss/agent/platforms/sai:bcm-required-symbols") - - if mode == "mono": - agent_hw_test_thrift_handler = sai_switch_dependent_name("agent_hw_test_thrift_handler", sai_impl, True) - test_deps.append("//fboss/agent/test/link_tests:agent_ensemble_link_tests") - test_deps.append("//fboss/agent/hw/sai/hw_test:{}".format(agent_hw_test_thrift_handler)) - test_deps.append("//fboss/agent/test:mono_agent_ensemble") - name = "sai_mono_link_test-{}-{}".format(sai_impl.name, sai_impl.version) - srcs = [ - "SaiMonoLinkTest.cpp", - ] - elif mode == "multi": - test_deps.append("//fboss/agent/test/link_tests:agent_ensemble_link_tests") - test_deps.append("//fboss/agent/test:multi_switch_agent_ensemble") - name = "sai_multi_switch_link_test-{}-{}".format(sai_impl.name, sai_impl.version) - srcs = ["SaiMultiSwitchLinkTest.cpp"] - else: - # default case from before - test_deps.append("//fboss/agent/test/link_tests:link_tests") - name = "sai_link_test-{}-{}".format(sai_impl.name, sai_impl.version) - srcs = [ - "SaiLinkTest.cpp", - ] - - return cpp_binary( - name = name, - srcs = srcs, - linker_flags = [ - "--export-dynamic", - "--unresolved-symbols=ignore-all", - ] if sai_impl.name == "leaba" else [], - link_group_map = get_link_group_map(name, sai_impl), - deps = test_deps, - auto_headers = AutoHeaders.SOURCES, - versions = to_versions(sai_impl), - ) - -def all_sai_link_test_binaries(): - for mode in TEST_BINARY_MODES: - for sai_impl in get_all_impls_for(True): - _sai_link_test_binary(sai_impl, mode) diff --git a/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp b/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp index e3ea0be276d1a..655d325af5f79 100644 --- a/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp +++ b/fboss/agent/test/prod_agent_tests/ProdInvariantTests.cpp @@ -326,6 +326,7 @@ void ProdInvariantTest::verifySafeDiagCommands() { case cfg::AsicType::ASIC_TYPE_RAMON3: case cfg::AsicType::ASIC_TYPE_TOMAHAWK5: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: break; case cfg::AsicType::ASIC_TYPE_TRIDENT2: diff --git a/fboss/agent/test/production_features.thrift b/fboss/agent/test/production_features.thrift index 19df050545982..1e8a1a68e27e0 100644 --- a/fboss/agent/test/production_features.thrift +++ b/fboss/agent/test/production_features.thrift @@ -54,6 +54,8 @@ enum ProductionFeature { TH_ALPM_ROUTE_SCALE = 41, PFC = 42, UDF_WR_IMMEDIATE_ACL = 43, + VLAN = 44, + PORT_MTU_ERROR_TRAP = 45, # production feature which is present on all platforms, keep it at the end HW_SWITCH = 65536, } diff --git a/fboss/agent/test/utils/BUCK b/fboss/agent/test/utils/BUCK index 2e02cb0a2a5e9..454d13c7fffa4 100644 --- a/fboss/agent/test/utils/BUCK +++ b/fboss/agent/test/utils/BUCK @@ -35,6 +35,7 @@ cpp_library( "//fboss/agent:switch_config-cpp2-types", "//fboss/agent/hw:hardware_stats-cpp2-types", "//fboss/agent/hw/switch_asics:switch_asics", + "//fboss/agent/packet:packet", "//fboss/agent/packet:packet_factory", "//fboss/agent/state:state", "//fboss/agent/test:test_ensemble_if", @@ -154,6 +155,7 @@ cpp_library( ":asic_test_utils", ":port_test_utils", "//fboss/agent:agent_features", + "//fboss/agent:constants", "//fboss/agent:core", "//fboss/agent:fboss-error", "//fboss/agent:fboss-types", @@ -451,9 +453,10 @@ cpp_library( exported_deps = [ "fbsource//third-party/googletest:gtest", ":acl_test_utils", - "//fboss/agent:fboss-types", "//fboss/agent:switch_config-cpp2-types", "//fboss/agent:utils", + "//fboss/agent/hw:hardware_stats-cpp2-types", + "//fboss/agent/test:agent_hw_test", ], ) @@ -526,3 +529,20 @@ cpp_library( "//fboss/agent/hw/switch_asics:switch_asics", ], ) + +cpp_library( + name = "multi_port_traffic_test_utils", + srcs = [ + "MultiPortTrafficTestUtils.cpp", + ], + headers = [ + "MultiPortTrafficTestUtils.h", + ], + exported_deps = [ + ":qos_test_utils", + "//fboss/agent:utils", + "//fboss/agent/state:state_utils", + "//fboss/agent/test:agent_hw_test", + "//fboss/agent/test:ecmp_helper", + ], +) diff --git a/fboss/agent/test/utils/ConfigUtils.cpp b/fboss/agent/test/utils/ConfigUtils.cpp index 0e0aa3b37dee7..80fcba2ec31be 100644 --- a/fboss/agent/test/utils/ConfigUtils.cpp +++ b/fboss/agent/test/utils/ConfigUtils.cpp @@ -12,6 +12,7 @@ #include #include "fboss/agent/AgentFeatures.h" +#include "fboss/agent/Constants.h" #include "fboss/agent/FbossError.h" #include "fboss/agent/SwSwitch.h" #include "fboss/agent/test/TestEnsembleIf.h" @@ -367,8 +368,7 @@ void securePortsInConfig( cfg::DsfNode dsfNodeConfig( const HwAsic& myAsic, int64_t otherSwitchId, - std::optional systemPortMin, - std::optional systemPortMax, + cfg::SystemPortRanges sysPortRanges, const std::optional platformType) { auto createAsic = [&](const HwAsic& fromAsic, int64_t switchId) -> std::pair, PlatformType> { @@ -380,12 +380,16 @@ cfg::DsfNode dsfNodeConfig( auto blockSize = (*fromAsicSystemPortRange->maximum() - *fromAsicSystemPortRange->minimum() + 1) / numCores; - range.minimum() = systemPortMin.has_value() - ? kSysPortOffset + systemPortMin.value() - : kSysPortOffset + switchId * blockSize; - range.maximum() = systemPortMax.has_value() - ? kSysPortOffset + systemPortMax.value() - : *range.minimum() + numCores * blockSize - 1; + if (sysPortRanges.systemPortRanges()->size()) { + CHECK_EQ(sysPortRanges.systemPortRanges()->size(), 1) + << " Multiple sys port ranges per node are not supported yet in tests (TODO)"; + auto firstRange = *sysPortRanges.systemPortRanges()->begin(); + range.minimum() = kSysPortOffset + *firstRange.minimum(); + range.maximum() = kSysPortOffset + *firstRange.maximum(); + } else { + range.minimum() = kSysPortOffset + switchId * blockSize; + range.maximum() = *range.minimum() + numCores * blockSize - 1; + } systemPortRange = range; } auto localMac = utility::kLocalCpuMac(); @@ -430,6 +434,15 @@ cfg::DsfNode dsfNodeConfig( std::nullopt, localMac), PlatformType::PLATFORM_MERU800BFA); + case cfg::AsicType::ASIC_TYPE_CHENAB: + return std::pair( + std::make_unique( + fromAsic.getSwitchType(), + switchId, + fromAsic.getSwitchIndex(), + std::nullopt, + localMac), + PlatformType::PLATFORM_YANGRA); default: throw FbossError("Unexpected asic type: ", fromAsic.getAsicTypeStr()); } @@ -443,8 +456,13 @@ cfg::DsfNode dsfNodeConfig( dsfNode.type() = cfg::DsfNodeType::INTERFACE_NODE; CHECK(otherAsic->getSystemPortRange().has_value()); dsfNode.systemPortRange() = *otherAsic->getSystemPortRange(); + dsfNode.systemPortRanges()->systemPortRanges()->push_back( + dsfNode.systemPortRange().value()); dsfNode.nodeMac() = kLocalCpuMac().toString(); dsfNode.loopbackIps() = getLoopbackIps(SwitchID(*dsfNode.switchId())); + dsfNode.localSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); + dsfNode.globalSystemPortOffset() = *dsfNode.systemPortRange()->minimum(); + dsfNode.inbandPortId() = kSingleStageInbandPortId; break; case cfg::SwitchType::FABRIC: dsfNode.type() = cfg::DsfNodeType::FABRIC_NODE; @@ -659,14 +677,12 @@ cfg::SwitchConfig multiplePortsPerIntfConfig( continue; } auto mySwitchId = scopeResolver.scope(port).switchId(); - CHECK(config.dsfNodes()[mySwitchId].systemPortRange().has_value()); - auto sysportRangeBegin = - *config.dsfNodes()[mySwitchId].systemPortRange()->minimum(); - auto switchInfoItr = - config.switchSettings()->switchIdToSwitchInfo()->find(mySwitchId); - auto portIdRange = switchInfoItr->second.portIdRange(); - auto intfId = - sysportRangeBegin + *port.logicalID() - *portIdRange->minimum(); + auto sysPortId = getSystemPortID( + PortID(*port.logicalID()), + *port.scope(), + *config.switchSettings()->switchIdToSwitchInfo(), + SwitchID(mySwitchId)); + auto intfId = static_cast(sysPortId); std::optional> subnets; auto portScope = *platformMapping->getPlatformPort(*port.logicalID()) .mapping() @@ -754,6 +770,15 @@ cfg::SwitchConfig genPortVlanCfg( } if (asic->getSystemPortRange().has_value()) { switchInfo.systemPortRange() = *asic->getSystemPortRange(); + switchInfo.systemPortRanges()->systemPortRanges()->push_back( + *asic->getSystemPortRange()); + switchInfo.localSystemPortOffset() = + *asic->getSystemPortRange()->minimum(); + switchInfo.globalSystemPortOffset() = + *asic->getSystemPortRange()->minimum(); + } + if (switchType == cfg::SwitchType::VOQ) { + switchInfo.inbandPortId() = kSingleStageInbandPortId; } defaultSwitchIdToSwitchInfo.insert({SwitchID(switchId), switchInfo}); populateSwitchInfo( @@ -873,11 +898,7 @@ void populateSwitchInfo( newDsfNodes.insert( {switchId, dsfNodeConfig( - *hwAsic, - switchId, - std::nullopt /*systemPortMin*/, - std::nullopt /*systemPortMax*/, - platformType)}); + *hwAsic, switchId, cfg::SystemPortRanges(), platformType)}); } } config.switchSettings()->switchIdToSwitchInfo() = newSwitchIdToSwitchInfo; @@ -1012,15 +1033,22 @@ cfg::SwitchConfig twoL3IntfConfig( lbModeMap, supportsAddRemovePort); - auto computeIntfId = [&config, &ports, &switchType, &vlans](auto idx) { + auto computeIntfId = [&config, &platformMapping, &ports, &switchType, &vlans]( + auto idx) { if (switchType == cfg::SwitchType::NPU) { return static_cast(vlans[idx]); } auto mySwitchId = config.switchSettings()->switchIdToSwitchInfo()->begin()->first; - auto sysportRangeBegin = - *config.dsfNodes()[mySwitchId].systemPortRange()->minimum(); - return sysportRangeBegin + static_cast(ports[idx]); + + auto port = ports[idx]; + auto portScope = *platformMapping->getPlatformPort(port).mapping()->scope(); + auto sysPortId = getSystemPortID( + port, + portScope, + *config.switchSettings()->switchIdToSwitchInfo(), + SwitchID(mySwitchId)); + return static_cast(sysPortId); }; for (auto i = 0; i < ports.size(); ++i) { cfg::Interface intf; @@ -1325,15 +1353,18 @@ void configurePortProfile( void setupMultipleEgressPoolAndQueueConfigs( cfg::SwitchConfig& config, - const std::vector& losslessQueueIds) { + const std::vector& losslessQueueIds, + const uint64_t mmuSizeBytes) { const std::string kLosslessPoolName{"egress_lossless_pool"}; const std::string kLossyPoolName{"egress_lossy_pool"}; - // Create pool configs for 2 egress buffer pools + // Create pool configs for 2 egress buffer pools. The buffer pool + // sizing here is very specific to YUBA. A different allocation + // might be needed for other ASICs. cfg::BufferPoolConfig losslessPoolCfg; - losslessPoolCfg.sharedBytes() = 256 * 1024 * 1024; + losslessPoolCfg.sharedBytes() = mmuSizeBytes; cfg::BufferPoolConfig lossyPoolCfg; - lossyPoolCfg.sharedBytes() = 80 * 1024 * 1024; + lossyPoolCfg.sharedBytes() = mmuSizeBytes * 0.3; // 30% of MMU! std::map bufferPoolCfgMap = config.bufferPoolConfigs().ensure(); bufferPoolCfgMap.insert(std::make_pair(kLosslessPoolName, losslessPoolCfg)); @@ -1365,4 +1396,35 @@ void setupMultipleEgressPoolAndQueueConfigs( } } +bool isSaiConfig(const cfg::SwitchConfig& config) { + return config.sdkVersion().has_value() && + config.sdkVersion()->saiSdk().has_value() && + !config.sdkVersion()->saiSdk()->empty(); +} + +void modifyPlatformConfig( + cfg::PlatformConfig& config, + const std::function& modifyYamlFunc, + const std::function&)>& + modifyMapFunc) { + auto& chip = *config.chip(); + if (chip.getType() == chip.bcm) { + auto& bcm = chip.mutable_bcm(); + if (!bcm.yamlConfig().value_or("").empty()) { + // yamlConfig used for TH4 + modifyYamlFunc(*bcm.yamlConfig()); + } else { + modifyMapFunc(*bcm.config()); + } + } else if (chip.getType() == chip.asicConfig) { + auto& common = *(chip.mutable_asicConfig().common()); + if (common.getType() == common.yamlConfig) { + // yamlConfig used for TH4 + modifyYamlFunc(common.mutable_yamlConfig()); + } else if (common.getType() == common.config) { + modifyMapFunc(common.mutable_config()); + } + } +} + } // namespace facebook::fboss::utility diff --git a/fboss/agent/test/utils/ConfigUtils.h b/fboss/agent/test/utils/ConfigUtils.h index 9b42d43db368c..79017a216196a 100644 --- a/fboss/agent/test/utils/ConfigUtils.h +++ b/fboss/agent/test/utils/ConfigUtils.h @@ -12,6 +12,7 @@ #include "fboss/agent/FbossError.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" +#include "fboss/agent/hw/switch_asics/ChenabAsic.h" #include "fboss/agent/hw/switch_asics/EbroAsic.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" #include "fboss/agent/hw/switch_asics/Jericho2Asic.h" @@ -71,8 +72,7 @@ std::vector getLoopbackIps(SwitchID switchId); cfg::DsfNode dsfNodeConfig( const HwAsic& myAsic, int64_t otherSwitchId = 4, - std::optional systemPortMin = std::nullopt, - std::optional systemPortMax = std::nullopt, + cfg::SystemPortRanges = cfg::SystemPortRanges(), const std::optional platformType = std::nullopt); std::vector::iterator findCfgPort( @@ -276,5 +276,15 @@ void configurePortProfile( PortID controllingPortID); void setupMultipleEgressPoolAndQueueConfigs( cfg::SwitchConfig& config, - const std::vector& losslessQueueIds); + const std::vector& losslessQueueIds, + const uint64_t mmuSizeBytes); + +bool isSaiConfig(const cfg::SwitchConfig& config); + +void modifyPlatformConfig( + cfg::PlatformConfig& config, + const std::function& modifyYamlFunc, + const std::function&)>& + modifyMapFunc); + } // namespace facebook::fboss::utility diff --git a/fboss/agent/test/utils/CoppTestUtils.cpp b/fboss/agent/test/utils/CoppTestUtils.cpp index 753800ab6e30c..894f37c76d31a 100644 --- a/fboss/agent/test/utils/CoppTestUtils.cpp +++ b/fboss/agent/test/utils/CoppTestUtils.cpp @@ -15,6 +15,7 @@ #include "fboss/agent/SwSwitch.h" #include "fboss/agent/TxPacket.h" #include "fboss/agent/hw/switch_asics/HwAsic.h" +#include "fboss/agent/packet/ICMPHdr.h" #include "fboss/agent/packet/PktFactory.h" #include "fboss/agent/state/Interface.h" #include "fboss/agent/state/SwitchState.h" @@ -114,6 +115,7 @@ uint16_t getCoppHighPriQueueId(const HwAsic* hwAsic) { case cfg::AsicType::ASIC_TYPE_YUBA: case cfg::AsicType::ASIC_TYPE_JERICHO2: case cfg::AsicType::ASIC_TYPE_JERICHO3: + case cfg::AsicType::ASIC_TYPE_CHENAB: return 7; case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: @@ -153,6 +155,7 @@ cfg::ToCpuAction getCpuActionType(const HwAsic* hwAsic) { return cfg::ToCpuAction::COPY; case cfg::AsicType::ASIC_TYPE_JERICHO2: case cfg::AsicType::ASIC_TYPE_JERICHO3: + case cfg::AsicType::ASIC_TYPE_CHENAB: return cfg::ToCpuAction::TRAP; case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: @@ -205,7 +208,8 @@ uint32_t getCoppQueuePps(const HwAsic* hwAsic, uint16_t queueId) { uint32_t getCoppQueueKbpsFromPps(const HwAsic* hwAsic, uint32_t pps) { uint32_t kbps; - if (hwAsic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO) { + if (hwAsic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_TAJO || + hwAsic->getAsicVendor() == HwAsic::AsicVendor::ASIC_VENDOR_CHENAB) { kbps = (round(pps / 60) * 60) * (kAveragePacketSize + kCpuPacketOverheadBytes) * 8 / 1000; } else { @@ -493,6 +497,61 @@ void addHighPriAclForArp( acls.push_back(std::make_pair(acl2, action)); } +void addHighPriAclForNdp( + cfg::ToCpuAction toCpuAction, + int highPriQueueId, + std::vector>& acls, + bool isSai) { + cfg::Ttl ttl; + ttl.value() = 255; + ttl.mask() = 0xff; + auto action = createQueueMatchAction(highPriQueueId, isSai, toCpuAction); + + cfg::AclEntry acl1; + acl1.etherType() = cfg::EtherType::IPv6; + acl1.ttl() = ttl; + acl1.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_ROUTER_SOLICITATION); + acl1.name() = + folly::to("cpuPolicing-high-ndp-router-solicit-acl"); + acls.push_back(std::make_pair(acl1, action)); + + cfg::AclEntry acl2; + acl2.etherType() = cfg::EtherType::IPv6; + acl2.ttl() = ttl; + acl2.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_ROUTER_ADVERTISEMENT); + acl2.name() = + folly::to("cpuPolicing-high-ndp-router-advertisement-acl"); + acls.push_back(std::make_pair(acl2, action)); + + cfg::AclEntry acl3; + acl3.etherType() = cfg::EtherType::IPv6; + acl3.ttl() = ttl; + acl3.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_NEIGHBOR_SOLICITATION); + acl3.name() = + folly::to("cpuPolicing-high-ndp-neighbor-solicit-acl"); + acls.push_back(std::make_pair(acl3, action)); + + cfg::AclEntry acl4; + acl4.etherType() = cfg::EtherType::IPv6; + acl4.ttl() = ttl; + acl4.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_NEIGHBOR_ADVERTISEMENT); + acl4.name() = + folly::to("cpuPolicing-high-ndp-neighbor-advertisement-acl"); + acls.push_back(std::make_pair(acl4, action)); + + cfg::AclEntry acl5; + acl5.etherType() = cfg::EtherType::IPv6; + acl5.ttl() = ttl; + acl5.icmpType() = + static_cast(ICMPv6Type::ICMPV6_TYPE_NDP_REDIRECT_MESSAGE); + acl5.name() = folly::to("cpuPolicing-high-ndp-redirect-acl"); + acls.push_back(std::make_pair(acl5, action)); +} + void addHighPriAclForLacp( cfg::ToCpuAction toCpuAction, int highPriQueueId, @@ -745,7 +804,8 @@ std::vector> defaultCpuAclsForSai( if (hwAsic->isSupported(HwAsic::Feature::NO_RX_REASON_TRAP)) { addHighPriAclForArp( - + cfg::ToCpuAction::TRAP, getCoppHighPriQueueId(hwAsic), acls, true); + addHighPriAclForNdp( cfg::ToCpuAction::TRAP, getCoppHighPriQueueId(hwAsic), acls, true); addHighPriAclForBgp( hwAsic, @@ -1001,8 +1061,6 @@ std::vector getCoppRxReasonToQueuesForSai( if (hwAsic->isSupported(HwAsic::Feature::NO_RX_REASON_TRAP)) { // TODO(daiweix): remove these rx reason traps and replace them by ACLs rxReasonToQueues = { - ControlPlane::makeRxReasonToQueueEntry( - cfg::PacketRxReason::NDP, coppHighPriQueueId), ControlPlane::makeRxReasonToQueueEntry( cfg::PacketRxReason::TTL_1, kCoppLowPriQueueId), ControlPlane::makeRxReasonToQueueEntry( @@ -1027,12 +1085,14 @@ std::vector getCoppRxReasonToQueuesForSai( cfg::PacketRxReason::SAMPLEPACKET, kCoppLowPriQueueId)); } - // TODO: remove once CS00012311423 is fixed. Gate setting the L3 mtu error - // trap on J2/J3 more specifically. if (hwAsic->isSupported(HwAsic::Feature::L3_MTU_ERROR_TRAP)) { rxReasonToQueues.push_back(ControlPlane::makeRxReasonToQueueEntry( cfg::PacketRxReason::L3_MTU_ERROR, kCoppLowPriQueueId)); } + if (hwAsic->isSupported(HwAsic::Feature::PORT_MTU_ERROR_TRAP)) { + rxReasonToQueues.push_back(ControlPlane::makeRxReasonToQueueEntry( + cfg::PacketRxReason::PORT_MTU_ERROR, kCoppLowPriQueueId)); + } return rxReasonToQueues; } diff --git a/fboss/agent/test/utils/DsfConfigUtils.cpp b/fboss/agent/test/utils/DsfConfigUtils.cpp index aec3b451d2f21..7793cdd031dfc 100644 --- a/fboss/agent/test/utils/DsfConfigUtils.cpp +++ b/fboss/agent/test/utils/DsfConfigUtils.cpp @@ -44,33 +44,37 @@ std::optional> addRemoteIntfNodeCfg( CHECK(!curDsfNodes.empty()); auto dsfNodes = curDsfNodes; const auto& firstDsfNode = dsfNodes.begin()->second; - CHECK(firstDsfNode.systemPortRange().has_value()); + CHECK(!firstDsfNode.systemPortRanges()->systemPortRanges()->empty()); CHECK(firstDsfNode.nodeMac().has_value()); - const auto& asic = - getHwAsicForAsicType(*dsfNodes.cbegin()->second.asicType()); - int numCores = asic.getNumCores(); + auto asic = HwAsic::makeAsic( + *firstDsfNode.asicType(), + cfg::SwitchType::VOQ, + *firstDsfNode.switchId(), + 0, + *firstDsfNode.systemPortRanges()->systemPortRanges()->begin(), + folly::MacAddress(*firstDsfNode.nodeMac()), + std::nullopt); + int numCores = asic->getNumCores(); CHECK( !numRemoteNodes.has_value() || - numRemoteNodes.value() < getDsfNodeCount(asic)); + numRemoteNodes.value() < getDsfNodeCount(*asic)); int totalNodes = numRemoteNodes.has_value() ? numRemoteNodes.value() + curDsfNodes.size() - : getDsfNodeCount(asic); + : getDsfNodeCount(*asic); int remoteNodeStart = dsfNodes.rbegin()->first + numCores; int systemPortMin = - getPerNodeSysPorts(asic, dsfNodes.begin()->first) * numCores; + getPerNodeSysPorts(*asic, dsfNodes.begin()->first) * curDsfNodes.size(); for (int remoteSwitchId = remoteNodeStart; remoteSwitchId < totalNodes * numCores; remoteSwitchId += numCores) { cfg::Range64 systemPortRange; systemPortRange.minimum() = systemPortMin; systemPortRange.maximum() = - systemPortMin + getPerNodeSysPorts(asic, remoteSwitchId) - 1; + systemPortMin + getPerNodeSysPorts(*asic, remoteSwitchId) - 1; + cfg::SystemPortRanges ranges; + ranges.systemPortRanges()->push_back(systemPortRange); auto remoteDsfNodeCfg = dsfNodeConfig( - asic, - SwitchID(remoteSwitchId), - systemPortMin, - *systemPortRange.maximum(), - *firstDsfNode.platformType()); + *asic, SwitchID(remoteSwitchId), ranges, *firstDsfNode.platformType()); dsfNodes.insert({remoteSwitchId, remoteDsfNodeCfg}); systemPortMin = *systemPortRange.maximum() + 1; } diff --git a/fboss/agent/test/utils/InvariantTestUtils.cpp b/fboss/agent/test/utils/InvariantTestUtils.cpp index 7ce1be3546483..9d4820bb07cae 100644 --- a/fboss/agent/test/utils/InvariantTestUtils.cpp +++ b/fboss/agent/test/utils/InvariantTestUtils.cpp @@ -39,6 +39,7 @@ void verifySafeDiagCmds(TestEnsembleIf* ensemble) { case cfg::AsicType::ASIC_TYPE_EBRO: case cfg::AsicType::ASIC_TYPE_GARONNE: case cfg::AsicType::ASIC_TYPE_YUBA: + case cfg::AsicType::ASIC_TYPE_CHENAB: case cfg::AsicType::ASIC_TYPE_ELBERT_8DD: case cfg::AsicType::ASIC_TYPE_SANDIA_PHY: case cfg::AsicType::ASIC_TYPE_JERICHO2: diff --git a/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp b/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp new file mode 100644 index 0000000000000..43ab5f63e1037 --- /dev/null +++ b/fboss/agent/test/utils/MultiPortTrafficTestUtils.cpp @@ -0,0 +1,78 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/agent/test/utils/MultiPortTrafficTestUtils.h" +#include "fboss/agent/state/StateUtils.h" +#include "fboss/agent/test/EcmpSetupHelper.h" +#include "fboss/agent/test/utils/QosTestUtils.h" + +namespace facebook::fboss::utility { +std::vector getOneRemoteHostIpPerInterfacePort( + facebook::fboss::AgentEnsemble* ensemble) { + std::vector ips; + for (int idx = 1; idx <= ensemble->masterLogicalInterfacePortIds().size(); + idx++) { + ips.push_back(folly::IPAddressV6(folly::to("2401::", idx))); + } + return ips; +} + +void setupEcmpDataplaneLoopOnAllPorts( + facebook::fboss::AgentEnsemble* ensemble) { + auto intfMac = utility::getFirstInterfaceMac(ensemble->getProgrammedState()); + utility::EcmpSetupTargetedPorts6 ecmpHelper( + ensemble->getProgrammedState(), intfMac); + std::vector portDescriptors; + std::vector> portDescSets; + for (auto& portId : ensemble->masterLogicalInterfacePortIds()) { + portDescriptors.push_back(PortDescriptor(portId)); + portDescSets.push_back(flat_set{PortDescriptor(portId)}); + } + ensemble->applyNewState( + [&portDescriptors, &ecmpHelper](const std::shared_ptr& in) { + return ecmpHelper.resolveNextHops( + in, + flat_set( + std::make_move_iterator(portDescriptors.begin()), + std::make_move_iterator(portDescriptors.end()))); + }); + + std::vector routePrefixes; + for (auto prefix : getOneRemoteHostIpPerInterfacePort(ensemble)) { + routePrefixes.push_back(RoutePrefixV6{prefix, 128}); + } + auto routeUpdater = ensemble->getSw()->getRouteUpdater(); + ecmpHelper.programRoutes(&routeUpdater, portDescSets, routePrefixes); + for (auto& nhop : ecmpHelper.getNextHops()) { + utility::ttlDecrementHandlingForLoopbackTraffic( + ensemble, ecmpHelper.getRouterId(), nhop); + } +} + +void createTrafficOnMultiplePorts( + facebook::fboss::AgentEnsemble* ensemble, + int numberOfPorts, + std::function sendPacketFn, + double desiredPctLineRate) { + auto minPktsForLineRate = ensemble->getMinPktsForLineRate( + ensemble->masterLogicalInterfacePortIds()[0]); + auto hostIps = getOneRemoteHostIpPerInterfacePort(ensemble); + for (int idx = 0; idx < numberOfPorts; idx++) { + for (int count = 0; count < minPktsForLineRate; count++) { + sendPacketFn(ensemble, hostIps[idx]); + } + } + // Now, make sure that we have line rate traffic on these ports! + for (int idx = 0; idx < numberOfPorts; idx++) { + auto portId = ensemble->masterLogicalInterfacePortIds()[idx]; + uint64_t desiredRate = static_cast(ensemble->getProgrammedState() + ->getPorts() + ->getNodeIf(portId) + ->getSpeed()) * + 1000 * 1000 * desiredPctLineRate / 100; + ensemble->waitForSpecificRateOnPort(portId, desiredRate); + } +} + +} // namespace facebook::fboss::utility diff --git a/fboss/agent/test/utils/MultiPortTrafficTestUtils.h b/fboss/agent/test/utils/MultiPortTrafficTestUtils.h new file mode 100644 index 0000000000000..3fa25fc26ce28 --- /dev/null +++ b/fboss/agent/test/utils/MultiPortTrafficTestUtils.h @@ -0,0 +1,18 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once +#include "fboss/agent/Utils.h" +#include "fboss/agent/test/AgentHwTest.h" + +namespace facebook::fboss::utility { +std::vector getOneRemoteHostIpPerInterfacePort( + facebook::fboss::AgentEnsemble* ensemble); +void setupEcmpDataplaneLoopOnAllPorts(facebook::fboss::AgentEnsemble* ensemble); +void createTrafficOnMultiplePorts( + facebook::fboss::AgentEnsemble* ensemble, + int numberOfPorts, + std::function sendPacketFn, + double desiredPctLineRate = 100); +} // namespace facebook::fboss::utility diff --git a/fboss/agent/test/utils/OlympicTestUtils.cpp b/fboss/agent/test/utils/OlympicTestUtils.cpp index c7b10009e4e12..0149b34486239 100644 --- a/fboss/agent/test/utils/OlympicTestUtils.cpp +++ b/fboss/agent/test/utils/OlympicTestUtils.cpp @@ -177,7 +177,8 @@ void addEventorVoqConfig( queue.streamType() = streamType; queue.name() = "default"; *queue.scheduling() = cfg::QueueScheduling::INTERNAL; - queue.maxDynamicSharedBytes() = 20 * 1024 * 1024; + queue.maxDynamicSharedBytes() = 1024 * 1024; // 1MB + queue.scalingFactor() = cfg::MMUScalingFactor::ONE_HALF; std::vector eventorVoqConfig{std::move(queue)}; const std::string kEventorQueueConfigName{"eventor_queue_config"}; config->portQueueConfigs()[kEventorQueueConfigName] = eventorVoqConfig; diff --git a/fboss/agent/test/utils/PfcTestUtils.cpp b/fboss/agent/test/utils/PfcTestUtils.cpp index 281928f014fba..41081e64ff84a 100644 --- a/fboss/agent/test/utils/PfcTestUtils.cpp +++ b/fboss/agent/test/utils/PfcTestUtils.cpp @@ -16,6 +16,7 @@ static const std::vector kLossyPgIds{0}; void setupQosMapForPfc( cfg::QosMap& qosMap, + bool isCpuQosMap, const std::map& tc2PgOverride = {}) { // update pfc maps std::map tc2PgId; @@ -25,10 +26,14 @@ void setupQosMapForPfc( // program defaults for (auto i = 0; i < 8; i++) { tc2PgId.emplace(i, i); - // Jericho3 cpu/recycle port only has 2 egress queues. Tomahawk has more - // queues, but we stick to the lowest common denominator here. - // See https://fburl.com/gdoc/nyyg1cve and https://fburl.com/code/mhdeuiky - tc2QueueId.emplace(i, i < 7 ? 0 : 1); + if (isCpuQosMap) { + // Jericho3 cpu/recycle port only has 2 egress queues. Tomahawk has more + // queues, but we stick to the lowest common denominator here. + // See https://fburl.com/gdoc/nyyg1cve and https://fburl.com/code/mhdeuiky + tc2QueueId.emplace(i, i < 7 ? 0 : 1); + } else { + tc2QueueId.emplace(i, i); + } pfcPri2PgId.emplace(i, i); pfcPri2QueueId.emplace(i, i); } @@ -51,6 +56,7 @@ void setupQosMapForPfc( } void setupPfc( + facebook::fboss::AgentEnsemble* ensemble, cfg::SwitchConfig& cfg, const std::vector& ports, const std::map& tcToPgOverride) { @@ -59,18 +65,6 @@ void setupPfc( pfc.rx() = true; pfc.portPgConfigName() = "foo"; - cfg::QosMap qosMap; - // setup qos map with pfc structs - setupQosMapForPfc(qosMap, tcToPgOverride); - - // setup qosPolicy - cfg.qosPolicies()->resize(1); - cfg.qosPolicies()[0].name() = "qp"; - cfg.qosPolicies()[0].qosMap() = std::move(qosMap); - cfg::TrafficPolicyConfig dataPlaneTrafficPolicy; - dataPlaneTrafficPolicy.defaultQosPolicy() = "qp"; - cfg.dataPlaneTrafficPolicy() = std::move(dataPlaneTrafficPolicy); - for (const auto& portID : ports) { auto portCfg = std::find_if( cfg.ports()->begin(), cfg.ports()->end(), [&portID](auto& port) { @@ -78,6 +72,39 @@ void setupPfc( }); portCfg->pfc() = pfc; } + + // setup qosPolicy + auto setupQosPolicy = [&](bool isCpuQosMap, const std::string& name) { + cfg::QosMap qosMap; + setupQosMapForPfc(qosMap, isCpuQosMap, tcToPgOverride); + auto qosPolicy = cfg::QosPolicy(); + *qosPolicy.name() = name; + qosPolicy.qosMap() = std::move(qosMap); + cfg.qosPolicies()->push_back(qosPolicy); + cfg::TrafficPolicyConfig trafficPolicy; + trafficPolicy.defaultQosPolicy() = name; + return trafficPolicy; + }; + auto dataTrafficPolicy = setupQosPolicy(false /*isCpuQosMap*/, "qp"); + if (ensemble->getHwAsicTable() + ->getHwAsics() + .cbegin() + ->second->getSwitchType() == cfg::SwitchType::VOQ) { + cfg::CPUTrafficPolicyConfig cpuPolicy; + const std::string kCpuQueueingPolicy{"cpuQp"}; + cpuPolicy.trafficPolicy() = + setupQosPolicy(true /*isCpuQosMap*/, kCpuQueueingPolicy); + cfg.cpuTrafficPolicy() = std::move(cpuPolicy); + std::map portIdToQosPolicy{}; + for (const auto& portId : ensemble->masterLogicalPortIds( + {cfg::PortType::CPU_PORT, cfg::PortType::RECYCLE_PORT})) { + portIdToQosPolicy[static_cast(portId)] = kCpuQueueingPolicy; + } + if (portIdToQosPolicy.size()) { + dataTrafficPolicy.portIdToQosPolicy() = std::move(portIdToQosPolicy); + } + } + cfg.dataPlaneTrafficPolicy() = dataTrafficPolicy; } void setupBufferPoolConfig( @@ -93,12 +120,10 @@ void setupBufferPoolConfig( } void setupPortPgConfig( + const facebook::fboss::AgentEnsemble* ensemble, std::map>& portPgConfigMap, const std::vector& losslessPgIds, - int pgLimit, - int pgHeadroom, - std::optional scalingFactor, - int resumeOffset) { + const PfcBufferParams& buffer) { std::vector portPgConfigs; // create 2 pgs for (auto pgId : losslessPgIds) { @@ -106,14 +131,26 @@ void setupPortPgConfig( pgConfig.id() = pgId; pgConfig.bufferPoolName() = "bufferNew"; // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; + pgConfig.minLimitBytes() = buffer.pgLimit; // set large enough headroom to avoid drop - pgConfig.headroomLimitBytes() = pgHeadroom; + pgConfig.headroomLimitBytes() = buffer.pgHeadroom; // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; + if (ensemble->getHwAsicTable() + ->getHwAsics() + .cbegin() + ->second->getAsicType() == cfg::AsicType::ASIC_TYPE_JERICHO3) { + // Need to translate global config to shared thresholds + pgConfig.maxSharedXoffThresholdBytes() = buffer.globalShared; + pgConfig.minSharedXoffThresholdBytes() = buffer.globalShared; + // Set some default values for SRAM thresholds + pgConfig.maxSramXoffThresholdBytes() = 2048 * 16 * 256; + pgConfig.minSramXoffThresholdBytes() = 256 * 16 * 256; + pgConfig.sramResumeOffsetBytes() = 128 * 16 * 256; + } + pgConfig.resumeOffsetBytes() = buffer.resumeOffset; // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; + if (buffer.scalingFactor) { + pgConfig.scalingFactor() = *buffer.scalingFactor; } portPgConfigs.emplace_back(pgConfig); } @@ -130,14 +167,14 @@ void setupPortPgConfig( pgConfig.id() = pgId; pgConfig.bufferPoolName() = "bufferNew"; // provide atleast 1 cell worth of minLimit - pgConfig.minLimitBytes() = pgLimit; + pgConfig.minLimitBytes() = buffer.pgLimit; // headroom set 0 identifies lossy pgs pgConfig.headroomLimitBytes() = 0; // resume offset - pgConfig.resumeOffsetBytes() = resumeOffset; + pgConfig.resumeOffsetBytes() = buffer.resumeOffset; // set scaling factor - if (scalingFactor) { - pgConfig.scalingFactor() = *scalingFactor; + if (buffer.scalingFactor) { + pgConfig.scalingFactor() = *buffer.scalingFactor; } portPgConfigs.emplace_back(pgConfig); } @@ -149,21 +186,16 @@ void setupPortPgConfig( } // namespace void setupPfcBuffers( + facebook::fboss::AgentEnsemble* ensemble, cfg::SwitchConfig& cfg, const std::vector& ports, const std::vector& losslessPgIds, const std::map& tcToPgOverride, PfcBufferParams buffer) { - setupPfc(cfg, ports, tcToPgOverride); + setupPfc(ensemble, cfg, ports, tcToPgOverride); std::map> portPgConfigMap; - setupPortPgConfig( - portPgConfigMap, - losslessPgIds, - buffer.pgLimit, - buffer.pgHeadroom, - buffer.scalingFactor, - buffer.resumeOffset); + setupPortPgConfig(ensemble, portPgConfigMap, losslessPgIds, buffer); cfg.portPgConfigs() = std::move(portPgConfigMap); // create buffer pool diff --git a/fboss/agent/test/utils/PfcTestUtils.h b/fboss/agent/test/utils/PfcTestUtils.h index 5ebabb23041e1..dbbbcb19b2ab2 100644 --- a/fboss/agent/test/utils/PfcTestUtils.h +++ b/fboss/agent/test/utils/PfcTestUtils.h @@ -2,9 +2,10 @@ #pragma once +#include "fboss/agent/Utils.h" #include "fboss/agent/gen-cpp2/switch_config_types.h" #include "fboss/agent/hw/gen-cpp2/hardware_stats_types.h" -#include "fboss/agent/types.h" +#include "fboss/agent/test/AgentHwTest.h" namespace facebook::fboss::utility { @@ -19,6 +20,7 @@ struct PfcBufferParams { }; void setupPfcBuffers( + facebook::fboss::AgentEnsemble* ensemble, cfg::SwitchConfig& cfg, const std::vector& ports, const std::vector& losslessPgIds, diff --git a/fboss/agent/test/utils/VoqTestUtils.cpp b/fboss/agent/test/utils/VoqTestUtils.cpp index 6da8747320131..e97bed74d983c 100644 --- a/fboss/agent/test/utils/VoqTestUtils.cpp +++ b/fboss/agent/test/utils/VoqTestUtils.cpp @@ -181,46 +181,49 @@ void populateRemoteIntfAndSysPorts( std::shared_ptr remoteSysPorts = std::make_shared(); std::shared_ptr remoteRifs = std::make_shared(); - CHECK(dsfNode.systemPortRange().has_value()); - const auto minPortID = *dsfNode.systemPortRange()->minimum(); - const auto maxPortID = *dsfNode.systemPortRange()->maximum(); - // 0th port for CPU and 1st port for recycle port - for (int i = minPortID + kRemoteSysPortOffset; i <= maxPortID; i++) { - const SystemPortID remoteSysPortId(i); - const InterfaceID remoteIntfId(i); - const PortDescriptor portDesc(remoteSysPortId); - const std::optional encapEndx = - useEncapIndex ? std::optional(0x200001 + i) : std::nullopt; + CHECK(!dsfNode.systemPortRanges()->systemPortRanges()->empty()); + for (auto sysPortRange : *dsfNode.systemPortRanges()->systemPortRanges()) { + const auto minPortID = *sysPortRange.minimum(); + const auto maxPortID = *sysPortRange.maximum(); + // 0th port for CPU and 1st port for recycle port + for (int i = minPortID + kRemoteSysPortOffset; i <= maxPortID; i++) { + const SystemPortID remoteSysPortId(i); + const InterfaceID remoteIntfId(i); + const PortDescriptor portDesc(remoteSysPortId); + const std::optional encapEndx = useEncapIndex + ? std::optional(0x200001 + i) + : std::nullopt; - // Use subnet 100+(dsfNodeId/256):(dsfNodeId%256):(localIntfId)::1/64 - // and 100+(dsfNodeId/256).(dsfNodeId%256).(localIntfId).1/24 - auto firstOctet = 100 + remoteSwitchId / 256; - auto secondOctet = remoteSwitchId % 256; - auto thirdOctet = i - minPortID; - folly::IPAddressV6 neighborIp(folly::to( - firstOctet, ":", secondOctet, ":", thirdOctet, "::2")); - auto remoteSysPort = makeRemoteSysPort( - remoteSysPortId, - SwitchID(remoteSwitchId), - (i - minPortID - kRemoteSysPortOffset) / kNumPortPerCore, - (i - minPortID) % kNumPortPerCore, - static_cast(cfg::PortSpeed::FOURHUNDREDG)); - remoteSysPorts->addSystemPort(remoteSysPort); + // Use subnet 100+(dsfNodeId/256):(dsfNodeId%256):(localIntfId)::1/64 + // and 100+(dsfNodeId/256).(dsfNodeId%256).(localIntfId).1/24 + auto firstOctet = 100 + remoteSwitchId / 256; + auto secondOctet = remoteSwitchId % 256; + auto thirdOctet = i - minPortID; + folly::IPAddressV6 neighborIp(folly::to( + firstOctet, ":", secondOctet, ":", thirdOctet, "::2")); + auto remoteSysPort = makeRemoteSysPort( + remoteSysPortId, + SwitchID(remoteSwitchId), + (i - minPortID - kRemoteSysPortOffset) / kNumPortPerCore, + (i - minPortID) % kNumPortPerCore, + static_cast(cfg::PortSpeed::FOURHUNDREDG)); + remoteSysPorts->addSystemPort(remoteSysPort); - auto remoteRif = makeRemoteInterface( - remoteIntfId, - { - {folly::IPAddress(folly::to( - firstOctet, ":", secondOctet, ":", thirdOctet, "::1")), - 64}, - {folly::IPAddress(folly::to( - firstOctet, ".", secondOctet, ".", thirdOctet, ".1")), - 24}, - }); + auto remoteRif = makeRemoteInterface( + remoteIntfId, + { + {folly::IPAddress(folly::to( + firstOctet, ":", secondOctet, ":", thirdOctet, "::1")), + 64}, + {folly::IPAddress(folly::to( + firstOctet, ".", secondOctet, ".", thirdOctet, ".1")), + 24}, + }); - updateRemoteIntfWithNeighbor( - remoteRif, remoteIntfId, portDesc, neighborIp, encapEndx); - remoteRifs->addNode(remoteRif); + updateRemoteIntfWithNeighbor( + remoteRif, remoteIntfId, portDesc, neighborIp, encapEndx); + remoteRifs->addNode(remoteRif); + } } switchId2SystemPorts[SwitchID(remoteSwitchId)] = remoteSysPorts; switchId2Rifs[SwitchID(remoteSwitchId)] = remoteRifs; diff --git a/fboss/agent/thrift_packet_stream/tests/BUCK b/fboss/agent/thrift_packet_stream/tests/BUCK index cc4d58a258df8..1a54d2cb1fde9 100644 --- a/fboss/agent/thrift_packet_stream/tests/BUCK +++ b/fboss/agent/thrift_packet_stream/tests/BUCK @@ -27,11 +27,11 @@ cpp_unittest( "BidirectionalPacketStreamTest.cpp", ], deps = [ - "//fboss/agent:fboss-event-base", "//fboss/agent/thrift_packet_stream:bidirectional_packet_stream", "//fboss/lib:common_utils", "//folly:memory", "//folly:random", + "//folly/io/async:async_base", "//folly/io/async:event_base_manager", "//folly/io/async:scoped_event_base_thread", "//folly/logging:logging", diff --git a/fboss/agent/wiki/static_docs/docs/intro.md b/fboss/agent/wiki/static_docs/docs/intro.md index b5b4b305346f1..e3a15271a225f 100644 --- a/fboss/agent/wiki/static_docs/docs/intro.md +++ b/fboss/agent/wiki/static_docs/docs/intro.md @@ -36,6 +36,11 @@ Also, now that this is set up with some magic fb internal plugins, there is no n # Static Docs: Contributing +## Contributing through Code +All our wiki pages are hosted under ~/fbsource/fbcode/fboss/agent/wiki/static_docs/docs/. +* Depending on where you want the wiki to be placed under in the sidebar, choose the appropriate folder +* Once selected, create a new MDX file under the directory for OSS page or under fb/ for closed source page +* Once you created the new MDX page, refer to the instructions below to setup your devserver to view the changes ## Contributing through the UI You should be able to contribute directly from this page by clicking **Edit this page** or **Add new page** in the bottom. diff --git a/fboss/build/fbpkg.bzl b/fboss/build/fbpkg.bzl deleted file mode 100644 index b9674346b1272..0000000000000 --- a/fboss/build/fbpkg.bzl +++ /dev/null @@ -1,22 +0,0 @@ -load("//antlir/bzl:structs.bzl", "structs") -load("//fbpkg:fbpkg.bzl", "fbpkg") - -# Helpers to standardize our fbpkg structures - -# For each buck mode, creates an fbpkg target .. Opt packages will not have the mode appended, -# as they are assumed default. Restricting to add debuginfo only for opt packages to save on build times -def fboss_fbpkg_builder(name, buck_modes = None, split_debuginfo = True, buck_opts = None, **kwargs): - kwargs.setdefault("expire_days", 20) - buck_opts_dict = structs.to_dict(buck_opts) if buck_opts else {} - if not buck_modes: - buck_modes = ["opt"] - for mode in buck_modes: - buck_opts_dict["mode"] = mode - is_opt = mode == "opt" - full_name = name if is_opt else "{}.{}".format(name, mode) - fbpkg.builder( - name = full_name, - buck_opts = struct(**buck_opts_dict), - split_debuginfo = split_debuginfo, - **kwargs - ) diff --git a/fboss/build/sdk.bzl b/fboss/build/sdk.bzl deleted file mode 100644 index 49778bcec1871..0000000000000 --- a/fboss/build/sdk.bzl +++ /dev/null @@ -1,308 +0,0 @@ -load("//fboss/build:sdk.thrift.bzl", "FbossSdk", "ProductLine", "SdkStage") - -# All definitions in this file should be kept in sync with configerator/source/neteng/fboss/fbcode_sdk.cinc - -def FakeSdk(version, sai_version): - return FbossSdk( - name = "fake", - product_line = ProductLine.FAKE_SDK, - product_name = "fake", - sai_version = sai_version, - stage = SdkStage.DEV, - version = version, - ) - -def NativeBcmSdk(version, stage): - return FbossSdk( - name = "broadcom-xgs-robo", - is_sai = False, - product_line = ProductLine.BCM_NATIVE_SDK, - product_name = "native_bcm", - sai_version = None, - stage = stage, - version = version, - ) - -def SaiBrcmSdk(version, sai_version, stage, native_bcm_sdk_version): - return FbossSdk( - name = "brcm-sai", - native_bcm_sdk_version = native_bcm_sdk_version, - product_line = ProductLine.SAI_SDK_BCM, - product_name = "brcm", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def SaiBrcmSimSdk(version, sai_version): - return FbossSdk( - name = "brcm-sai", - is_sim = True, - product_line = ProductLine.SAI_SDK_BCM, - product_name = "brcm", - sai_version = sai_version, - stage = SdkStage.TEST, - version = version, - ) - -def SaiBrcmDsfSdk(version, sai_version, stage, fw_path, native_bcm_sdk_version): - return FbossSdk( - name = "brcm-sai", - fw_path = fw_path, - native_bcm_sdk_version = native_bcm_sdk_version, - product_line = ProductLine.BCM_DSF_SDK, - product_name = "brcm", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def SaiBrcmDsfSimSdk(version, sai_version): - return FbossSdk( - name = "brcm-sai", - is_sim = True, - product_line = ProductLine.BCM_DSF_SDK, - product_name = "brcm", - sai_version = sai_version, - stage = SdkStage.TEST, - version = version, - ) - -def SaiLeabaSdk(version, sai_version, stage, fw_path, is_dyn = False): - return FbossSdk( - name = "leaba-sdk", - fw_path = fw_path, - is_dyn = is_dyn, - product_line = ProductLine.LEABA, - product_name = "leaba", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def SaiCredoSdk(version, sai_version, stage): - return FbossSdk( - name = "CredoB52SAI", - is_npu = False, - product_line = ProductLine.CREDO_SAI_SDK, - product_name = "credo", - sai_version = sai_version, - stage = stage, - version = version, - ) - -def NativeMillenioSdk(version, stage): - return FbossSdk( - name = "broadcom-plp-millenio", - is_npu = False, - is_sai = False, - product_line = ProductLine.MILLENIO_SDK, - product_name = "millenio", - sai_version = None, - stage = stage, - version = version, - ) - -def NativeBarchettaSdk(version, stage): - return FbossSdk( - name = "broadcom-plp-barchetta2", - is_npu = False, - is_sai = False, - product_line = ProductLine.BARCHETTA2_SDK, - product_name = "barchetta2", - sai_version = None, - stage = stage, - version = version, - ) - -def filter(f, arr): - return [v for v in arr if f(v)] - -def filter_sdks_by_name(sdks: list, names: list[str]) -> list: - return filter(lambda sdk: sdk.name in names, sdks) - -def filter_sdks_by_stage(sdks: list, stages: list) -> list: - return filter(lambda sdk: sdk.stage in stages, sdks) - -def filter_sdks_by_product_line(sdks: list, product_lines: list) -> list: - return filter(lambda sdk: sdk.product_line in product_lines, sdks) - -def filter_sdks_by_sim(sdks: list, is_sim: bool) -> list: - return filter(lambda sdk: sdk.is_sim == is_sim, sdks) - -def filter_sdks( - names: list[str] | None = None, - stages: list | None = None, - product_lines: list | None = None, - is_sim: bool = False) -> list: - sdks = ALL_SDKS - if names: - sdks = filter_sdks_by_name(sdks, names) - if product_lines: - sdks = filter_sdks_by_product_line(sdks, product_lines) - if stages: - sdks = filter_sdks_by_stage(sdks, stages) - - # Majority of the time we want to filter sim sdks out, so default to that - sdks = filter_sdks_by_sim(sdks, is_sim) - return list(sdks) - -def get_buildable_sdks(product_lines: list, is_sim: bool = False): - stages = [SdkStage.DEV, SdkStage.TEST, SdkStage.CANARY, SdkStage.COLDBOOT_CANARY, SdkStage.PRODUCTION, SdkStage.PRODUCTION_END] - return filter_sdks(product_lines = product_lines, stages = stages, is_sim = is_sim) - -def get_fbpkg_sdks(product_lines): - FBPKG_STAGES = [SdkStage.TEST, SdkStage.COLDBOOT_CANARY, SdkStage.CANARY, SdkStage.PRODUCTION, SdkStage.PRODUCTION_END] - return filter_sdks(is_sim = False, product_lines = product_lines, stages = FBPKG_STAGES) - -ALL_SDKS = [ - # Native Bcm - NativeBcmSdk( - stage = SdkStage.PRODUCTION, - version = "6.5.26-1", - ), - NativeBcmSdk( - stage = SdkStage.TEST, - version = "6.5.28-1", - ), - NativeBcmSdk( - stage = SdkStage.DEV, - version = "6.5.29-1", - ), - NativeBcmSdk( - stage = SdkStage.NO_STAGE, - version = "6.5.30-3", - ), - # Fake - FakeSdk( - sai_version = "1.14.0", - version = "1.14.0", - ), - # Brcm sai - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.26", - sai_version = "1.11.0", - stage = SdkStage.PRODUCTION, - version = "8.2.0.0_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.28", - sai_version = "1.12.0", - stage = SdkStage.CANARY, - version = "9.2.0.0_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.29", - sai_version = "1.12.0", - stage = SdkStage.DEV, - version = "10.0_ea_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.29", - sai_version = "1.13.2", - stage = SdkStage.COLDBOOT_CANARY, - version = "10.2.0.0_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.30", - sai_version = "1.14.0", - stage = SdkStage.DEV, - version = "11.0_ea_odp", - ), - SaiBrcmSdk( - native_bcm_sdk_version = "6.5.30", - sai_version = "1.14.0", - stage = SdkStage.DEV, - version = "11.3.0.0_odp", - ), - # Brcm sai sim - SaiBrcmSimSdk( - sai_version = "1.11.0", - version = "8.2.0.0_sim_odp", - ), - SaiBrcmSimSdk( - sai_version = "1.12.0", - version = "9.0_ea_sim_odp", - ), - SaiBrcmSimSdk( - sai_version = "1.12.0", - version = "10.0_ea_sim_odp", - ), - SaiBrcmDsfSimSdk( - sai_version = "1.12.0", - version = "10.0_ea_dnx_sim_odp", - ), - # DNX - SaiBrcmDsfSdk( - fw_path = "../third-party/tp2/broadcom-xgs-robo/6.5.30_dnx/hsdk-all-6.5.30/tools/sand/db/", - native_bcm_sdk_version = "6.5.30_dnx", - sai_version = "1.14.0", - stage = SdkStage.TEST, - version = "11.3.0.0_dnx_odp", - ), - SaiBrcmDsfSdk( - fw_path = "../third-party/tp2/broadcom-xgs-robo/6.5.31_dnx/hsdk-all-6.5.31/tools/sand/db/", - native_bcm_sdk_version = "6.5.31_dnx", - sai_version = "1.14.0", - stage = SdkStage.TEST, - version = "12.0_ea_dnx_odp", - ), - # Leaba - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/1.42.8/res", - sai_version = "1.7.4", - stage = SdkStage.PRODUCTION, - version = "1.42.8", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.4.90/res", - is_dyn = True, - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.4.90", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.4.90_yuba/res", - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.4.90_yuba", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.6.1_yuba/res", - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.6.1_yuba", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.7.0_yuba/res", - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.7.0_yuba", - ), - SaiLeabaSdk( - fw_path = "third-party-buck/platform010-compat/build/leaba-sdk/24.8.3001/res", - is_dyn = True, - sai_version = "1.13.0", - stage = SdkStage.DEV, - version = "24.8.3001", - ), - # Phy - SaiCredoSdk( - sai_version = "1.8.1", - stage = SdkStage.PRODUCTION, - version = "0.7.2", - ), - SaiCredoSdk( - sai_version = "1.11.0", - stage = SdkStage.TEST, - version = "0.8.4", - ), - NativeMillenioSdk( - stage = SdkStage.PRODUCTION, - version = "5.5", - ), - NativeBarchettaSdk( - stage = SdkStage.PRODUCTION, - version = "5.2", - ), -] diff --git a/fboss/build/sdk.thrift.bzl b/fboss/build/sdk.thrift.bzl deleted file mode 100644 index 55bb59d06bbd9..0000000000000 --- a/fboss/build/sdk.thrift.bzl +++ /dev/null @@ -1,58 +0,0 @@ -# Mirror of defs in configerator/source/neteng/fboss/thrift/sdk.thrift -SdkStage = struct( - NO_STAGE = 0, - DEV = 1, - TEST = 2, - CANARY = 3, - PRODUCTION = 4, - PRODUCTION_END = 5, - COLDBOOT_CANARY = 6, -) - -ProductLine = struct( - PRODUCT_LINE_NONE = 0, - BCM_NATIVE_SDK = 1, - BCM_SDK_FOR_SAI = 2, # The BCM SDK to support SAI, - SAI_SDK_BCM = 3, # The SAI SDK from Broadcom - LEABA = 4, # The Leaba SDK from Cisco - BCM_NATIVE_SDK_TH4 = 5, # The Bcm SDK for TH4 - LEABA_DSF_SDK = 6, # DSF SDK from Cisco - BCM_DSF_SDK = 7, # DSF SDK Bcm - CREDO_SAI_SDK = 8, # Credo SAI SDK - MILLENIO_SDK = 9, # Millenio native SDK - BARCHETTA2_SDK = 10, # Barchetta2 native SDK - FAKE_SDK = 11, # Fake SDK - MRVL_SAI_SDK = 12, -) - -def FbossSdk( - product_name, - product_line, - name, - version, - sai_version, - stage, - is_npu = True, - is_sai = True, - is_sim = False, - is_dyn = False, - fw_path = None, - native_bcm_sdk_version = None): - return struct( - # name in sdk.cconf is the sdk_name, so renaming fields here for now - name = product_name, - sdk_name = name, - version = version, - sai_version = sai_version, - is_sai = is_sai, - is_npu = is_npu, - stage = stage, - is_sim = is_sim, - is_dyn = is_dyn, - product_line = product_line, - fw_path = fw_path, - native_bcm_sdk_version = native_bcm_sdk_version, - - # fields only used in fbcode and not mirrored in thrift - major_version = version.split("-")[0], - ) diff --git a/fboss/cli/fboss2/BUCK b/fboss/cli/fboss2/BUCK index 6094b8361c144..bb6f341de392b 100644 --- a/fboss/cli/fboss2/BUCK +++ b/fboss/cli/fboss2/BUCK @@ -275,6 +275,7 @@ cpp_library( "commands/show/facebook/environment/power/CmdShowEnvironmentPower.cpp", "commands/show/facebook/environment/sensor/CmdShowEnvironmentSensor.cpp", "commands/show/facebook/fsdb/CmdShowFsdbUtils.cpp", + "commands/show/facebook/techsupport/CmdShowTechSupport.cpp", "commands/show/route/utils.cpp", "facebook/CmdHandlerImpl.cpp", "facebook/CmdList.cpp", @@ -306,7 +307,6 @@ cpp_library( "commands/create/facebook/CmdCreateConfig.h", "commands/create/facebook/CmdCreateMirror.h", "commands/create/facebook/config/CmdCreateConfigPatcherAgent.h", - "commands/create/facebook/config/CmdCreateConfigPatcherBgp.h", "commands/create/facebook/config/CmdCreateConfigUtils.h", "commands/create/facebook/teflow/CmdCreateTeFlow.h", "commands/debug/facebook/CmdDebugUtils.h", @@ -315,14 +315,11 @@ cpp_library( "commands/debug/facebook/bgp/add_network/CmdDebugBgpAddNetworkCommunity.h", "commands/debug/facebook/bgp/add_network/CmdDebugBgpAddNetworkLocalPref.h", "commands/debug/facebook/bgp/del_network/CmdDebugBgpDelNetwork.h", - "commands/debug/facebook/bgp/leak_trace/CmdDebugBgpLeakTraceEnd.h", - "commands/debug/facebook/bgp/leak_trace/CmdDebugBgpLeakTraceStart.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighbors.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsRestart.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsShutdown.h", "commands/debug/facebook/bgp/neighbors/CmdDebugBgpNeighborsStart.h", "commands/delete/facebook/config/CmdDeleteConfigPatcherAgent.h", - "commands/delete/facebook/config/CmdDeleteConfigPatcherBgp.h", "commands/delete/facebook/config/CmdDeleteConfigUtils.h", "commands/facebook/rage/CmdRage.h", "commands/facebook/stream/CmdStreamDummy.h", @@ -664,6 +661,7 @@ cpp_library( "//nettools/skynet/if:query-cpp2-types", "//nettools/skynet/if:skynet_structs-cpp2-types", "//nettools/skynet/lib/cpp:skynet_thrift_client", + "//nettools/vipinjector/vip_service:util_lib", "//nettools/vipinjector/vip_service/if:vip_service-cpp2-services", "//nettools/vipinjector/vip_service/if:vip_service-cpp2-types", "//openr/common:network_util", diff --git a/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h b/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h index 91eba5f7d56b4..94b876e20c777 100644 --- a/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h +++ b/fboss/cli/fboss2/commands/show/fabric/CmdShowFabric.h @@ -71,6 +71,7 @@ class CmdShowFabric : public CmdHandler { "Exp Peer Switch (Id)", "Peer Port (Id)", "Exp Peer Port (Id)", + "Match", }); for (auto const& entry : model.get_fabricEntries()) { @@ -90,6 +91,10 @@ class CmdShowFabric : public CmdHandler { udpateNametoIdString( expectedRemotePortNameId, *entry.expectedRemotePortId()); + bool match = + (remoteSwitchNameId == expectedRemoteSwitchNameId && + remotePortNameId == expectedRemotePortNameId); + table.addRow({ *entry.localPort(), Table::StyledCell( @@ -101,6 +106,7 @@ class CmdShowFabric : public CmdHandler { remotePortNameId, get_NeighborStyle(remotePortNameId, expectedRemotePortNameId)), expectedRemotePortNameId, + match ? "Yes" : "No", }); } diff --git a/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h b/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h index bb326744f3f77..6506e2101de06 100644 --- a/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h +++ b/fboss/cli/fboss2/commands/show/hwobject/CmdShowHwObject.h @@ -39,8 +39,10 @@ class CmdShowHwObject [&hwObjectInfo, queriedHwObjectTypes]( apache::thrift::Client& client) { std::string hwAgentObjectInfo; + // TODO - we look at non cached objects. Add a cli option to + // look at cached objects if so desired. client.sync_listHwObjects( - hwAgentObjectInfo, queriedHwObjectTypes.data(), true); + hwAgentObjectInfo, queriedHwObjectTypes.data(), false); hwObjectInfo += hwAgentObjectInfo; }; utils::runOnAllHwAgents(hostInfo, hwAgentQueryFn); diff --git a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h index e8f871cf1c69a..7dc523855abf3 100644 --- a/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h +++ b/fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h @@ -118,8 +118,10 @@ class CmdShowInterface int32_t minSystemPort = 0; for (const auto& idAndNode : dsfNodes) { const auto& node = idAndNode.second; - if (hostInfo.getName() == *node.name()) { + if (utils::removeFbDomains(hostInfo.getName()) == + utils::removeFbDomains(*node.name())) { minSystemPort = *node.systemPortRange()->minimum(); + break; } } @@ -134,6 +136,7 @@ class CmdShowInterface ifModel.speed() = std::to_string(*portInfo.speedMbps() / 1000) + "G"; ifModel.prefixes() = {}; ifModel.portType() = *portInfo.portType(); + ifModel.scope() = *portInfo.scope(); // We assume that there is a one-to-one association between // port, interface, and VLAN. @@ -279,11 +282,15 @@ class CmdShowInterface }); } + bool foundInbandPort = false; + for (const auto& interface : *model.interfaces()) { std::string name = *interface.name(); std::vector prefixes; - if (interface.portType() == cfg::PortType::FABRIC_PORT || + // TODO (jycleung) portType is a new field addition to the interface. + // When D63407523 is rolled out to the fleet, remove the name check. + if (interface.portType() != cfg::PortType::FABRIC_PORT && !name.starts_with("fab")) { // Skip addresses for fabric ports for (const auto& prefix : *interface.prefixes()) { prefixes.push_back( @@ -291,6 +298,18 @@ class CmdShowInterface } } + // Tag first global recycle port as the inband port + auto description = *interface.description(); + if (!foundInbandPort && + interface.portType() == cfg::PortType::RECYCLE_PORT && + interface.scope() == cfg::Scope::GLOBAL) { + if (!description.empty() && !description.ends_with("\n")) { + description += "\n"; + } + description += "Inband port"; + foundInbandPort = true; + } + std::vector row; if (isVoq) { outTable.addRow( @@ -301,7 +320,7 @@ class CmdShowInterface (interface.vlan() ? std::to_string(*interface.vlan()) : ""), (interface.mtu() ? std::to_string(*interface.mtu()) : ""), (prefixes.size() > 0 ? folly::join("\n", prefixes) : ""), - *interface.description()}); + description}); } else { outTable.addRow( {name, @@ -310,7 +329,7 @@ class CmdShowInterface (interface.vlan() ? std::to_string(*interface.vlan()) : ""), (interface.mtu() ? std::to_string(*interface.mtu()) : ""), (prefixes.size() > 0 ? folly::join("\n", prefixes) : ""), - *interface.description()}); + description}); } } out << outTable << std::endl; diff --git a/fboss/cli/fboss2/commands/show/interface/model.thrift b/fboss/cli/fboss2/commands/show/interface/model.thrift index ea98886ab0026..e7f0b35d10d45 100644 --- a/fboss/cli/fboss2/commands/show/interface/model.thrift +++ b/fboss/cli/fboss2/commands/show/interface/model.thrift @@ -17,6 +17,7 @@ struct Interface { 8: i32 systemPortId; 9: list ips; 10: switch_config.PortType portType; + 11: switch_config.Scope scope; } struct IpPrefix { diff --git a/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h b/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h index ce7790094cd79..6f86156240841 100644 --- a/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h +++ b/fboss/cli/fboss2/commands/show/ndp/CmdShowNdp.h @@ -16,9 +16,12 @@ #include "fboss/cli/fboss2/CmdHandler.h" #include "fboss/cli/fboss2/commands/show/ndp/gen-cpp2/model_types.h" #include "fboss/cli/fboss2/utils/CmdClientUtils.h" +#include "fboss/cli/fboss2/utils/Table.h" namespace facebook::fboss { +using utils::Table; + struct CmdShowNdpTraits : public BaseCommandTraits { static constexpr utils::ObjectArgTypeId ObjectArgTypeId = utils::ObjectArgTypeId::OBJECT_ARG_TYPE_ID_IPV6_LIST; @@ -54,40 +57,35 @@ class CmdShowNdp : public CmdHandler { } void printOutput(const RetType& model, std::ostream& out = std::cout) { - constexpr auto fmtString = - "{:<45}{:<19}{:<12}{:<30}{:<14}{:<9}{:<12}{:<45}{:<21}\n"; - - out << fmt::format( - fmtString, - "IP Address", - "MAC Address", - "Interface", - "VLAN/InterfaceID", - "State", - "TTL", - "CLASSID", - "Voq Switch", - "Resolved Since"); + Table table; + table.setHeader( + {"IP Address", + "MAC Address", + "Interface", + "VLAN/InterfaceID", + "State", + "TTL", + "CLASSID", + "Voq Switch", + "Resolved Since"}); for (const auto& entry : model.get_ndpEntries()) { auto vlan = entry.get_vlanName(); if (entry.get_vlanID() != ctrl_constants::NO_VLAN()) { vlan += folly::to(" (", entry.get_vlanID(), ")"); } - - out << fmt::format( - fmtString, - entry.get_ip(), - entry.get_mac(), - entry.get_port(), - vlan, - entry.get_state(), - entry.get_ttl(), - entry.get_classID(), - entry.get_switchName(), - entry.get_resolvedSince()); + table.addRow( + {entry.get_ip(), + entry.get_mac(), + entry.get_port(), + vlan, + entry.get_state(), + std::to_string(entry.get_ttl()), + std::to_string(entry.get_classID()), + entry.get_switchName(), + entry.get_resolvedSince()}); } - out << std::endl; + out << table << std::endl; } RetType createModel( diff --git a/fboss/cli/fboss2/tabulate/termcolor.hpp b/fboss/cli/fboss2/tabulate/termcolor.hpp index c2eda0d950f43..7048f5c7282b2 100644 --- a/fboss/cli/fboss2/tabulate/termcolor.hpp +++ b/fboss/cli/fboss2/tabulate/termcolor.hpp @@ -8,9 +8,7 @@ //! :copyright: (c) 2013 by Ihor Kalnytskyi //! :license: BSD, see LICENSE for details //! - -#ifndef TERMCOLOR_HPP_ -#define TERMCOLOR_HPP_ +#pragma once // the following snippet of code detects the current OS and // defines the appropriate macro that is used to wrap some @@ -443,5 +441,3 @@ inline void win_change_attributes(std::ostream &stream, int foreground, int back #undef TERMCOLOR_OS_WINDOWS #undef TERMCOLOR_OS_MACOS #undef TERMCOLOR_OS_LINUX - -#endif // TERMCOLOR_HPP_ diff --git a/fboss/cli/fboss2/test/CmdShowNdpTest.cpp b/fboss/cli/fboss2/test/CmdShowNdpTest.cpp index 7efaa5c167c34..760c9895409cb 100644 --- a/fboss/cli/fboss2/test/CmdShowNdpTest.cpp +++ b/fboss/cli/fboss2/test/CmdShowNdpTest.cpp @@ -123,9 +123,10 @@ TEST_F(CmdShowNdpTestFixture, printOutput) { std::string output = ss.str(); std::string expectOutput = - "IP Address MAC Address Interface VLAN/InterfaceID State TTL CLASSID Voq Switch Resolved Since \n" - "fe80::526b:4bff:fe28:8fb0 50:6b:4b:28:8f:b0 eth1/1/1 downlinks (2000) REACHABLE 45013 0 -- 1969-12-31 16:00:00 \n" - "fe80::464c:a8ff:fee4:1c3f 44:4c:a8:e4:1c:3f eth2/1/1 uplink_1 (4001) REACHABLE 21045 0 -- -- \n\n"; + " IP Address MAC Address Interface VLAN/InterfaceID State TTL CLASSID Voq Switch Resolved Since \n" + "-------------------------------------------------------------------------------------------------------------------------------------------------\n" + " fe80::526b:4bff:fe28:8fb0 50:6b:4b:28:8f:b0 eth1/1/1 downlinks (2000) REACHABLE 45013 0 -- 1969-12-31 16:00:00 \n" + " fe80::464c:a8ff:fee4:1c3f 44:4c:a8:e4:1c:3f eth2/1/1 uplink_1 (4001) REACHABLE 21045 0 -- -- \n\n"; EXPECT_EQ(output, expectOutput); } diff --git a/fboss/cli/fboss2/utils/CmdClientUtils.cpp b/fboss/cli/fboss2/utils/CmdClientUtils.cpp index ad1033bd2cd2b..8a2f70f9c9a0f 100644 --- a/fboss/cli/fboss2/utils/CmdClientUtils.cpp +++ b/fboss/cli/fboss2/utils/CmdClientUtils.cpp @@ -17,6 +17,13 @@ std::unique_ptr createClient( return utils::createAgentClient(hostInfo); } +template <> +std::unique_ptr createClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout) { + return utils::createAgentClient(hostInfo, timeout); +} + template <> std::unique_ptr> createClient( const HostInfo& hostInfo, diff --git a/fboss/cli/fboss2/utils/CmdClientUtils.h b/fboss/cli/fboss2/utils/CmdClientUtils.h index 663ebd4cd8f2e..5b055ee031fd0 100644 --- a/fboss/cli/fboss2/utils/CmdClientUtils.h +++ b/fboss/cli/fboss2/utils/CmdClientUtils.h @@ -17,6 +17,8 @@ #include "fboss/led_service/if/gen-cpp2/LedService.h" #include "fboss/qsfp_service/if/gen-cpp2/QsfpService.h" +#include + namespace facebook::fboss::utils { using RunForHwAgentFn = std::function createAgentClient( const HostInfo& hostInfo); +std::unique_ptr createAgentClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout); + std::unique_ptr> createAgentClient( const HostInfo& hostInfo, int switchIndex); diff --git a/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h b/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h index 90884651ac8da..69e017a6c7da9 100644 --- a/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h +++ b/fboss/cli/fboss2/utils/CmdClientUtilsCommon.h @@ -25,6 +25,11 @@ std::unique_ptr createClient(const HostInfo& hostInfo); template std::unique_ptr createClient(const HostInfo& hostInfo, int switchIndex); +template +std::unique_ptr createClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout); + // Some clients do not require info about host info template std::unique_ptr createClient(); diff --git a/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp b/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp index 8b5bdb1920003..7974da8aa2e57 100644 --- a/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp +++ b/fboss/cli/fboss2/utils/oss/CmdClientUtils.cpp @@ -31,6 +31,15 @@ std::unique_ptr> createAgentClient( hostInfo, agentPort); } +std::unique_ptr createAgentClient( + const HostInfo& hostInfo, + const std::chrono::milliseconds& timeout) { + auto port = CmdGlobalOptions::getInstance()->getAgentThriftPort(); + + return createPlaintextClient( + hostInfo, port); +} + std::unique_ptr> createHwAgentClient( const HostInfo& hostInfo, int switchIndex) { diff --git a/fboss/docs/bsp_development_requirements.md b/fboss/docs/bsp_development_requirements.md index ab950ba2f5ac0..f2f95ad22ff7e 100644 --- a/fboss/docs/bsp_development_requirements.md +++ b/fboss/docs/bsp_development_requirements.md @@ -23,6 +23,7 @@ consistent ABIs for user space software. - [2. Terms and Abbreviations](#2-terms-and-abbreviations) - [3. Compatible Kernel Versions](#3-compatible-kernel-versions) - [4. Common Requirements](#4-common-requirements) + - [4.1 Source Code Repository Structure](#41-source-code-repository-structure) - [5. The PCIe FPGA Driver](#5-the-pcie-fpga-driver) - [5.1 Auxiliary Bus](#51-auxiliary-bus) - [5.2 Subdevice (I/O Controller) Creation \& Deletion](#52-subdevice-io-controller-creation--deletion) @@ -165,6 +166,45 @@ this is to avoid potential log spew. 10. The BSP must include a bash script named `fbsp-remove.sh` which successfully unloads all of the provided kernel modules. This script must be kept up to date with any changes made to the BSP. +11. A file `kmods.json` must be included in the same directory as `fbsp-remove.sh` +and this file contains a list of kmods (as named in `lsmod`) in the following +format: +``` +{ + "bspKmods": [ + "kmod_A", + "kmod_B", + ], + "sharedKmods": [ + "shared_kmod_C", + "shared_kmod_D" + ] +} +``` +`fbsp-remove.sh` must read `kmods.json` and remove `bspKmods` before `sharedKmods`. +A "shared" kmod is any kmod which other kmods depend upon. + +## 4.1 Source Code Repository Structure + +Source code shared with Meta must have the following general structure: + +``` +/source-repo +├── kmods +│ ├── Makefile +│ ├── module.c +│ └── ... +└── rpmbuild + └── \_bsp_kmods.spec +``` + +The source repository must have a top-level directory named "kmods" and another +named "rpmbuild". The kmods directory must have a `Makefile` which will build +the bsp kernel modules. Any other structure decisions are left to developers. + +The "rpmbuild" directory must have a file name \_bsp_kmods.spec which is +an rpm spec file. This spec file should result in an rpm that conforms to the +rest of the specifications in this document # 5. The PCIe FPGA Driver diff --git a/fboss/docs/provisioning/provisioning_requirements_npi.md b/fboss/docs/provisioning/provisioning_requirements_npi.md index b4a59aeb3d81a..124fb5a3f1898 100644 --- a/fboss/docs/provisioning/provisioning_requirements_npi.md +++ b/fboss/docs/provisioning/provisioning_requirements_npi.md @@ -2,9 +2,9 @@ ### PE Network Provisioning -**Version 0.3.0** +**Version 0.3.1** -**February 2024** +**October 2024** 4-5 Grand Canal Quay @@ -246,6 +246,8 @@ There should be no unconventional requirements to boot the kernel, like providing the ACPI tables as a binary blob, etc. Those should be defined by the BIOS and loaded into the main memory for the OS to consume. +BIOS should, after loss of power, default to ON state when power is reapplied +and NOT try to return to "last known state". ### 7. Weutil support diff --git a/fboss/fsdb/client/BUCK b/fboss/fsdb/client/BUCK index 0d58346776c7e..1a9ef097c0b63 100644 --- a/fboss/fsdb/client/BUCK +++ b/fboss/fsdb/client/BUCK @@ -9,12 +9,13 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/googletest:gtest_headers", - ":client", "//common/time:time", "//fb303:thread_cached_service_data", "//fboss/fsdb/common:utils", + "//fboss/fsdb/if:fsdb-cpp2-services", "//fboss/fsdb/if:fsdb_oper-cpp2-types", "//fboss/lib:common_thrift_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:network_address", "//folly/coro:async_scope", "//folly/io/async:async_socket_transport", @@ -50,13 +51,13 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/googletest:gtest_headers", - ":client", ":fsdb_stream_client", "//fboss/fsdb/common:flags", "//fboss/fsdb/common:utils", "//fboss/fsdb/if:fsdb-cpp2-services", "//fboss/fsdb/if:fsdb_common-cpp2-types", "//fboss/fsdb/if:fsdb_oper-cpp2-types", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:format", "//folly:string", "//folly:synchronized", @@ -88,21 +89,6 @@ cpp_library( ], ) -cpp_library( - name = "client", - srcs = [ - "Client.cpp", - ], - exported_deps = [ - "//fboss/fsdb/if:fsdb-cpp2-services", - "//fboss/lib/thrift_service_client:thrift-service-client", - "//folly:network_address", - "//folly/io/async:async_base", - "//folly/io/async:async_socket", - "//folly/logging:logging", - ], -) - # templated FsdbSubManager. Users should use one of the instantiations below cpp_library( name = "fsdb_sub_manager", @@ -113,6 +99,7 @@ cpp_library( ":fsdb_pub_sub", "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/if:fsdb_oper-cpp2-types", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/io/async:scoped_event_base_thread", ], ) diff --git a/fboss/fsdb/client/Client.cpp b/fboss/fsdb/client/Client.cpp deleted file mode 100644 index e1bd4f1575bc6..0000000000000 --- a/fboss/fsdb/client/Client.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#include "fboss/fsdb/client/Client.h" - -#include - -#include -#include -#include -#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" - -DEFINE_bool(plaintext_fsdb_client, false, "Use plaintext FSDB clients"); - -namespace facebook::fboss::fsdb { -std::unique_ptr> Client::getClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - std::optional tos, - const bool plaintextClient, - folly::EventBase* eb) { - CHECK(eb->isInEventBaseThread()); - bool usePlaintextClient = plaintextClient || dstAddr.isLoopbackAddress() || - FLAGS_plaintext_fsdb_client; - return usePlaintextClient - ? utils::createPlaintextClient(dstAddr, srcAddr, eb, tos) - : utils::tryCreateEncryptedClient(dstAddr, srcAddr, eb, tos); -} -} // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/Client.h b/fboss/fsdb/client/Client.h deleted file mode 100644 index efe3d1e388882..0000000000000 --- a/fboss/fsdb/client/Client.h +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2004-present Facebook. All Rights Reserved. - -#pragma once - -#include -#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" - -namespace folly { -class EventBase; -} - -namespace facebook::fboss::fsdb { - -class Client { - public: - static std::unique_ptr> getClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - std::optional tos, - const bool plaintextClient, - folly::EventBase* eb); -}; - -} // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/FsdbDeltaPublisher.cpp b/fboss/fsdb/client/FsdbDeltaPublisher.cpp index 9355eac5dae81..c0d9dfad999fe 100644 --- a/fboss/fsdb/client/FsdbDeltaPublisher.cpp +++ b/fboss/fsdb/client/FsdbDeltaPublisher.cpp @@ -4,8 +4,6 @@ #include -#include "fboss/fsdb/client/Client.h" - namespace facebook::fboss::fsdb { folly::coro::Task diff --git a/fboss/fsdb/client/FsdbDeltaSubscriber.cpp b/fboss/fsdb/client/FsdbDeltaSubscriber.cpp index 97ad2967e8dc3..76033dabc80a4 100644 --- a/fboss/fsdb/client/FsdbDeltaSubscriber.cpp +++ b/fboss/fsdb/client/FsdbDeltaSubscriber.cpp @@ -44,15 +44,26 @@ FsdbDeltaSubscriberImpl::serveStream(StreamT&& stream) { XLOG(DBG2) << " Detected cancellation: " << this->clientId(); break; } - // even empty change/heartbeat indicates subscription is connected - if (this->getSubscriptionState() != SubscriptionState::CONNECTED) { + if (!this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } if (!delta->changes()->size()) { continue; } + if (this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { + BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); + } SubUnitT tmp(*delta); - this->operSubUnitUpdate_(std::move(tmp)); + try { + this->operSubUnitUpdate_(std::move(tmp)); + } catch (const std::exception& ex) { + FsdbException e; + e.message() = folly::exceptionStr(ex); + e.errorCode() = FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR; + throw e; + } } co_return; } diff --git a/fboss/fsdb/client/FsdbPatchPublisher.cpp b/fboss/fsdb/client/FsdbPatchPublisher.cpp index c40a0c593bbe1..8dff97e66f077 100644 --- a/fboss/fsdb/client/FsdbPatchPublisher.cpp +++ b/fboss/fsdb/client/FsdbPatchPublisher.cpp @@ -1,7 +1,6 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include "fboss/fsdb/client/FsdbPatchPublisher.h" -#include "fboss/fsdb/client/Client.h" #include #include diff --git a/fboss/fsdb/client/FsdbPatchSubscriber.cpp b/fboss/fsdb/client/FsdbPatchSubscriber.cpp index 590f8648d74d1..f94b121cf6cbe 100644 --- a/fboss/fsdb/client/FsdbPatchSubscriber.cpp +++ b/fboss/fsdb/client/FsdbPatchSubscriber.cpp @@ -15,6 +15,7 @@ FsdbPatchSubscriberImpl::createRequest() request.clientId()->instanceId() = clientId(); RawOperPath path; request.paths() = this->subscribePaths(); + request.forceSubscribe() = this->subscriptionOptions().forceSubscribe_; return request; } @@ -47,13 +48,24 @@ FsdbPatchSubscriberImpl::serveStream( XLOG(DBG2) << " Detected cancellation: " << this->clientId(); break; } - // even empty change/heartbeat indicates subscription is connected - if (this->getSubscriptionState() != SubscriptionState::CONNECTED) { + if (!this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } switch (message->getType()) { case SubscriberMessage::Type::chunk: - this->operSubUnitUpdate_(message->move_chunk()); + if (this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { + BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); + } + try { + this->operSubUnitUpdate_(message->move_chunk()); + } catch (const std::exception& ex) { + FsdbException e; + e.message() = folly::exceptionStr(ex); + e.errorCode() = FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR; + throw e; + } break; case SubscriberMessage::Type::heartbeat: case SubscriberMessage::Type::__EMPTY__: diff --git a/fboss/fsdb/client/FsdbPubSubManager.cpp b/fboss/fsdb/client/FsdbPubSubManager.cpp index 95cc934b9dfee..65f07ec76d3da 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.cpp +++ b/fboss/fsdb/client/FsdbPubSubManager.cpp @@ -6,6 +6,7 @@ #include "fboss/fsdb/client/FsdbStatePublisher.h" #include "fboss/fsdb/client/FsdbStreamClient.h" #include "fboss/fsdb/common/PathHelpers.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -49,6 +50,21 @@ std::string toSubscriptionStr( ":/", PathHelpers::toString(paths)); } + +std::string toSubscriptionStr( + const std::string& fsdbHost, + const std::map& path, + SubscriptionType subscribeType, + bool subscribeStats) { + return folly::to( + fsdbHost, + ":/", + subscriptionTypeToStr[subscribeType], + ":/", + (subscribeStats ? kStats : kState), + ":/", + PathHelpers::toString(path)); +} } // namespace namespace facebook::fboss::fsdb { @@ -119,7 +135,7 @@ std::unique_ptr FsdbPubSubManager::createPublisherImpl( int32_t fsdbPort) const { auto publisherExists = publishStats ? (statDeltaPublisher_ || statPathPublisher_) - : (stateDeltaPublisher_ || statePathPublisher_); + : (stateDeltaPublisher_ || statePathPublisher_ || statePatchPublisher_); if (publisherExists) { throw std::runtime_error( @@ -133,7 +149,7 @@ std::unique_ptr FsdbPubSubManager::createPublisherImpl( reconnectEvb_, publishStats, publisherStateChangeCb); - publisher->setServerOptions(FsdbStreamClient::ServerOptions("::1", fsdbPort)); + publisher->setConnectionOptions(utils::ConnectionOptions("::1", fsdbPort)); return publisher; } @@ -296,193 +312,248 @@ void FsdbPubSubManager::publishStat(Patch&& pubUnit) { publishImpl(statPatchPublisher_.get(), std::move(pubUnit)); } -void FsdbPubSubManager::addStatDeltaSubscription( +std::string FsdbPubSubManager::addStatDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePath, stateChangeCb, operDeltaCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatPathSubscription( +std::string FsdbPubSubManager::addStatPathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePath, stateChangeCb, operStateCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } /* multi path subscriptions */ -void FsdbPubSubManager::addStateDeltaSubscription( +std::string FsdbPubSubManager::addStateDeltaSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operDeltaCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatPathSubscription( +std::string FsdbPubSubManager::addStatPathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStateDeltaSubscription( +std::string FsdbPubSubManager::addStateDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePath, stateChangeCb, operDeltaCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePatchSubscription( + const PatchPath& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( + subscribePath, + stateChangeCb, + patchCb, + false /*subscribeStat*/, + std::move(connectionOptions)); +} + +std::string FsdbPubSubManager::addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePath, stateChangeCb, operStateCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix) { - addSubscriptionImpl( + return addSubscriptionImpl( PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, false /*subscribeStat*/, - std::move(serverOptions), + std::move(connectionOptions), clientIdSuffix); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( std::move(subscriptionOptions), subscribePath, stateChangeCb, operStateCb, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatePathSubscription( +std::string FsdbPubSubManager::addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - XLOG(INFO) << "addStatePathSubscription: " - << typeid(FsdbExtStateSubscriber).name(); - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( std::move(subscriptionOptions), PathHelpers::toExtendedOperPath(subscribePaths), stateChangeCb, operStateCb, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStateExtPathSubscription( +std::string FsdbPubSubManager::addStateExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePaths, stateChangeCb, operStateCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatExtPathSubscription( +std::string FsdbPubSubManager::addStatExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePaths, stateChangeCb, operStateCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStateExtDeltaSubscription( +std::string FsdbPubSubManager::addStateExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePaths, stateChangeCb, operDeltaCb, false /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } -void FsdbPubSubManager::addStatExtDeltaSubscription( +std::string FsdbPubSubManager::addStatExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions) { - addSubscriptionImpl( + utils::ConnectionOptions&& connectionOptions) { + return addSubscriptionImpl( subscribePaths, stateChangeCb, operDeltaCb, true /*subscribeStat*/, - std::move(serverOptions)); + std::move(connectionOptions)); } template -void FsdbPubSubManager::addSubscriptionImpl( +std::string FsdbPubSubManager::addSubscriptionImpl( + const std::map& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, + bool subscribeStats, + utils::ConnectionOptions&& connectionOptions, + const std::optional& clientIdSuffix) { + auto subscribeType = SubscriberT::subscriptionType(); + XCHECK(subscribeType != SubscriptionType::UNKNOWN) << "Unknown data type"; + auto subsStr = toSubscriptionStr( + connectionOptions.getDstAddr().getAddressStr(), + subscribePath, + subscribeType, + subscribeStats); + auto& path2Subscriber = + subscribeStats ? statPath2Subscriber_ : statePath2Subscriber_; + auto path2SubscriberW = path2Subscriber.wlock(); + + auto clientStr = folly::to(clientId_); + if (clientIdSuffix.has_value()) { + clientStr.append(folly::to("_", clientIdSuffix.value())); + } + + auto [itr, inserted] = path2SubscriberW->emplace(std::make_pair( + subsStr, + std::make_unique( + clientStr, + subscribePath, + subscriberEvb_, + reconnectEvb_, + subUnitAvailableCb, + subscribeStats, + stateChangeCb))); + if (!inserted) { + throw std::runtime_error( + "Subscription at : " + subsStr + " already exists"); + } + XLOG(DBG2) << "Added subscription for: " << subsStr; + itr->second->setConnectionOptions(std::move(connectionOptions)); + + return subsStr; +} + +template +std::string FsdbPubSubManager::addSubscriptionImpl( const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, bool subscribeStats, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix) { auto subscriptionType = SubscriberT::subscriptionType(); XCHECK(subscriptionType != SubscriptionType::UNKNOWN) << "Unknown data type"; auto subsStr = toSubscriptionStr( - serverOptions.dstAddr.getAddressStr(), + connectionOptions.getDstAddr().getAddressStr(), subscribePath, subscriptionType, subscribeStats); @@ -510,20 +581,22 @@ void FsdbPubSubManager::addSubscriptionImpl( "Subscription at : " + subsStr + " already exists"); } XLOG(DBG2) << " Added subscription for: " << subsStr; - itr->second->setServerOptions(std::move(serverOptions)); + itr->second->setConnectionOptions(std::move(connectionOptions)); + + return subsStr; } template -void FsdbPubSubManager::addSubscriptionImpl( +std::string FsdbPubSubManager::addSubscriptionImpl( SubscriptionOptions&& subscriptionOptions, const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, - FsdbStreamClient::ServerOptions&& serverOptions) { + utils::ConnectionOptions&& connectionOptions) { auto subscriptionType = SubscriberT::subscriptionType(); XCHECK(subscriptionType != SubscriptionType::UNKNOWN) << "Unknown data type"; auto subsStr = toSubscriptionStr( - serverOptions.dstAddr.getAddressStr(), + connectionOptions.getDstAddr().getAddressStr(), subscribePath, subscriptionType, subscriptionOptions.subscribeStats_); @@ -546,7 +619,9 @@ void FsdbPubSubManager::addSubscriptionImpl( "Subscription at : " + subsStr + " already exists"); } XLOG(DBG2) << " Added subscription for: " << subsStr; - itr->second->setServerOptions(std::move(serverOptions)); + itr->second->setConnectionOptions(std::move(connectionOptions)); + + return subsStr; } const std::vector FsdbPubSubManager::getSubscriptionInfo() @@ -577,6 +652,15 @@ void FsdbPubSubManager::removeStateDeltaSubscription( SubscriptionType::DELTA, false /*subscribeStats*/); } +void FsdbPubSubManager::removeStatePatchSubscription( + const Path& subscribePath, + const std::string& fsdbHost) { + removeSubscriptionImpl( + subscribePath, + fsdbHost, + SubscriptionType::PATCH, + false /*subscribeStats*/); +} void FsdbPubSubManager::removeStatePathSubscription( const Path& subscribePath, const std::string& fsdbHost) { diff --git a/fboss/fsdb/client/FsdbPubSubManager.h b/fboss/fsdb/client/FsdbPubSubManager.h index f398fa8f91d68..22c58398fce08 100644 --- a/fboss/fsdb/client/FsdbPubSubManager.h +++ b/fboss/fsdb/client/FsdbPubSubManager.h @@ -10,6 +10,7 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "fboss/fsdb/common/Flags.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -30,6 +31,7 @@ class FsdbPubSubManager { ~FsdbPubSubManager(); using Path = std::vector; + using PatchPath = std::map; using MultiPath = std::vector; /* Publisher create APIs */ @@ -75,95 +77,104 @@ class FsdbPubSubManager { void publishStat(Patch&& pubUnit); /* Subscriber add APIs */ - void addStatDeltaSubscription( + std::string addStatDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); - void addStatPathSubscription( + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); + std::string addStatPathSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); /* multi path subscription */ - void addStateDeltaSubscription( + std::string addStateDeltaSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); - void addStatDeltaSubscription( + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); + std::string addStatDeltaSubscription( const MultiPath& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); - void addStatPathSubscription( + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); + std::string addStatPathSubscription( const MultiPath& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); - /* Apis that use ServerOptions */ + /* Apis that use ConnectionOptions */ // TODO: change all above apis to use server options - void addStatePathSubscription( + std::string addStatePathSubscription( const Path& subscribePath, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); - void addStatePathSubscription( + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); + std::string addStatePathSubscription( const MultiPath& subscribePaths, SubscriptionStateChangeCb subscriptionStateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions = kDefaultServerOptions(), + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions(), const std::optional& clientIdSuffix = std::nullopt); - void addStateDeltaSubscription( + std::string addStateDeltaSubscription( const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions = - kDefaultServerOptions()); - void addStatePathSubscription( + utils::ConnectionOptions&& connectionOptions = + kDefaultConnectionOptions()); + std::string addStatePatchSubscription( + const PatchPath& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + FsdbPatchSubscriber::FsdbOperPatchUpdateCb patchCb, + utils::ConnectionOptions&& connectionOptions); + std::string addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const Path& subscribePath, SubscriptionStateChangeCb stateChangeCb, FsdbStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); - void addStatePathSubscription( + utils::ConnectionOptions&& connectionOptions); + std::string addStatePathSubscription( SubscriptionOptions&& subscriptionOptions, const MultiPath& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); - void addStateExtPathSubscription( + utils::ConnectionOptions&& connectionOptions); + std::string addStateExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); - void addStatExtPathSubscription( + utils::ConnectionOptions&& connectionOptions); + std::string addStatExtPathSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtStateSubscriber::FsdbOperStateUpdateCb operStateCb, - FsdbStreamClient::ServerOptions&& serverOptions); - void addStateExtDeltaSubscription( + utils::ConnectionOptions&& connectionOptions); + std::string addStateExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions); - void addStatExtDeltaSubscription( + utils::ConnectionOptions&& connectionOptions); + std::string addStatExtDeltaSubscription( const std::vector& subscribePaths, SubscriptionStateChangeCb stateChangeCb, FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); /* Subscriber remove APIs */ void removeStateDeltaSubscription( const Path& subscribePath, const std::string& fsdbHost = "::1"); + void removeStatePatchSubscription( + const Path& subscribePath, + const std::string& fsdbHost); void removeStatePathSubscription( const Path& subscribePath, const std::string& fsdbHost = "::1"); @@ -177,6 +188,9 @@ class FsdbPubSubManager { void removeStateDeltaSubscription( const MultiPath& subscribePath, const std::string& fsdbHost = "::1"); + void removeStatePatchSubscription( + const MultiPath& subscribePath, + const std::string& fsdbHost = "::1"); void removeStatePathSubscription( const MultiPath& subscribePath, const std::string& fsdbHost = "::1"); @@ -219,6 +233,16 @@ class FsdbPubSubManager { return stats ? statPatchPublisher_.get() : statePatchPublisher_.get(); } + std::string getSubscriberStatsPrefix(bool stats, std::string& key) { + auto& path2Subscriber = + stats ? statPath2Subscriber_ : statePath2Subscriber_; + auto path2SubscriberR = path2Subscriber.rlock(); + if (path2SubscriberR->find(key) != path2SubscriberR->end()) { + return path2SubscriberR->find(key)->second->getCounterPrefix(); + } + return ""; + } + std::string getClientId() const { return clientId_; } @@ -226,8 +250,9 @@ class FsdbPubSubManager { static std::string subscriptionStateToString(FsdbStreamClient::State state); private: - static FsdbStreamClient::ServerOptions kDefaultServerOptions() { - return FsdbStreamClient::ServerOptions("::1", FLAGS_fsdbPort); + static utils::ConnectionOptions kDefaultConnectionOptions() { + return utils::ConnectionOptions::defaultOptions< + facebook::fboss::fsdb::FsdbService>(); } // Publisher helpers template @@ -250,21 +275,30 @@ class FsdbPubSubManager { const std::string& fsdbHost, SubscriptionType subscribeType, bool subscribeStats); + template - void addSubscriptionImpl( + std::string addSubscriptionImpl( const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, bool subscribeStats, - FsdbStreamClient::ServerOptions&& serverOptions, + utils::ConnectionOptions&& connectionOptions, + const std::optional& clientIdSuffix = std::nullopt); + template + std::string addSubscriptionImpl( + const std::map& subscribePath, + SubscriptionStateChangeCb stateChangeCb, + typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, + bool subscribeStats, + utils::ConnectionOptions&& connectionOptions, const std::optional& clientIdSuffix = std::nullopt); template - void addSubscriptionImpl( + std::string addSubscriptionImpl( SubscriptionOptions&& subscriptionOptions, const std::vector& subscribePath, SubscriptionStateChangeCb stateChangeCb, typename SubscriberT::FsdbSubUnitUpdateCb subUnitAvailableCb, - FsdbStreamClient::ServerOptions&& serverOptions); + utils::ConnectionOptions&& connectionOptions); const std::string clientId_; diff --git a/fboss/fsdb/client/FsdbStatePublisher.cpp b/fboss/fsdb/client/FsdbStatePublisher.cpp index f7134ff1c2860..80e5d98624a6d 100644 --- a/fboss/fsdb/client/FsdbStatePublisher.cpp +++ b/fboss/fsdb/client/FsdbStatePublisher.cpp @@ -4,8 +4,6 @@ #include -#include "fboss/fsdb/client/Client.h" - namespace facebook::fboss::fsdb { folly::coro::Task diff --git a/fboss/fsdb/client/FsdbStateSubscriber.cpp b/fboss/fsdb/client/FsdbStateSubscriber.cpp index b257a0c6b2e74..c9861c52c58d8 100644 --- a/fboss/fsdb/client/FsdbStateSubscriber.cpp +++ b/fboss/fsdb/client/FsdbStateSubscriber.cpp @@ -45,8 +45,8 @@ FsdbStateSubscriberImpl::serveStream(StreamT&& stream) { XLOG(DBG2) << " Detected cancellation: " << this->clientId(); break; } - // even empty change/heartbeat indicates subscription is connected - if (this->getSubscriptionState() != SubscriptionState::CONNECTED) { + if (!this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); } if constexpr (std::is_same_v) { @@ -58,8 +58,19 @@ FsdbStateSubscriberImpl::serveStream(StreamT&& stream) { continue; } } + if (this->subscriptionOptions().requireInitialSyncToMarkConnect_ && + this->getSubscriptionState() != SubscriptionState::CONNECTED) { + BaseT::updateSubscriptionState(SubscriptionState::CONNECTED); + } SubUnitT tmp(*state); - this->operSubUnitUpdate_(std::move(tmp)); + try { + this->operSubUnitUpdate_(std::move(tmp)); + } catch (const std::exception& ex) { + FsdbException e; + e.message() = folly::exceptionStr(ex); + e.errorCode() = FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR; + throw e; + } } co_return; } diff --git a/fboss/fsdb/client/FsdbStreamClient.cpp b/fboss/fsdb/client/FsdbStreamClient.cpp index db76213d90f8f..a8270302e4dda 100644 --- a/fboss/fsdb/client/FsdbStreamClient.cpp +++ b/fboss/fsdb/client/FsdbStreamClient.cpp @@ -2,7 +2,8 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "common/time/Time.h" -#include "fboss/fsdb/client/Client.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" +#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include #include @@ -81,7 +82,8 @@ FsdbStreamClient::~FsdbStreamClient() { CHECK(isCancelled()); } -void FsdbStreamClient::connectToServer(const ServerOptions& options) { +void FsdbStreamClient::connectToServer( + const utils::ConnectionOptions& options) { CHECK(getState() == State::DISCONNECTED); streamEvb_->runImmediatelyOrRunInEventBaseThreadAndWait([this, &options]() { try { @@ -124,6 +126,14 @@ folly::coro::Task FsdbStreamClient::serviceLoopWrapper() { << apache::thrift::util::enumNameSafe(ef.get_errorCode()) << ": " << ef.get_message(); setStateDisconnectedWithReason(ef.get_errorCode()); + } catch (const apache::thrift::transport::TTransportException& et) { + FsdbErrorCode disconnectReason = FsdbErrorCode::CLIENT_TRANSPORT_EXCEPTION; + if (et.getType() == + apache::thrift::transport::TTransportException:: + TTransportExceptionType::TIMED_OUT) { + disconnectReason = FsdbErrorCode::CLIENT_CHUNK_TIMEOUT; + } + setStateDisconnectedWithReason(disconnectReason); } catch (const std::exception& ex) { STREAM_XLOG(ERR) << "Unknown error: " << folly::exceptionStr(ex); setStateDisconnectedWithReason(FsdbErrorCode::DISCONNECTED); @@ -133,47 +143,16 @@ folly::coro::Task FsdbStreamClient::serviceLoopWrapper() { } #endif -// Set DSCP to 48 (Network Control) -// 8-bit TOS = 6-bit DSCP followed by 2-bit ECN -const uint8_t kTosForClassOfServiceNC = 48 << 2; - void FsdbStreamClient::resetClient() { CHECK(streamEvb_->getEventBase()->isInEventBaseThread()); client_.reset(); } -std::optional getTosForClientPriority( - const std::optional priority) { - if (priority.has_value()) { - switch (*priority) { - case FsdbStreamClient::Priority::CRITICAL: - return kTosForClassOfServiceNC; - case FsdbStreamClient::Priority::NORMAL: - // no TC marking by default - return std::nullopt; - } - } - return std::nullopt; -} - -bool shouldUseEncryptedClient(const FsdbStreamClient::ServerOptions& options) { - // use encrypted connection for all clients except CRITICAL ones. - return (options.priority != FsdbStreamClient::Priority::CRITICAL); -} - -void FsdbStreamClient::createClient(const ServerOptions& options) { +void FsdbStreamClient::createClient(const utils::ConnectionOptions& options) { CHECK(streamEvb_->getEventBase()->isInEventBaseThread()); resetClient(); - auto tos = getTosForClientPriority(options.priority); - bool encryptedClient = shouldUseEncryptedClient(options); - - client_ = Client::getClient( - options.dstAddr /* dstAddr */, - options.srcAddr /* srcAddr */, - tos, - !encryptedClient, - streamEvb_->getEventBase()); + client_ = createFsdbClient(options, streamEvb_); } } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/FsdbStreamClient.h b/fboss/fsdb/client/FsdbStreamClient.h index 648637350e5d0..5ef3a6375d8da 100644 --- a/fboss/fsdb/client/FsdbStreamClient.h +++ b/fboss/fsdb/client/FsdbStreamClient.h @@ -2,6 +2,12 @@ #pragma once +#include "fboss/fsdb/common/Utils.h" +#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" +#include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" +#include "fboss/lib/CommonThriftUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" + #include #include #include @@ -12,14 +18,11 @@ #include #include #include -#include -#include -#include "fboss/fsdb/common/Utils.h" -#include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" -#include "fboss/lib/CommonThriftUtils.h" #include #include +#include +#include namespace folly { class CancellationToken; @@ -98,9 +101,9 @@ class FsdbStreamClient : public ReconnectingThriftClient { DeltaExtSubStreamT>; private: - void createClient(const ServerOptions& options); + void createClient(const utils::ConnectionOptions& options); void resetClient() override; - void connectToServer(const ServerOptions& options) override; + void connectToServer(const utils::ConnectionOptions& options) override; void timeoutExpired() noexcept; #if FOLLY_HAS_COROUTINES @@ -126,6 +129,7 @@ class FsdbStreamClient : public ReconnectingThriftClient { void setStateDisconnectedWithReason(fsdb::FsdbErrorCode reason) { setDisconnectReason(reason); setState(State::DISCONNECTED); + updateDisconnectReasonCounter(reason); } std::unique_ptr> client_; @@ -135,10 +139,56 @@ class FsdbStreamClient : public ReconnectingThriftClient { folly::Synchronized disconnectReason_{FsdbErrorCode::NONE}; private: + void updateDisconnectReasonCounter(fsdb::FsdbErrorCode reason) { + switch (reason) { + case fsdb::FsdbErrorCode::CLIENT_CHUNK_TIMEOUT: + disconnectReasonChunkTimeout_.add(1); + break; + case fsdb::FsdbErrorCode::SUBSCRIPTION_DATA_CALLBACK_ERROR: + disconnectReasonDataCbError_.add(1); + break; + case fsdb::FsdbErrorCode::CLIENT_TRANSPORT_EXCEPTION: + disconnectReasonTransportError_.add(1); + break; + case fsdb::FsdbErrorCode::ID_ALREADY_EXISTS: + disconnectReasonIdExists_.add(1); + break; + case fsdb::FsdbErrorCode::EMPTY_PUBLISHER_ID: + case fsdb::FsdbErrorCode::UNKNOWN_PUBLISHER: + case fsdb::FsdbErrorCode::EMPTY_SUBSCRIBER_ID: + case fsdb::FsdbErrorCode::INVALID_PATH: + disconnectReasonBadArgs_.add(1); + break; + default: + break; + }; + } + folly::EventBase* streamEvb_; std::atomic serviceLoopRunning_{false}; const bool isStats_; apache::thrift::RpcOptions rpcOptions_; + // counters for various disconnect reasons + fb303::TimeseriesWrapper disconnectReasonChunkTimeout_{ + getCounterPrefix() + ".disconnectReason.chunkTimeout", + fb303::SUM, + fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonDataCbError_{ + getCounterPrefix() + ".disconnectReason.dataCbError", + fb303::SUM, + fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonTransportError_{ + getCounterPrefix() + ".disconnectReason.transportError", + fb303::SUM, + fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonIdExists_{ + getCounterPrefix() + ".disconnectReason.dupId", + fb303::SUM, + fb303::RATE}; + fb303::TimeseriesWrapper disconnectReasonBadArgs_{ + getCounterPrefix() + ".disconnectReason.badArgs", + fb303::SUM, + fb303::RATE}; }; } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/client/FsdbSubManager.h b/fboss/fsdb/client/FsdbSubManager.h index dc5c98da4e02f..012eea95fca66 100644 --- a/fboss/fsdb/client/FsdbSubManager.h +++ b/fboss/fsdb/client/FsdbSubManager.h @@ -5,6 +5,7 @@ #include "fboss/fsdb/client/FsdbPatchSubscriber.h" #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include @@ -62,11 +63,11 @@ class FsdbSubManager { FsdbSubManager( fsdb::SubscriptionOptions opts, - ReconnectingThriftClient::ServerOptions serverOptions, + utils::ConnectionOptions serverOptions, folly::EventBase* reconnectEvb = nullptr, folly::EventBase* subscriberEvb = nullptr) : opts_(std::move(opts)), - serverOptions_(std::move(serverOptions)), + connectionOptions_(std::move(serverOptions)), reconnectEvbThread_( reconnectEvb ? nullptr : std::make_unique( @@ -127,8 +128,7 @@ class FsdbSubManager { parseChunkAndInvokeCallback(std::move(chunk), std::move(cb)); }, std::move(subscriptionStateChangeCb)); - subscriber_->setServerOptions( - ReconnectingThriftClient::ServerOptions(serverOptions_)); + subscriber_->setConnectionOptions(connectionOptions_); } // Returns a synchronized data object that is always kept up to date @@ -181,7 +181,7 @@ class FsdbSubManager { } fsdb::SubscriptionOptions opts_; - ReconnectingThriftClient::ServerOptions serverOptions_; + utils::ConnectionOptions connectionOptions_; // local threads are only needed when there are no external eventbases std::unique_ptr reconnectEvbThread_{nullptr}; diff --git a/fboss/fsdb/client/FsdbSubscriber.h b/fboss/fsdb/client/FsdbSubscriber.h index 0aec33b1bacc0..22f57649841ed 100644 --- a/fboss/fsdb/client/FsdbSubscriber.h +++ b/fboss/fsdb/client/FsdbSubscriber.h @@ -83,14 +83,21 @@ struct SubscriptionOptions { explicit SubscriptionOptions( const std::string& clientId, bool subscribeStats = false, - uint32_t grHoldTimeSec = 0) + uint32_t grHoldTimeSec = 0, + // only mark subscription as CONNECTED on initial sync + bool requireInitialSyncToMarkConnect = false, + bool forceSubscribe = false) : clientId_(clientId), subscribeStats_(subscribeStats), - grHoldTimeSec_(grHoldTimeSec) {} + grHoldTimeSec_(grHoldTimeSec), + requireInitialSyncToMarkConnect_(requireInitialSyncToMarkConnect), + forceSubscribe_(forceSubscribe) {} const std::string clientId_; bool subscribeStats_{false}; uint32_t grHoldTimeSec_{0}; + bool requireInitialSyncToMarkConnect_{false}; + bool forceSubscribe_{false}; }; struct SubscriptionInfo { @@ -201,11 +208,13 @@ class FsdbSubscriber : public FsdbSubscriberBase { OperSubRequest request; request.path() = operPath; request.subscriberId() = clientId(); + request.forceSubscribe() = subscriptionOptions_.forceSubscribe_; return request; } else if constexpr (std::is_same_v>) { OperSubRequestExtended request; request.paths() = subscribePaths_; request.subscriberId() = clientId(); + request.forceSubscribe() = subscriptionOptions_.forceSubscribe_; return request; } } @@ -283,6 +292,10 @@ class FsdbSubscriber : public FsdbSubscriberBase { return subscribePaths_; } + const SubscriptionOptions& subscriptionOptions() const { + return subscriptionOptions_; + } + FsdbSubUnitUpdateCb operSubUnitUpdate_; private: diff --git a/fboss/fsdb/client/test/BUCK b/fboss/fsdb/client/test/BUCK index ebb2f37ee062b..8a26e854ede2a 100644 --- a/fboss/fsdb/client/test/BUCK +++ b/fboss/fsdb/client/test/BUCK @@ -15,6 +15,7 @@ cpp_unittest( "//fboss/fsdb/client:fsdb_stream_client", "//fboss/fsdb/common:flags", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/coro:async_generator", "//folly/coro:async_pipe", "//folly/io/async:scoped_event_base_thread", @@ -34,6 +35,7 @@ cpp_unittest( "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/logging:init", "//folly/logging:log_level", "//folly/logging:logging", diff --git a/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp b/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp index 0a570fa6204f7..a9ee7ea46d8ca 100644 --- a/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp +++ b/fboss/fsdb/client/test/FsdbPubSubManagerTest.cpp @@ -8,6 +8,7 @@ #include "fboss/fsdb/client/FsdbPubSubManager.h" #include "fboss/fsdb/common/Flags.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -36,7 +37,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operDeltaCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } void addStatDeltaSubscription( const std::vector& path, @@ -45,7 +46,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operDeltaCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } void addStatePathSubscription( const std::vector& path, @@ -54,7 +55,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operStateCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } void addStatPathSubscription( const std::vector& path, @@ -63,7 +64,7 @@ class PubSubManagerTest : public ::testing::Test { path, subscriptionStateChangeCb, operStateCb, - FsdbStreamClient::ServerOptions(host, FLAGS_fsdbPort)); + utils::ConnectionOptions(host, FLAGS_fsdbPort)); } FsdbPubSubManager pubSubManager_{"testMgr"}; }; diff --git a/fboss/fsdb/client/test/FsdbStreamClientTest.cpp b/fboss/fsdb/client/test/FsdbStreamClientTest.cpp index 65539e2fb3a44..7e1e68d06c935 100644 --- a/fboss/fsdb/client/test/FsdbStreamClientTest.cpp +++ b/fboss/fsdb/client/test/FsdbStreamClientTest.cpp @@ -5,6 +5,7 @@ #include "fboss/fsdb/client/FsdbStreamClient.h" #include "fboss/fsdb/common/Flags.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -101,8 +102,8 @@ class StreamClientTest : public ::testing::Test { }; TEST_F(StreamClientTest, connectAndCancel) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", FLAGS_fsdbPort)); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", FLAGS_fsdbPort)); auto counterPrefix = streamClient_->getCounterPrefix(); EXPECT_EQ(counterPrefix, "test_fsdb_client"); EXPECT_EQ( diff --git a/fboss/fsdb/client/test/FsdbSubManagerTest.cpp b/fboss/fsdb/client/test/FsdbSubManagerTest.cpp index a6965036a6816..3010f7ce7b527 100644 --- a/fboss/fsdb/client/test/FsdbSubManagerTest.cpp +++ b/fboss/fsdb/client/test/FsdbSubManagerTest.cpp @@ -6,6 +6,7 @@ #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -19,11 +20,9 @@ namespace facebook::fboss::fsdb::test { class TestAgentPublisher { public: - TestAgentPublisher( - bool isStats, - ReconnectingThriftClient::ServerOptions serverOptions) + TestAgentPublisher(bool isStats, utils::ConnectionOptions serverOptions) : isStats_(isStats), - serverOptions_(std::move(serverOptions)), + connectionOptions_(std::move(serverOptions)), publisherThread_(std::make_unique( "test-publisher-stream")), reconnectThread_(std::make_unique( @@ -46,8 +45,7 @@ class TestAgentPublisher { b.post(); } })); - publisher_->setServerOptions( - ReconnectingThriftClient::ServerOptions(serverOptions_)); + publisher_->setConnectionOptions(connectionOptions_); b.wait(); } @@ -71,7 +69,7 @@ class TestAgentPublisher { private: bool isStats_; std::unique_ptr publisher_; - ReconnectingThriftClient::ServerOptions serverOptions_; + utils::ConnectionOptions connectionOptions_; std::unique_ptr publisherThread_; std::unique_ptr reconnectThread_; }; @@ -208,9 +206,10 @@ class FsdbSubManagerTest : public ::testing::Test, std::unique_ptr createSubscriber( std::string clientId, int grHoldTimer = 0) { - CHECK(serverOptions_); + CHECK(connectionOptions_); SubscriptionOptions options(clientId, IsStats, grHoldTimer); - return std::make_unique(std::move(options), *serverOptions_); + return std::make_unique( + std::move(options), *connectionOptions_); } template @@ -230,10 +229,10 @@ class FsdbSubManagerTest : public ::testing::Test, void createFsdbServerAndPublisher() { fsdbTestServer_ = std::make_unique(); - serverOptions_ = ReconnectingThriftClient::ServerOptions( - "::1", fsdbTestServer_->getFsdbPort()); + connectionOptions_ = + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()); testPublisher_ = - std::make_unique(IsStats, *serverOptions_); + std::make_unique(IsStats, *connectionOptions_); } void killFsdb() { @@ -243,7 +242,7 @@ class FsdbSubManagerTest : public ::testing::Test, private: std::unique_ptr fsdbTestServer_; std::unique_ptr testPublisher_; - std::optional serverOptions_; + std::optional connectionOptions_; }; using SubscriberTypes = diff --git a/fboss/fsdb/common/PathHelpers.cpp b/fboss/fsdb/common/PathHelpers.cpp index 76753e76c045c..5992019ecafe6 100644 --- a/fboss/fsdb/common/PathHelpers.cpp +++ b/fboss/fsdb/common/PathHelpers.cpp @@ -84,5 +84,21 @@ std::vector PathHelpers::toExtendedOperPath( } return extPaths; } +std::map toMappedExtendedOperPath( + const std::vector>& paths) { + std::map result; + for (size_t i = 0; i < paths.size(); i++) { + auto path = paths[i]; + ExtendedOperPath extPath; + extPath.path()->reserve(path.size()); + for (const auto& pathElm : path) { + OperPathElem operPathElm; + operPathElm.raw_ref() = pathElm; + extPath.path()->push_back(std::move(operPathElm)); + } + result[i] = std::move(extPath); + } + return result; +} } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/common/PathHelpers.h b/fboss/fsdb/common/PathHelpers.h index fdbe7dfd0630c..1e9d00369a065 100644 --- a/fboss/fsdb/common/PathHelpers.h +++ b/fboss/fsdb/common/PathHelpers.h @@ -27,6 +27,8 @@ class PathHelpers { static std::vector toExtendedOperPath( const std::vector>& paths); + static std::map toMappedExtendedOperPath( + const std::vector>& paths); }; } // namespace facebook::fboss::fsdb diff --git a/fboss/fsdb/if/fsdb_common.thrift b/fboss/fsdb/if/fsdb_common.thrift index 8457ab3d2b5c4..5f4f11599944c 100644 --- a/fboss/fsdb/if/fsdb_common.thrift +++ b/fboss/fsdb/if/fsdb_common.thrift @@ -45,6 +45,9 @@ enum FsdbErrorCode { PUBLISHER_NOT_READY = 15, PUBLISHER_GR_DISCONNECT = 16, SUBSCRIPTION_NOT_PERMITTED = 17, + SUBSCRIPTION_DATA_CALLBACK_ERROR = 18, + CLIENT_CHUNK_TIMEOUT = 19, + CLIENT_TRANSPORT_EXCEPTION = 20, } exception FsdbException { diff --git a/fboss/fsdb/if/fsdb_oper.thrift b/fboss/fsdb/if/fsdb_oper.thrift index 0787d787402be..5f002eb370526 100644 --- a/fboss/fsdb/if/fsdb_oper.thrift +++ b/fboss/fsdb/if/fsdb_oper.thrift @@ -95,6 +95,8 @@ struct OperSubRequest { 1: OperPath path; 2: OperProtocol protocol = OperProtocol.BINARY; 3: fsdb_common.SubscriberId subscriberId; + // Forcefully subscribe even if there is already a subscriber with the same SubscriberId + 4: bool forceSubscribe = false; } struct OperSubInitResponse {} @@ -104,6 +106,8 @@ struct OperSubRequestExtended { 1: list paths; 2: OperProtocol protocol = OperProtocol.BINARY; 3: fsdb_common.SubscriberId subscriberId; + // Forcefully subscribe even if there is already a subscriber with the same SubscriberId + 4: bool forceSubscribe = false; } struct OperSubPathUnit { @@ -130,7 +134,8 @@ typedef i32 SubscriptionKey struct SubRequest { 1: map paths; 3: fsdb_common.ClientId clientId; -// TODO: option to request shallow patches? + // Forcefully subscribe even if there is already a subscriber with the same SubscriberId + 4: bool forceSubscribe = false; } struct Patch { diff --git a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h index 8f1a00965779f..aae3080407156 100755 --- a/fboss/fsdb/if/oss/fsdb_model_thriftpath.h +++ b/fboss/fsdb/if/oss/fsdb_model_thriftpath.h @@ -3106,7 +3106,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, std::pair, Child>, std::pair, Child>, @@ -3148,7 +3150,9 @@ std::pair, Child>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -3191,7 +3195,9 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -3239,6 +3245,8 @@ std::pair auto operator()(const std::integral_constant&) { @@ -3284,6 +3292,8 @@ std::pair @@ -4067,7 +4077,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, @@ -4075,7 +4090,12 @@ std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::BufferPoolFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::facebook::fboss::BufferPoolFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -4084,7 +4104,12 @@ std::pair>, std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -4098,6 +4123,11 @@ std::pair auto operator()(const std::integral_constant&) { @@ -4109,6 +4139,11 @@ std::pair @@ -4381,44 +4416,23 @@ std::pair>> } }; -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::Vlan>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::Vlan>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PktLenRange, + ::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PktLenRange, + ::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -4427,30 +4441,50 @@ class ChildThriftPath<::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(min, 1); - STRUCT_CHILD_GETTERS(max, 2); - STRUCT_CHILD_GETTERS(invert, 3); + STRUCT_CHILD_GETTERS(srcIp, 1); + STRUCT_CHILD_GETTERS(dstIp, 2); + STRUCT_CHILD_GETTERS(srcMac, 3); + STRUCT_CHILD_GETTERS(dstMac, 4); + STRUCT_CHILD_GETTERS(udpSrcPort, 5); + STRUCT_CHILD_GETTERS(udpDstPort, 6); + STRUCT_CHILD_GETTERS(ttl, 7); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return min(); } - else if constexpr (__id == 2) { return max(); } - else if constexpr (__id == 3) { return invert(); } + if constexpr (__id == 1) { return srcIp(); } + else if constexpr (__id == 2) { return dstIp(); } + else if constexpr (__id == 3) { return srcMac(); } + else if constexpr (__id == 4) { return dstMac(); } + else if constexpr (__id == 5) { return udpSrcPort(); } + else if constexpr (__id == 6) { return udpDstPort(); } + else if constexpr (__id == 7) { return ttl(); } } template @@ -4460,43 +4494,43 @@ std::pair }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::bcm::BcmConfig, + ::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, Parent> { public: using Self = Path< - ::facebook::fboss::bcm::BcmConfig, + ::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, Parent>; - using strings = ::facebook::fboss::bcm::bcm_config_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -4505,25 +4539,25 @@ class ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::QueueCongestionBehavior, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::QueueCongestionBehavior>>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); - STRUCT_CHILD_GETTERS(yamlConfig, 2); + STRUCT_CHILD_GETTERS(detection, 1); + STRUCT_CHILD_GETTERS(behavior, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } - else if constexpr (__id == 2) { return yamlConfig(); } + if constexpr (__id == 1) { return detection(); } + else if constexpr (__id == 2) { return behavior(); } } template @@ -4534,21 +4568,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortPgConfig, + ::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortPgConfig, + ::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::cfg::asic_config_v2_tags::strings; template using Child = Path< ChildType, @@ -4557,50 +4591,30 @@ class ChildThriftPath<::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::MMUScalingFactor, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::MMUScalingFactor>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(name, 2); - STRUCT_CHILD_GETTERS(scalingFactor, 3); - STRUCT_CHILD_GETTERS(minLimitBytes, 4); - STRUCT_CHILD_GETTERS(headroomLimitBytes, 5); - STRUCT_CHILD_GETTERS(resumeOffsetBytes, 6); - STRUCT_CHILD_GETTERS(bufferPoolName, 7); + STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(jsonConfig, 2); + STRUCT_CHILD_GETTERS(yamlConfig, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return name(); } - else if constexpr (__id == 3) { return scalingFactor(); } - else if constexpr (__id == 4) { return minLimitBytes(); } - else if constexpr (__id == 5) { return headroomLimitBytes(); } - else if constexpr (__id == 6) { return resumeOffsetBytes(); } - else if constexpr (__id == 7) { return bufferPoolName(); } + if constexpr (__id == 1) { return config(); } + else if constexpr (__id == 2) { return jsonConfig(); } + else if constexpr (__id == 3) { return yamlConfig(); } } template @@ -4609,21 +4623,42 @@ std::pair +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExpQosMap>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::ExpQosMap>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::ExpQosMap>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::ExpQosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::StaticRouteNoNextHops, + ::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::StaticRouteNoNextHops, + ::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -4634,25 +4669,20 @@ class ChildThriftPath<::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(routerID, 1); - STRUCT_CHILD_GETTERS(prefix, 2); + STRUCT_CHILD_GETTERS(tcValue, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return routerID(); } - else if constexpr (__id == 2) { return prefix(); } + if constexpr (__id == 1) { return tcValue(); } } template @@ -4663,21 +4693,21 @@ std::pair template -class ChildThriftPath<::facebook::fboss::state::AggregatePortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::AggregatePortFields, + ::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, Parent> { public: using Self = Path< - ::facebook::fboss::state::AggregatePortFields, + ::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -4686,65 +4716,25 @@ class ChildThriftPath<::facebook::fboss::state::AggregatePortFields, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::facebook::fboss::state::ParticipantInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(name, 2); - STRUCT_CHILD_GETTERS(description, 3); - STRUCT_CHILD_GETTERS(systemPriority, 4); - STRUCT_CHILD_GETTERS(systemID, 5); - STRUCT_CHILD_GETTERS(minimumLinkCount, 6); - STRUCT_CHILD_GETTERS(ports, 7); - STRUCT_CHILD_GETTERS(portToFwdState, 8); - STRUCT_CHILD_GETTERS(portToPartnerState, 9); - STRUCT_CHILD_GETTERS(interfaceIDs, 10); + STRUCT_CHILD_GETTERS(linkCount, 1); + STRUCT_CHILD_GETTERS(linkPercentage, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return name(); } - else if constexpr (__id == 3) { return description(); } - else if constexpr (__id == 4) { return systemPriority(); } - else if constexpr (__id == 5) { return systemID(); } - else if constexpr (__id == 6) { return minimumLinkCount(); } - else if constexpr (__id == 7) { return ports(); } - else if constexpr (__id == 8) { return portToFwdState(); } - else if constexpr (__id == 9) { return portToPartnerState(); } - else if constexpr (__id == 10) { return interfaceIDs(); } + if constexpr (__id == 1) { return linkCount(); } + else if constexpr (__id == 2) { return linkPercentage(); } } template @@ -4753,63 +4743,21 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::PortQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::PortQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::PortQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AggregatePort, + ::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AggregatePort, + ::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -4820,45 +4768,285 @@ class ChildThriftPath<::facebook::fboss::cfg::AggregatePort, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Port>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::SflowCollector>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Lacp, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::LoadBalancer>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Mirror>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::TrafficCounter>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticIp2MplsRoute>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortFlowletConfigName, ::facebook::fboss::cfg::PortFlowletConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(key, 1); - STRUCT_CHILD_GETTERS(name, 2); - STRUCT_CHILD_GETTERS(description, 3); - STRUCT_CHILD_GETTERS(memberPorts, 4); - STRUCT_CHILD_GETTERS(minimumCapacity, 5); - STRUCT_CHILD_GETTERS(counterTags, 6); + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(version, 1); + STRUCT_CHILD_GETTERS(ports, 2); + STRUCT_CHILD_GETTERS(vlans, 3); + STRUCT_CHILD_GETTERS(vlanPorts, 4); + STRUCT_CHILD_GETTERS(defaultVlan, 5); + STRUCT_CHILD_GETTERS(interfaces, 6); + STRUCT_CHILD_GETTERS(arpTimeoutSeconds, 7); + STRUCT_CHILD_GETTERS(arpRefreshSeconds, 8); + STRUCT_CHILD_GETTERS(arpAgerInterval, 9); + STRUCT_CHILD_GETTERS(proactiveArp, 10); + STRUCT_CHILD_GETTERS(cpuMAC, 11); + STRUCT_CHILD_GETTERS(staticRoutesWithNhops, 12); + STRUCT_CHILD_GETTERS(staticRoutesToNull, 13); + STRUCT_CHILD_GETTERS(staticRoutesToCPU, 14); + STRUCT_CHILD_GETTERS(acls, 15); + STRUCT_CHILD_GETTERS(maxNeighborProbes, 16); + STRUCT_CHILD_GETTERS(staleEntryInterval, 17); + STRUCT_CHILD_GETTERS(aggregatePorts, 18); + STRUCT_CHILD_GETTERS(clientIdToAdminDistance, 19); + STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV4, 20); + STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV6, 21); + STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV4, 22); + STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV6, 23); + STRUCT_CHILD_GETTERS(globalEgressTrafficPolicy_DEPRECATED, 24); + STRUCT_CHILD_GETTERS(config_version, 25); + STRUCT_CHILD_GETTERS(sFlowCollectors, 26); + STRUCT_CHILD_GETTERS(lacp, 27); + STRUCT_CHILD_GETTERS(cpuQueues, 28); + STRUCT_CHILD_GETTERS(cpuTrafficPolicy, 29); + STRUCT_CHILD_GETTERS(loadBalancers, 30); + STRUCT_CHILD_GETTERS(dataPlaneTrafficPolicy, 31); + STRUCT_CHILD_GETTERS(mirrors, 32); + STRUCT_CHILD_GETTERS(trafficCounters, 33); + STRUCT_CHILD_GETTERS(qosPolicies, 34); + STRUCT_CHILD_GETTERS(defaultPortQueues, 35); + STRUCT_CHILD_GETTERS(staticMplsRoutesWithNhops, 36); + STRUCT_CHILD_GETTERS(staticMplsRoutesToNull, 37); + STRUCT_CHILD_GETTERS(staticMplsRoutesToCPU, 38); + STRUCT_CHILD_GETTERS(staticIp2MplsRoutes, 39); + STRUCT_CHILD_GETTERS(portQueueConfigs, 40); + STRUCT_CHILD_GETTERS(switchSettings, 41); + STRUCT_CHILD_GETTERS(qcmConfig, 42); + STRUCT_CHILD_GETTERS(portPgConfigs, 43); + STRUCT_CHILD_GETTERS(bufferPoolConfigs, 44); + STRUCT_CHILD_GETTERS(aclTableGroup, 45); + STRUCT_CHILD_GETTERS(sdkVersion, 46); + STRUCT_CHILD_GETTERS(ipInIpTunnels, 47); + STRUCT_CHILD_GETTERS(dsfNodes, 48); + STRUCT_CHILD_GETTERS(udfConfig, 49); + STRUCT_CHILD_GETTERS(flowletSwitchingConfig, 50); + STRUCT_CHILD_GETTERS(defaultVoqConfig, 51); + STRUCT_CHILD_GETTERS(portFlowletConfigs, 52); + STRUCT_CHILD_GETTERS(icmpV4UnavailableSrcAddress, 53); + STRUCT_CHILD_GETTERS(hostname, 54); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return key(); } - else if constexpr (__id == 2) { return name(); } - else if constexpr (__id == 3) { return description(); } - else if constexpr (__id == 4) { return memberPorts(); } - else if constexpr (__id == 5) { return minimumCapacity(); } - else if constexpr (__id == 6) { return counterTags(); } + if constexpr (__id == 1) { return version(); } + else if constexpr (__id == 2) { return ports(); } + else if constexpr (__id == 3) { return vlans(); } + else if constexpr (__id == 4) { return vlanPorts(); } + else if constexpr (__id == 5) { return defaultVlan(); } + else if constexpr (__id == 6) { return interfaces(); } + else if constexpr (__id == 7) { return arpTimeoutSeconds(); } + else if constexpr (__id == 8) { return arpRefreshSeconds(); } + else if constexpr (__id == 9) { return arpAgerInterval(); } + else if constexpr (__id == 10) { return proactiveArp(); } + else if constexpr (__id == 11) { return cpuMAC(); } + else if constexpr (__id == 12) { return staticRoutesWithNhops(); } + else if constexpr (__id == 13) { return staticRoutesToNull(); } + else if constexpr (__id == 14) { return staticRoutesToCPU(); } + else if constexpr (__id == 15) { return acls(); } + else if constexpr (__id == 16) { return maxNeighborProbes(); } + else if constexpr (__id == 17) { return staleEntryInterval(); } + else if constexpr (__id == 18) { return aggregatePorts(); } + else if constexpr (__id == 19) { return clientIdToAdminDistance(); } + else if constexpr (__id == 20) { return dhcpRelaySrcOverrideV4(); } + else if constexpr (__id == 21) { return dhcpRelaySrcOverrideV6(); } + else if constexpr (__id == 22) { return dhcpReplySrcOverrideV4(); } + else if constexpr (__id == 23) { return dhcpReplySrcOverrideV6(); } + else if constexpr (__id == 24) { return globalEgressTrafficPolicy_DEPRECATED(); } + else if constexpr (__id == 25) { return config_version(); } + else if constexpr (__id == 26) { return sFlowCollectors(); } + else if constexpr (__id == 27) { return lacp(); } + else if constexpr (__id == 28) { return cpuQueues(); } + else if constexpr (__id == 29) { return cpuTrafficPolicy(); } + else if constexpr (__id == 30) { return loadBalancers(); } + else if constexpr (__id == 31) { return dataPlaneTrafficPolicy(); } + else if constexpr (__id == 32) { return mirrors(); } + else if constexpr (__id == 33) { return trafficCounters(); } + else if constexpr (__id == 34) { return qosPolicies(); } + else if constexpr (__id == 35) { return defaultPortQueues(); } + else if constexpr (__id == 36) { return staticMplsRoutesWithNhops(); } + else if constexpr (__id == 37) { return staticMplsRoutesToNull(); } + else if constexpr (__id == 38) { return staticMplsRoutesToCPU(); } + else if constexpr (__id == 39) { return staticIp2MplsRoutes(); } + else if constexpr (__id == 40) { return portQueueConfigs(); } + else if constexpr (__id == 41) { return switchSettings(); } + else if constexpr (__id == 42) { return qcmConfig(); } + else if constexpr (__id == 43) { return portPgConfigs(); } + else if constexpr (__id == 44) { return bufferPoolConfigs(); } + else if constexpr (__id == 45) { return aclTableGroup(); } + else if constexpr (__id == 46) { return sdkVersion(); } + else if constexpr (__id == 47) { return ipInIpTunnels(); } + else if constexpr (__id == 48) { return dsfNodes(); } + else if constexpr (__id == 49) { return udfConfig(); } + else if constexpr (__id == 50) { return flowletSwitchingConfig(); } + else if constexpr (__id == 51) { return defaultVoqConfig(); } + else if constexpr (__id == 52) { return portFlowletConfigs(); } + else if constexpr (__id == 53) { return icmpV4UnavailableSrcAddress(); } + else if constexpr (__id == 54) { return hostname(); } } template @@ -4867,42 +5055,21 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, - Parent>; - using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - template -class ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::RouteNextHopEntry, + ::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, Parent> { public: using Self = Path< - ::facebook::fboss::state::RouteNextHopEntry, + ::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -4913,40 +5080,25 @@ class ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>>, -std::pair>, -std::pair>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::AdminDistance, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::AdminDistance>>>, - std::pair, Child<::facebook::fboss::RouteForwardAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::RouteForwardAction>>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::AclLookupClass, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(adminDistance, 1); - STRUCT_CHILD_GETTERS(action, 2); - STRUCT_CHILD_GETTERS(counterID, 3); - STRUCT_CHILD_GETTERS(classID, 4); - STRUCT_CHILD_GETTERS(nexthops, 5); + STRUCT_CHILD_GETTERS(action, 1); + STRUCT_CHILD_GETTERS(resolvedNexthops, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return adminDistance(); } - else if constexpr (__id == 2) { return action(); } - else if constexpr (__id == 3) { return counterID(); } - else if constexpr (__id == 4) { return classID(); } - else if constexpr (__id == 5) { return nexthops(); } + if constexpr (__id == 1) { return action(); } + else if constexpr (__id == 2) { return resolvedNexthops(); } } template @@ -4957,21 +5109,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::UdfPacketMatcher, + ::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::UdfPacketMatcher, + ::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -4980,40 +5132,25 @@ class ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>, -std::pair>>, -std::pair>>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::UdfMatchL2Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL2Type>>>, - std::pair, Child<::facebook::fboss::cfg::UdfMatchL3Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL3Type>>>, - std::pair, Child<::facebook::fboss::cfg::UdfMatchL4Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL4Type>>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + std::pair, ChildThriftPath<::facebook::fboss::state::SocketAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(l2PktType, 2); - STRUCT_CHILD_GETTERS(l3pktType, 3); - STRUCT_CHILD_GETTERS(l4PktType, 4); - STRUCT_CHILD_GETTERS(UdfL4DstPort, 5); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(address, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return l2PktType(); } - else if constexpr (__id == 3) { return l3pktType(); } - else if constexpr (__id == 4) { return l4PktType(); } - else if constexpr (__id == 5) { return UdfL4DstPort(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return address(); } } template @@ -5023,63 +5160,21 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::AclTableActionType>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclTableActionType>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, - Parent>; - using Child = Path<::facebook::fboss::cfg::AclTableActionType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::LoadBalancerID); -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -5087,19 +5182,19 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebo template -class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SetTcAction, + ::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SetTcAction, + ::facebook::fboss::cfg::PktLenRange, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetTcAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PktLenRange>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -5110,20 +5205,30 @@ class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(tcValue, 1); + STRUCT_CHILD_GETTERS(min, 1); + STRUCT_CHILD_GETTERS(max, 2); + STRUCT_CHILD_GETTERS(invert, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return tcValue(); } + if constexpr (__id == 1) { return min(); } + else if constexpr (__id == 2) { return max(); } + else if constexpr (__id == 3) { return invert(); } } template @@ -5132,65 +5237,23 @@ class ChildThriftPath<::facebook::fboss::cfg::SetTcAction, ::facebook::fboss::fs } }; -template -class ChildThriftPath<::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>>, - Parent>; - using Child = ChildThriftPath<::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int16_t); -}; - -template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::NeighborResponseEntryFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::NeighborResponseEntryFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::NeighborResponseEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::PlatformConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::AggregatePortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PlatformConfig, + ::facebook::fboss::state::AggregatePortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PlatformConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PlatformConfig, + ::facebook::fboss::state::AggregatePortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PlatformConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>, Parent>; - using strings = ::facebook::fboss::cfg::platform_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -5199,40 +5262,65 @@ class ChildThriftPath<::facebook::fboss::cfg::PlatformConfig, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int16_t, ::std::int64_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::facebook::fboss::state::ParticipantInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(chip, 1); - STRUCT_CHILD_GETTERS(platformSettings, 3); - STRUCT_CHILD_GETTERS(switchIndexToSwitchId, 4); - STRUCT_CHILD_GETTERS(switchIndexToChipConfigs, 5); - STRUCT_CHILD_GETTERS(switchIndexToPlatformSettings, 6); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(name, 2); + STRUCT_CHILD_GETTERS(description, 3); + STRUCT_CHILD_GETTERS(systemPriority, 4); + STRUCT_CHILD_GETTERS(systemID, 5); + STRUCT_CHILD_GETTERS(minimumLinkCount, 6); + STRUCT_CHILD_GETTERS(ports, 7); + STRUCT_CHILD_GETTERS(portToFwdState, 8); + STRUCT_CHILD_GETTERS(portToPartnerState, 9); + STRUCT_CHILD_GETTERS(interfaceIDs, 10); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return chip(); } - else if constexpr (__id == 3) { return platformSettings(); } - else if constexpr (__id == 4) { return switchIndexToSwitchId(); } - else if constexpr (__id == 5) { return switchIndexToChipConfigs(); } - else if constexpr (__id == 6) { return switchIndexToPlatformSettings(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return name(); } + else if constexpr (__id == 3) { return description(); } + else if constexpr (__id == 4) { return systemPriority(); } + else if constexpr (__id == 5) { return systemID(); } + else if constexpr (__id == 6) { return minimumLinkCount(); } + else if constexpr (__id == 7) { return ports(); } + else if constexpr (__id == 8) { return portToFwdState(); } + else if constexpr (__id == 9) { return portToPartnerState(); } + else if constexpr (__id == 10) { return interfaceIDs(); } } template @@ -5243,21 +5331,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::phy::RxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::RxSettings, + ::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::RxSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::RxSettings, + ::facebook::fboss::cfg::StaticRouteNoNextHops, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::RxSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::StaticRouteNoNextHops>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -5266,8 +5354,271 @@ class ChildThriftPath<::facebook::fboss::phy::RxSettings, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(routerID, 1); + STRUCT_CHILD_GETTERS(prefix, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return routerID(); } + else if constexpr (__id == 2) { return prefix(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::PortPgConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::PortPgConfig, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::PortPgConfig, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>, + Parent>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::MMUScalingFactor, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::MMUScalingFactor>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(name, 2); + STRUCT_CHILD_GETTERS(scalingFactor, 3); + STRUCT_CHILD_GETTERS(minLimitBytes, 4); + STRUCT_CHILD_GETTERS(headroomLimitBytes, 5); + STRUCT_CHILD_GETTERS(resumeOffsetBytes, 6); + STRUCT_CHILD_GETTERS(bufferPoolName, 7); + STRUCT_CHILD_GETTERS(maxSharedXoffThresholdBytes, 8); + STRUCT_CHILD_GETTERS(minSharedXoffThresholdBytes, 9); + STRUCT_CHILD_GETTERS(maxSramXoffThresholdBytes, 10); + STRUCT_CHILD_GETTERS(minSramXoffThresholdBytes, 11); + STRUCT_CHILD_GETTERS(sramResumeOffsetBytes, 12); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return name(); } + else if constexpr (__id == 3) { return scalingFactor(); } + else if constexpr (__id == 4) { return minLimitBytes(); } + else if constexpr (__id == 5) { return headroomLimitBytes(); } + else if constexpr (__id == 6) { return resumeOffsetBytes(); } + else if constexpr (__id == 7) { return bufferPoolName(); } + else if constexpr (__id == 8) { return maxSharedXoffThresholdBytes(); } + else if constexpr (__id == 9) { return minSharedXoffThresholdBytes(); } + else if constexpr (__id == 10) { return maxSramXoffThresholdBytes(); } + else if constexpr (__id == 11) { return minSramXoffThresholdBytes(); } + else if constexpr (__id == 12) { return sramResumeOffsetBytes(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + +template +class ChildThriftPath<::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::string>>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PlatformAttributes>, ::apache::thrift::type::string_t>>, + Parent>; + using Child = ChildThriftPath<::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int16_t); +}; + +template +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::NeighborResponseEntryFields>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::NeighborResponseEntryFields>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::NeighborResponseEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::string); +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::PlatformConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::PlatformConfig, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PlatformConfig>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::PlatformConfig, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PlatformConfig>, + Parent>; + using strings = ::facebook::fboss::cfg::platform_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int16_t, ::std::int64_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int16_t, ::std::map<::facebook::fboss::cfg::PlatformAttributes, ::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(chip, 1); + STRUCT_CHILD_GETTERS(platformSettings, 3); + STRUCT_CHILD_GETTERS(switchIndexToSwitchId, 4); + STRUCT_CHILD_GETTERS(switchIndexToChipConfigs, 5); + STRUCT_CHILD_GETTERS(switchIndexToPlatformSettings, 6); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return chip(); } + else if constexpr (__id == 3) { return platformSettings(); } + else if constexpr (__id == 4) { return switchIndexToSwitchId(); } + else if constexpr (__id == 5) { return switchIndexToChipConfigs(); } + else if constexpr (__id == 6) { return switchIndexToPlatformSettings(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::phy::RxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::phy::RxSettings, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::RxSettings>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::phy::RxSettings, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::RxSettings>, + Parent>; + using strings = ::facebook::fboss::phy::phy_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, std::pair>, std::pair>, std::pair>, @@ -5300,7 +5651,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, @@ -5335,7 +5691,12 @@ std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -5371,7 +5732,12 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -5412,6 +5778,11 @@ std::pair auto operator()(const std::integral_constant&) { @@ -5450,6 +5821,11 @@ std::pair @@ -5673,21 +6049,21 @@ std::pair> template -class ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::PinConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QosRule, + ::facebook::fboss::phy::PinConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QosRule, + ::facebook::fboss::phy::PinConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinConfig>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -5696,25 +6072,40 @@ class ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::phy::RxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::phy::LaneMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(queueId, 1); - STRUCT_CHILD_GETTERS(dscp, 2); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(tx, 2); + STRUCT_CHILD_GETTERS(rx, 3); + STRUCT_CHILD_GETTERS(laneMap, 4); + STRUCT_CHILD_GETTERS(polaritySwap, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queueId(); } - else if constexpr (__id == 2) { return dscp(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return tx(); } + else if constexpr (__id == 3) { return rx(); } + else if constexpr (__id == 4) { return laneMap(); } + else if constexpr (__id == 5) { return polaritySwap(); } } template @@ -5725,21 +6116,21 @@ std::pair>> template -class ChildThriftPath<::facebook::fboss::phy::PinConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PinConfig, + ::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PinConfig, + ::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -5748,40 +6139,25 @@ class ChildThriftPath<::facebook::fboss::phy::PinConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::phy::RxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::phy::LaneMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(tx, 2); - STRUCT_CHILD_GETTERS(rx, 3); - STRUCT_CHILD_GETTERS(laneMap, 4); - STRUCT_CHILD_GETTERS(polaritySwap, 5); + STRUCT_CHILD_GETTERS(queueId, 1); + STRUCT_CHILD_GETTERS(dscp, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return tx(); } - else if constexpr (__id == 3) { return rx(); } - else if constexpr (__id == 4) { return laneMap(); } - else if constexpr (__id == 5) { return polaritySwap(); } + if constexpr (__id == 1) { return queueId(); } + else if constexpr (__id == 2) { return dscp(); } } template @@ -5791,21 +6167,42 @@ std::pair -class ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::std::int8_t>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, - ::apache::thrift::type::list<::apache::thrift::type::byte_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, Parent> { public: using Self = Path< - ::std::vector<::std::int8_t>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, - ::apache::thrift::type::list<::apache::thrift::type::byte_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, Parent>; - using Child = Path<::std::int8_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t, Self>; + using Child = Path<::facebook::fboss::cfg::SwitchType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int64_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Range64>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::Range64>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range64>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::Range64>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range64>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -5813,21 +6210,21 @@ class ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::Fsd template -class ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Vlan, + ::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, + ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Vlan, + ::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, + ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::mpls_tags::strings; template using Child = Path< ChildType, @@ -5836,65 +6233,30 @@ class ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::Fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + using Children = fatal::tuple>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::MplsActionCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MplsActionCode>>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(id, 2); - STRUCT_CHILD_GETTERS(recordStats, 3); - STRUCT_CHILD_GETTERS(routable, 5); - STRUCT_CHILD_GETTERS(ipAddresses, 6); - STRUCT_CHILD_GETTERS(dhcpRelayAddressV4, 7); - STRUCT_CHILD_GETTERS(dhcpRelayAddressV6, 8); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 9); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 10); - STRUCT_CHILD_GETTERS(intfID, 11); + STRUCT_CHILD_GETTERS(action, 1); + STRUCT_CHILD_GETTERS(swapLabel, 2); + STRUCT_CHILD_GETTERS(pushLabels, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return id(); } - else if constexpr (__id == 3) { return recordStats(); } - else if constexpr (__id == 5) { return routable(); } - else if constexpr (__id == 6) { return ipAddresses(); } - else if constexpr (__id == 7) { return dhcpRelayAddressV4(); } - else if constexpr (__id == 8) { return dhcpRelayAddressV6(); } - else if constexpr (__id == 9) { return dhcpRelayOverridesV4(); } - else if constexpr (__id == 10) { return dhcpRelayOverridesV6(); } - else if constexpr (__id == 11) { return intfID(); } + if constexpr (__id == 1) { return action(); } + else if constexpr (__id == 2) { return swapLabel(); } + else if constexpr (__id == 3) { return pushLabels(); } } template @@ -5905,19 +6267,19 @@ std::pair -class ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::RedirectToNextHopAction, + ::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::state::RedirectToNextHopAction, + ::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -5928,25 +6290,40 @@ class ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::faceb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>>, +std::pair>>, +std::pair>, +std::pair>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::AdminDistance, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::AdminDistance>>>, + std::pair, Child<::facebook::fboss::RouteForwardAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::RouteForwardAction>>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::AclLookupClass, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(action, 1); - STRUCT_CHILD_GETTERS(resolvedNexthops, 2); + STRUCT_CHILD_GETTERS(adminDistance, 1); + STRUCT_CHILD_GETTERS(action, 2); + STRUCT_CHILD_GETTERS(counterID, 3); + STRUCT_CHILD_GETTERS(classID, 4); + STRUCT_CHILD_GETTERS(nexthops, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return action(); } - else if constexpr (__id == 2) { return resolvedNexthops(); } + if constexpr (__id == 1) { return adminDistance(); } + else if constexpr (__id == 2) { return action(); } + else if constexpr (__id == 3) { return counterID(); } + else if constexpr (__id == 4) { return classID(); } + else if constexpr (__id == 5) { return nexthops(); } } template @@ -5957,21 +6334,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::state::SflowCollectorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::SflowCollectorFields, + ::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, Parent> { public: using Self = Path< - ::facebook::fboss::state::SflowCollectorFields, + ::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::SflowCollectorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -5980,25 +6357,40 @@ class ChildThriftPath<::facebook::fboss::state::SflowCollectorFields, ::facebook ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>>, +std::pair>>, +std::pair>>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::state::SocketAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, Child<::facebook::fboss::cfg::UdfMatchL2Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL2Type>>>, + std::pair, Child<::facebook::fboss::cfg::UdfMatchL3Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL3Type>>>, + std::pair, Child<::facebook::fboss::cfg::UdfMatchL4Type, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::UdfMatchL4Type>>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(address, 2); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(l2PktType, 2); + STRUCT_CHILD_GETTERS(l3pktType, 3); + STRUCT_CHILD_GETTERS(l4PktType, 4); + STRUCT_CHILD_GETTERS(UdfL4DstPort, 5); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return address(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return l2PktType(); } + else if constexpr (__id == 3) { return l3pktType(); } + else if constexpr (__id == 4) { return l4PktType(); } + else if constexpr (__id == 5) { return UdfL4DstPort(); } } template @@ -6007,23 +6399,44 @@ std::pair +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SwitchConfig, + ::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SwitchConfig, + ::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::bcm::BcmConfig>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::bcm::bcm_config_tags::strings; template using Child = Path< ChildType, @@ -6032,285 +6445,25 @@ class ChildThriftPath<::facebook::fboss::cfg::SwitchConfig, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Port>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Vlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::SflowCollector>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Lacp, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::LoadBalancer>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Mirror>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::TrafficCounter>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteWithNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticMplsRouteNoNextHops>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::StaticIp2MplsRoute>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::AclTableGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PortFlowletConfigName, ::facebook::fboss::cfg::PortFlowletConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(version, 1); - STRUCT_CHILD_GETTERS(ports, 2); - STRUCT_CHILD_GETTERS(vlans, 3); - STRUCT_CHILD_GETTERS(vlanPorts, 4); - STRUCT_CHILD_GETTERS(defaultVlan, 5); - STRUCT_CHILD_GETTERS(interfaces, 6); - STRUCT_CHILD_GETTERS(arpTimeoutSeconds, 7); - STRUCT_CHILD_GETTERS(arpRefreshSeconds, 8); - STRUCT_CHILD_GETTERS(arpAgerInterval, 9); - STRUCT_CHILD_GETTERS(proactiveArp, 10); - STRUCT_CHILD_GETTERS(cpuMAC, 11); - STRUCT_CHILD_GETTERS(staticRoutesWithNhops, 12); - STRUCT_CHILD_GETTERS(staticRoutesToNull, 13); - STRUCT_CHILD_GETTERS(staticRoutesToCPU, 14); - STRUCT_CHILD_GETTERS(acls, 15); - STRUCT_CHILD_GETTERS(maxNeighborProbes, 16); - STRUCT_CHILD_GETTERS(staleEntryInterval, 17); - STRUCT_CHILD_GETTERS(aggregatePorts, 18); - STRUCT_CHILD_GETTERS(clientIdToAdminDistance, 19); - STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV4, 20); - STRUCT_CHILD_GETTERS(dhcpRelaySrcOverrideV6, 21); - STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV4, 22); - STRUCT_CHILD_GETTERS(dhcpReplySrcOverrideV6, 23); - STRUCT_CHILD_GETTERS(globalEgressTrafficPolicy_DEPRECATED, 24); - STRUCT_CHILD_GETTERS(config_version, 25); - STRUCT_CHILD_GETTERS(sFlowCollectors, 26); - STRUCT_CHILD_GETTERS(lacp, 27); - STRUCT_CHILD_GETTERS(cpuQueues, 28); - STRUCT_CHILD_GETTERS(cpuTrafficPolicy, 29); - STRUCT_CHILD_GETTERS(loadBalancers, 30); - STRUCT_CHILD_GETTERS(dataPlaneTrafficPolicy, 31); - STRUCT_CHILD_GETTERS(mirrors, 32); - STRUCT_CHILD_GETTERS(trafficCounters, 33); - STRUCT_CHILD_GETTERS(qosPolicies, 34); - STRUCT_CHILD_GETTERS(defaultPortQueues, 35); - STRUCT_CHILD_GETTERS(staticMplsRoutesWithNhops, 36); - STRUCT_CHILD_GETTERS(staticMplsRoutesToNull, 37); - STRUCT_CHILD_GETTERS(staticMplsRoutesToCPU, 38); - STRUCT_CHILD_GETTERS(staticIp2MplsRoutes, 39); - STRUCT_CHILD_GETTERS(portQueueConfigs, 40); - STRUCT_CHILD_GETTERS(switchSettings, 41); - STRUCT_CHILD_GETTERS(qcmConfig, 42); - STRUCT_CHILD_GETTERS(portPgConfigs, 43); - STRUCT_CHILD_GETTERS(bufferPoolConfigs, 44); - STRUCT_CHILD_GETTERS(aclTableGroup, 45); - STRUCT_CHILD_GETTERS(sdkVersion, 46); - STRUCT_CHILD_GETTERS(ipInIpTunnels, 47); - STRUCT_CHILD_GETTERS(dsfNodes, 48); - STRUCT_CHILD_GETTERS(udfConfig, 49); - STRUCT_CHILD_GETTERS(flowletSwitchingConfig, 50); - STRUCT_CHILD_GETTERS(defaultVoqConfig, 51); - STRUCT_CHILD_GETTERS(portFlowletConfigs, 52); - STRUCT_CHILD_GETTERS(icmpV4UnavailableSrcAddress, 53); - STRUCT_CHILD_GETTERS(hostname, 54); + STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(yamlConfig, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return version(); } - else if constexpr (__id == 2) { return ports(); } - else if constexpr (__id == 3) { return vlans(); } - else if constexpr (__id == 4) { return vlanPorts(); } - else if constexpr (__id == 5) { return defaultVlan(); } - else if constexpr (__id == 6) { return interfaces(); } - else if constexpr (__id == 7) { return arpTimeoutSeconds(); } - else if constexpr (__id == 8) { return arpRefreshSeconds(); } - else if constexpr (__id == 9) { return arpAgerInterval(); } - else if constexpr (__id == 10) { return proactiveArp(); } - else if constexpr (__id == 11) { return cpuMAC(); } - else if constexpr (__id == 12) { return staticRoutesWithNhops(); } - else if constexpr (__id == 13) { return staticRoutesToNull(); } - else if constexpr (__id == 14) { return staticRoutesToCPU(); } - else if constexpr (__id == 15) { return acls(); } - else if constexpr (__id == 16) { return maxNeighborProbes(); } - else if constexpr (__id == 17) { return staleEntryInterval(); } - else if constexpr (__id == 18) { return aggregatePorts(); } - else if constexpr (__id == 19) { return clientIdToAdminDistance(); } - else if constexpr (__id == 20) { return dhcpRelaySrcOverrideV4(); } - else if constexpr (__id == 21) { return dhcpRelaySrcOverrideV6(); } - else if constexpr (__id == 22) { return dhcpReplySrcOverrideV4(); } - else if constexpr (__id == 23) { return dhcpReplySrcOverrideV6(); } - else if constexpr (__id == 24) { return globalEgressTrafficPolicy_DEPRECATED(); } - else if constexpr (__id == 25) { return config_version(); } - else if constexpr (__id == 26) { return sFlowCollectors(); } - else if constexpr (__id == 27) { return lacp(); } - else if constexpr (__id == 28) { return cpuQueues(); } - else if constexpr (__id == 29) { return cpuTrafficPolicy(); } - else if constexpr (__id == 30) { return loadBalancers(); } - else if constexpr (__id == 31) { return dataPlaneTrafficPolicy(); } - else if constexpr (__id == 32) { return mirrors(); } - else if constexpr (__id == 33) { return trafficCounters(); } - else if constexpr (__id == 34) { return qosPolicies(); } - else if constexpr (__id == 35) { return defaultPortQueues(); } - else if constexpr (__id == 36) { return staticMplsRoutesWithNhops(); } - else if constexpr (__id == 37) { return staticMplsRoutesToNull(); } - else if constexpr (__id == 38) { return staticMplsRoutesToCPU(); } - else if constexpr (__id == 39) { return staticIp2MplsRoutes(); } - else if constexpr (__id == 40) { return portQueueConfigs(); } - else if constexpr (__id == 41) { return switchSettings(); } - else if constexpr (__id == 42) { return qcmConfig(); } - else if constexpr (__id == 43) { return portPgConfigs(); } - else if constexpr (__id == 44) { return bufferPoolConfigs(); } - else if constexpr (__id == 45) { return aclTableGroup(); } - else if constexpr (__id == 46) { return sdkVersion(); } - else if constexpr (__id == 47) { return ipInIpTunnels(); } - else if constexpr (__id == 48) { return dsfNodes(); } - else if constexpr (__id == 49) { return udfConfig(); } - else if constexpr (__id == 50) { return flowletSwitchingConfig(); } - else if constexpr (__id == 51) { return defaultVoqConfig(); } - else if constexpr (__id == 52) { return portFlowletConfigs(); } - else if constexpr (__id == 53) { return icmpV4UnavailableSrcAddress(); } - else if constexpr (__id == 54) { return hostname(); } + if constexpr (__id == 1) { return config(); } + else if constexpr (__id == 2) { return yamlConfig(); } } template @@ -6321,21 +6474,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QueueMatchAction, + ::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QueueMatchAction, + ::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -6344,20 +6497,70 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::state::SendToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficCounter, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::ToCpuAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::ToCpuAction>>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::MacsecFlowAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::state::SetTc, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::FlowletAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::FlowletAction>>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(queueId, 1); + STRUCT_CHILD_GETTERS(sendToQueue, 1); + STRUCT_CHILD_GETTERS(trafficCounter, 2); + STRUCT_CHILD_GETTERS(setDscp, 3); + STRUCT_CHILD_GETTERS(ingressMirror, 4); + STRUCT_CHILD_GETTERS(egressMirror, 5); + STRUCT_CHILD_GETTERS(toCpuAction, 6); + STRUCT_CHILD_GETTERS(macsecFlow, 7); + STRUCT_CHILD_GETTERS(redirectToNextHop, 8); + STRUCT_CHILD_GETTERS(setTc, 9); + STRUCT_CHILD_GETTERS(userDefinedTrap, 10); + STRUCT_CHILD_GETTERS(flowletAction, 11); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queueId(); } + if constexpr (__id == 1) { return sendToQueue(); } + else if constexpr (__id == 2) { return trafficCounter(); } + else if constexpr (__id == 3) { return setDscp(); } + else if constexpr (__id == 4) { return ingressMirror(); } + else if constexpr (__id == 5) { return egressMirror(); } + else if constexpr (__id == 6) { return toCpuAction(); } + else if constexpr (__id == 7) { return macsecFlow(); } + else if constexpr (__id == 8) { return redirectToNextHop(); } + else if constexpr (__id == 9) { return setTc(); } + else if constexpr (__id == 10) { return userDefinedTrap(); } + else if constexpr (__id == 11) { return flowletAction(); } } template @@ -6366,21 +6569,42 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fbos } }; +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PacketCounterMatchAction, + ::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PacketCounterMatchAction, + ::facebook::fboss::cfg::Vlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Vlan>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -6391,20 +6615,65 @@ class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebo ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(counterName, 1); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(id, 2); + STRUCT_CHILD_GETTERS(recordStats, 3); + STRUCT_CHILD_GETTERS(routable, 5); + STRUCT_CHILD_GETTERS(ipAddresses, 6); + STRUCT_CHILD_GETTERS(dhcpRelayAddressV4, 7); + STRUCT_CHILD_GETTERS(dhcpRelayAddressV6, 8); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 9); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 10); + STRUCT_CHILD_GETTERS(intfID, 11); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return counterName(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return id(); } + else if constexpr (__id == 3) { return recordStats(); } + else if constexpr (__id == 5) { return routable(); } + else if constexpr (__id == 6) { return ipAddresses(); } + else if constexpr (__id == 7) { return dhcpRelayAddressV4(); } + else if constexpr (__id == 8) { return dhcpRelayAddressV6(); } + else if constexpr (__id == 9) { return dhcpRelayOverridesV4(); } + else if constexpr (__id == 10) { return dhcpRelayOverridesV6(); } + else if constexpr (__id == 11) { return intfID(); } } template @@ -6413,73 +6682,105 @@ class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebo } }; - template -class ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::MacAndVlan, + ::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, + ::apache::thrift::type::list<::apache::thrift::type::byte_t>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::MacAndVlan, + ::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>, + ::apache::thrift::type::list<::apache::thrift::type::byte_t>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using Child = Path<::std::int8_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t, Self>; + using Self::Self; - template - using TypeFor = typename Children::template type_of; + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AclTableActionType>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::AclTableActionType>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>>, + Parent>; + using Child = Path<::facebook::fboss::cfg::AclTableActionType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableActionType>, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(vlanID, 1); - STRUCT_CHILD_GETTERS(macAddress, 2); - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanID(); } - else if constexpr (__id == 2) { return macAddress(); } - } + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } +template +class ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::LoadBalancerID); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosPolicy>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::QosPolicy>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QueueCongestionDetection, + ::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QueueCongestionDetection, + ::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -6490,20 +6791,75 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebo ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::LinearQueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::facebook::fboss::cfg::SwitchingMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchingMode>>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(linear, 1); + STRUCT_CHILD_GETTERS(inactivityIntervalUsecs, 1); + STRUCT_CHILD_GETTERS(flowletTableSize, 2); + STRUCT_CHILD_GETTERS(dynamicEgressLoadExponent, 3); + STRUCT_CHILD_GETTERS(dynamicQueueExponent, 4); + STRUCT_CHILD_GETTERS(dynamicQueueMinThresholdBytes, 5); + STRUCT_CHILD_GETTERS(dynamicQueueMaxThresholdBytes, 6); + STRUCT_CHILD_GETTERS(dynamicSampleRate, 7); + STRUCT_CHILD_GETTERS(dynamicEgressMinThresholdBytes, 8); + STRUCT_CHILD_GETTERS(dynamicEgressMaxThresholdBytes, 9); + STRUCT_CHILD_GETTERS(dynamicPhysicalQueueExponent, 10); + STRUCT_CHILD_GETTERS(maxLinks, 11); + STRUCT_CHILD_GETTERS(switchingMode, 12); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return linear(); } + if constexpr (__id == 1) { return inactivityIntervalUsecs(); } + else if constexpr (__id == 2) { return flowletTableSize(); } + else if constexpr (__id == 3) { return dynamicEgressLoadExponent(); } + else if constexpr (__id == 4) { return dynamicQueueExponent(); } + else if constexpr (__id == 5) { return dynamicQueueMinThresholdBytes(); } + else if constexpr (__id == 6) { return dynamicQueueMaxThresholdBytes(); } + else if constexpr (__id == 7) { return dynamicSampleRate(); } + else if constexpr (__id == 8) { return dynamicEgressMinThresholdBytes(); } + else if constexpr (__id == 9) { return dynamicEgressMaxThresholdBytes(); } + else if constexpr (__id == 10) { return dynamicPhysicalQueueExponent(); } + else if constexpr (__id == 11) { return maxLinks(); } + else if constexpr (__id == 12) { return switchingMode(); } } template @@ -6512,23 +6868,44 @@ class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebo } }; +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::TransceiverConfigOverride, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::ChipConfig, + ::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::ChipConfig, + ::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, Parent>; - using strings = ::facebook::fboss::cfg::platform_config_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -6537,30 +6914,25 @@ class ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(bcm, 1); - STRUCT_CHILD_GETTERS(asic, 2); - STRUCT_CHILD_GETTERS(asicConfig, 3); + STRUCT_CHILD_GETTERS(value, 1); + STRUCT_CHILD_GETTERS(mask, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return bcm(); } - else if constexpr (__id == 2) { return asic(); } - else if constexpr (__id == 3) { return asicConfig(); } + if constexpr (__id == 1) { return value(); } + else if constexpr (__id == 2) { return mask(); } } template @@ -6569,166 +6941,44 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QcmConfig, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QcmConfig, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 1); - STRUCT_CHILD_GETTERS(flowLimit, 2); - STRUCT_CHILD_GETTERS(numFlowsClear, 3); - STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 4); - STRUCT_CHILD_GETTERS(exportThreshold, 5); - STRUCT_CHILD_GETTERS(flowWeights, 6); - STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 7); - STRUCT_CHILD_GETTERS(collectorDstIp, 8); - STRUCT_CHILD_GETTERS(collectorSrcPort, 10); - STRUCT_CHILD_GETTERS(collectorDstPort, 11); - STRUCT_CHILD_GETTERS(collectorDscp, 12); - STRUCT_CHILD_GETTERS(ppsToQcm, 13); - STRUCT_CHILD_GETTERS(collectorSrcIp, 14); - STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); - STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); - STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 17); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return numFlowSamplesPerView(); } - else if constexpr (__id == 2) { return flowLimit(); } - else if constexpr (__id == 3) { return numFlowsClear(); } - else if constexpr (__id == 4) { return scanIntervalInUsecs(); } - else if constexpr (__id == 5) { return exportThreshold(); } - else if constexpr (__id == 6) { return flowWeights(); } - else if constexpr (__id == 7) { return agingIntervalInMsecs(); } - else if constexpr (__id == 8) { return collectorDstIp(); } - else if constexpr (__id == 10) { return collectorSrcPort(); } - else if constexpr (__id == 11) { return collectorDstPort(); } - else if constexpr (__id == 12) { return collectorDscp(); } - else if constexpr (__id == 13) { return ppsToQcm(); } - else if constexpr (__id == 14) { return collectorSrcIp(); } - else if constexpr (__id == 15) { return monitorQcmPortList(); } - else if constexpr (__id == 16) { return port2QosQueueIds(); } - else if constexpr (__id == 17) { return monitorQcmCfgPortsOnly(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>, - Parent>; - using Child = Path<::facebook::fboss::cfg::SwitchType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MplsAction, + ::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::MplsAction, + ::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MplsAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, Parent>; - using strings = ::facebook::fboss::mpls_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -6737,30 +6987,25 @@ class ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::Fs ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::MplsActionCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MplsActionCode>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(action, 1); - STRUCT_CHILD_GETTERS(swapLabel, 2); - STRUCT_CHILD_GETTERS(pushLabels, 3); + STRUCT_CHILD_GETTERS(udfGroups, 1); + STRUCT_CHILD_GETTERS(udfPacketMatcher, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return action(); } - else if constexpr (__id == 2) { return swapLabel(); } - else if constexpr (__id == 3) { return pushLabels(); } + if constexpr (__id == 1) { return udfGroups(); } + else if constexpr (__id == 2) { return udfPacketMatcher(); } } template @@ -6771,21 +7016,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::state::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::MatchAction, + ::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, Parent> { public: using Self = Path< - ::facebook::fboss::state::MatchAction, + ::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MatchAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -6794,70 +7039,170 @@ class ChildThriftPath<::facebook::fboss::state::MatchAction, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::state::SendToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficCounter, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::ToCpuAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::ToCpuAction>>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::MacsecFlowAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::state::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::state::SetTc, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::FlowletAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::FlowletAction>>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(sendToQueue, 1); - STRUCT_CHILD_GETTERS(trafficCounter, 2); - STRUCT_CHILD_GETTERS(setDscp, 3); - STRUCT_CHILD_GETTERS(ingressMirror, 4); - STRUCT_CHILD_GETTERS(egressMirror, 5); - STRUCT_CHILD_GETTERS(toCpuAction, 6); - STRUCT_CHILD_GETTERS(macsecFlow, 7); - STRUCT_CHILD_GETTERS(redirectToNextHop, 8); - STRUCT_CHILD_GETTERS(setTc, 9); - STRUCT_CHILD_GETTERS(userDefinedTrap, 10); - STRUCT_CHILD_GETTERS(flowletAction, 11); + STRUCT_CHILD_GETTERS(pre, 1); + STRUCT_CHILD_GETTERS(pre2, 2); + STRUCT_CHILD_GETTERS(main, 3); + STRUCT_CHILD_GETTERS(post, 4); + STRUCT_CHILD_GETTERS(post2, 5); + STRUCT_CHILD_GETTERS(post3, 6); + STRUCT_CHILD_GETTERS(lutMode, 7); + STRUCT_CHILD_GETTERS(driveCurrent, 8); + STRUCT_CHILD_GETTERS(diffEncoderEn, 9); + STRUCT_CHILD_GETTERS(digGain, 10); + STRUCT_CHILD_GETTERS(ffeCoeff0, 11); + STRUCT_CHILD_GETTERS(ffeCoeff1, 12); + STRUCT_CHILD_GETTERS(ffeCoeff2, 13); + STRUCT_CHILD_GETTERS(ffeCoeff3, 14); + STRUCT_CHILD_GETTERS(ffeCoeff4, 15); + STRUCT_CHILD_GETTERS(parityEncoderEn, 16); + STRUCT_CHILD_GETTERS(thpEn, 17); + STRUCT_CHILD_GETTERS(setPrecode, 18); + STRUCT_CHILD_GETTERS(pre3, 19); + STRUCT_CHILD_GETTERS(driverSwing, 20); + STRUCT_CHILD_GETTERS(innerEyeNeg, 21); + STRUCT_CHILD_GETTERS(innerEyePos, 22); + STRUCT_CHILD_GETTERS(ffeCoeff5, 23); + STRUCT_CHILD_GETTERS(ldoBypass, 24); + STRUCT_CHILD_GETTERS(firPre1, 25); + STRUCT_CHILD_GETTERS(firPre2, 26); + STRUCT_CHILD_GETTERS(firPre3, 27); + STRUCT_CHILD_GETTERS(firMain, 28); + STRUCT_CHILD_GETTERS(firPost1, 29); + STRUCT_CHILD_GETTERS(firPost2, 30); + STRUCT_CHILD_GETTERS(firPost3, 31); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return sendToQueue(); } - else if constexpr (__id == 2) { return trafficCounter(); } - else if constexpr (__id == 3) { return setDscp(); } - else if constexpr (__id == 4) { return ingressMirror(); } - else if constexpr (__id == 5) { return egressMirror(); } - else if constexpr (__id == 6) { return toCpuAction(); } - else if constexpr (__id == 7) { return macsecFlow(); } - else if constexpr (__id == 8) { return redirectToNextHop(); } - else if constexpr (__id == 9) { return setTc(); } - else if constexpr (__id == 10) { return userDefinedTrap(); } - else if constexpr (__id == 11) { return flowletAction(); } + if constexpr (__id == 1) { return pre(); } + else if constexpr (__id == 2) { return pre2(); } + else if constexpr (__id == 3) { return main(); } + else if constexpr (__id == 4) { return post(); } + else if constexpr (__id == 5) { return post2(); } + else if constexpr (__id == 6) { return post3(); } + else if constexpr (__id == 7) { return lutMode(); } + else if constexpr (__id == 8) { return driveCurrent(); } + else if constexpr (__id == 9) { return diffEncoderEn(); } + else if constexpr (__id == 10) { return digGain(); } + else if constexpr (__id == 11) { return ffeCoeff0(); } + else if constexpr (__id == 12) { return ffeCoeff1(); } + else if constexpr (__id == 13) { return ffeCoeff2(); } + else if constexpr (__id == 14) { return ffeCoeff3(); } + else if constexpr (__id == 15) { return ffeCoeff4(); } + else if constexpr (__id == 16) { return parityEncoderEn(); } + else if constexpr (__id == 17) { return thpEn(); } + else if constexpr (__id == 18) { return setPrecode(); } + else if constexpr (__id == 19) { return pre3(); } + else if constexpr (__id == 20) { return driverSwing(); } + else if constexpr (__id == 21) { return innerEyeNeg(); } + else if constexpr (__id == 22) { return innerEyePos(); } + else if constexpr (__id == 23) { return ffeCoeff5(); } + else if constexpr (__id == 24) { return ldoBypass(); } + else if constexpr (__id == 25) { return firPre1(); } + else if constexpr (__id == 26) { return firPre2(); } + else if constexpr (__id == 27) { return firPre3(); } + else if constexpr (__id == 28) { return firMain(); } + else if constexpr (__id == 29) { return firPost1(); } + else if constexpr (__id == 30) { return firPost2(); } + else if constexpr (__id == 31) { return firPost3(); } } template @@ -6867,62 +7212,41 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, Parent>; - using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortPgConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::facebook::fboss::cfg::IPv6Field, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortPgConfigName); + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::IPv6Field); }; template -class ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::RedirectNextHop, + ::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::RedirectNextHop, + ::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -6933,25 +7257,35 @@ class ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>>, +std::pair>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Fields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ip, 1); - STRUCT_CHILD_GETTERS(intfID, 2); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(fieldSelection, 2); + STRUCT_CHILD_GETTERS(algorithm, 3); + STRUCT_CHILD_GETTERS(seed, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ip(); } - else if constexpr (__id == 2) { return intfID(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return fieldSelection(); } + else if constexpr (__id == 3) { return algorithm(); } + else if constexpr (__id == 4) { return seed(); } } template @@ -6960,23 +7294,44 @@ std::pair } }; +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + template -class ChildThriftPath<::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::NextHopThrift, + ::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, Parent> { public: using Self = Path< - ::facebook::fboss::NextHopThrift, + ::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, Parent>; - using strings = ::facebook::fboss::common_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -6985,35 +7340,25 @@ class ChildThriftPath<::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(address, 1); - STRUCT_CHILD_GETTERS(weight, 2); - STRUCT_CHILD_GETTERS(mplsAction, 3); - STRUCT_CHILD_GETTERS(disableTTLDecrement, 4); - + STRUCT_CHILD_GETTERS(remoteSystem, 1); + STRUCT_CHILD_GETTERS(remotePort, 2); + template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return address(); } - else if constexpr (__id == 2) { return weight(); } - else if constexpr (__id == 3) { return mplsAction(); } - else if constexpr (__id == 4) { return disableTTLDecrement(); } + if constexpr (__id == 1) { return remoteSystem(); } + else if constexpr (__id == 2) { return remotePort(); } } template @@ -7024,21 +7369,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::MinimumCapacity, + ::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::MinimumCapacity, + ::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::MinimumCapacity>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -7047,25 +7392,25 @@ class ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(linkCount, 1); - STRUCT_CHILD_GETTERS(linkPercentage, 2); + STRUCT_CHILD_GETTERS(rx, 1); + STRUCT_CHILD_GETTERS(tx, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return linkCount(); } - else if constexpr (__id == 2) { return linkPercentage(); } + if constexpr (__id == 1) { return rx(); } + else if constexpr (__id == 2) { return tx(); } } template @@ -7152,163 +7497,67 @@ class ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::face CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::TransportField); }; - template -class ChildThriftPath<::facebook::fboss::phy::PolaritySwap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PolaritySwap, + ::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PolaritySwap, + ::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PolaritySwap>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(rx, 1); - STRUCT_CHILD_GETTERS(tx, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return rx(); } - else if constexpr (__id == 2) { return tx(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int32_t); }; - template -class ChildThriftPath<::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::VlanFields, + ::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, Parent> { public: using Self = Path< - ::facebook::fboss::state::VlanFields, + ::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int16_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MacEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::cfg::AclTable, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(vlanId, 1); - STRUCT_CHILD_GETTERS(vlanName, 2); - STRUCT_CHILD_GETTERS(intfID, 3); - STRUCT_CHILD_GETTERS(dhcpV4Relay, 4); - STRUCT_CHILD_GETTERS(dhcpV6Relay, 5); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 6); - STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 7); - STRUCT_CHILD_GETTERS(ports, 8); - STRUCT_CHILD_GETTERS(arpTable, 9); - STRUCT_CHILD_GETTERS(arpResponseTable, 10); - STRUCT_CHILD_GETTERS(ndpTable, 11); - STRUCT_CHILD_GETTERS(ndpResponseTable, 12); - STRUCT_CHILD_GETTERS(macTable, 13); - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanId(); } - else if constexpr (__id == 2) { return vlanName(); } - else if constexpr (__id == 3) { return intfID(); } - else if constexpr (__id == 4) { return dhcpV4Relay(); } - else if constexpr (__id == 5) { return dhcpV6Relay(); } - else if constexpr (__id == 6) { return dhcpRelayOverridesV4(); } - else if constexpr (__id == 7) { return dhcpRelayOverridesV6(); } - else if constexpr (__id == 8) { return ports(); } - else if constexpr (__id == 9) { return arpTable(); } - else if constexpr (__id == 10) { return arpResponseTable(); } - else if constexpr (__id == 11) { return ndpTable(); } - else if constexpr (__id == 12) { return ndpResponseTable(); } - else if constexpr (__id == 13) { return macTable(); } - } + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } +template +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, + Parent>; + using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PacketRxReason); }; template @@ -7385,187 +7634,41 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, + ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, + ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, Parent>; - using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Child = ChildThriftPath<::facebook::fboss::phy::PhyState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PacketRxReason); + CONTAINER_CHILD_GETTERS(::std::string); }; + template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, + ::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, + ::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::SwitchSettingsFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::SflowTunnel, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::SflowTunnel, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(ip, 1); - STRUCT_CHILD_GETTERS(udpSrcPort, 2); - STRUCT_CHILD_GETTERS(udpDstPort, 3); - STRUCT_CHILD_GETTERS(ttl, 4); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ip(); } - else if constexpr (__id == 2) { return udpSrcPort(); } - else if constexpr (__id == 3) { return udpDstPort(); } - else if constexpr (__id == 4) { return ttl(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - -template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, - Parent>; - using Child = Path<::facebook::fboss::fsdb::FsdbSubscriptionState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - -template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::phy::PhyState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::phy::PhyState>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::PhyState>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::phy::PhyState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::AgentConfig, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::AgentConfig, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AgentConfig>, Parent>; using strings = ::facebook::fboss::cfg::agent_config_tags::strings; template @@ -7608,56 +7711,25 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortNeighbor, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortNeighbor, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(remoteSystem, 1); - STRUCT_CHILD_GETTERS(remotePort, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return remoteSystem(); } - else if constexpr (__id == 2) { return remotePort(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template @@ -7739,43 +7811,43 @@ std::pair> }; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, + ::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>>, + ::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AggregatePortFields>>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, Parent>; - using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::AggregatePortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::TransceiverAttributes, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::TransceiverAttributes, + ::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::TransceiverAttributes>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, Parent> { public: using Self = Path< - ::facebook::fboss::TransceiverAttributes, + ::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::TransceiverAttributes>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, Parent>; - using strings = ::facebook::fboss::transceiver_validation_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -7784,30 +7856,30 @@ class ChildThriftPath<::facebook::fboss::TransceiverAttributes, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::FirmwarePair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortProfileID>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(mediaInterfaceCode, 1); - STRUCT_CHILD_GETTERS(supportedFirmwareVersions, 2); - STRUCT_CHILD_GETTERS(supportedPortProfiles, 3); + STRUCT_CHILD_GETTERS(asicSdk, 1); + STRUCT_CHILD_GETTERS(saiSdk, 2); + STRUCT_CHILD_GETTERS(firmware, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return mediaInterfaceCode(); } - else if constexpr (__id == 2) { return supportedFirmwareVersions(); } - else if constexpr (__id == 3) { return supportedPortProfiles(); } + if constexpr (__id == 1) { return asicSdk(); } + else if constexpr (__id == 2) { return saiSdk(); } + else if constexpr (__id == 3) { return firmware(); } } template @@ -7818,21 +7890,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::MatchToAction, + ::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::MatchToAction, + ::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -7841,25 +7913,30 @@ class ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(matcher, 1); - STRUCT_CHILD_GETTERS(action, 2); + STRUCT_CHILD_GETTERS(v6, 1); + STRUCT_CHILD_GETTERS(prefix, 2); + STRUCT_CHILD_GETTERS(mask, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return matcher(); } - else if constexpr (__id == 2) { return action(); } + if constexpr (__id == 1) { return v6(); } + else if constexpr (__id == 2) { return prefix(); } + else if constexpr (__id == 3) { return mask(); } } template @@ -7870,19 +7947,19 @@ std::pair template -class ChildThriftPath<::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::BlockedMacAddress, + ::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, Parent> { public: using Self = Path< - ::facebook::fboss::state::BlockedMacAddress, + ::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -7893,25 +7970,30 @@ class ChildThriftPath<::facebook::fboss::state::BlockedMacAddress, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::PortQueueFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(macAddrToBlockVlanID, 1); - STRUCT_CHILD_GETTERS(macAddrToBlockAddr, 2); + STRUCT_CHILD_GETTERS(queues, 1); + STRUCT_CHILD_GETTERS(rxReasonToQueue, 2); + STRUCT_CHILD_GETTERS(defaultQosPolicy, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return macAddrToBlockVlanID(); } - else if constexpr (__id == 2) { return macAddrToBlockAddr(); } + if constexpr (__id == 1) { return queues(); } + else if constexpr (__id == 2) { return rxReasonToQueue(); } + else if constexpr (__id == 3) { return defaultQosPolicy(); } } template @@ -7920,44 +8002,23 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::RouteFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SflowCollector, + ::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SflowCollector, + ::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -7966,25 +8027,35 @@ class ChildThriftPath<::facebook::fboss::cfg::SflowCollector, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>, + std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>, + std::pair, Child<::facebook::fboss::TransceiverManagementInterface, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::TransceiverManagementInterface>>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ip, 1); - STRUCT_CHILD_GETTERS(port, 2); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(cableLength, 2); + STRUCT_CHILD_GETTERS(mediaInterface, 3); + STRUCT_CHILD_GETTERS(managementInterface, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ip(); } - else if constexpr (__id == 2) { return port(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return cableLength(); } + else if constexpr (__id == 3) { return mediaInterface(); } + else if constexpr (__id == 4) { return managementInterface(); } } template @@ -7993,44 +8064,23 @@ std::pair>> } }; -template -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::SystemPortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int64_t); -}; - template -class ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::TransceiverAttributes, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::ControlPlaneFields, + ::facebook::fboss::TransceiverAttributes, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::TransceiverAttributes>, Parent> { public: using Self = Path< - ::facebook::fboss::state::ControlPlaneFields, + ::facebook::fboss::TransceiverAttributes, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::TransceiverAttributes>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::transceiver_validation_tags::strings; template using Child = Path< ChildType, @@ -8039,30 +8089,30 @@ class ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook:: ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::PortQueueFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::FirmwarePair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortProfileID>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(queues, 1); - STRUCT_CHILD_GETTERS(rxReasonToQueue, 2); - STRUCT_CHILD_GETTERS(defaultQosPolicy, 3); + STRUCT_CHILD_GETTERS(mediaInterfaceCode, 1); + STRUCT_CHILD_GETTERS(supportedFirmwareVersions, 2); + STRUCT_CHILD_GETTERS(supportedPortProfiles, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queues(); } - else if constexpr (__id == 2) { return rxReasonToQueue(); } - else if constexpr (__id == 3) { return defaultQosPolicy(); } + if constexpr (__id == 1) { return mediaInterfaceCode(); } + else if constexpr (__id == 2) { return supportedFirmwareVersions(); } + else if constexpr (__id == 3) { return supportedPortProfiles(); } } template @@ -8073,21 +8123,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::switch_reachability::SwitchReachability, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::switch_reachability::SwitchReachability, + ::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>, Parent> { public: using Self = Path< - ::facebook::fboss::switch_reachability::SwitchReachability, + ::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>, Parent>; - using strings = ::facebook::fboss::switch_reachability::switch_reachability_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -8096,25 +8146,25 @@ class ChildThriftPath<::facebook::fboss::switch_reachability::SwitchReachability ChildTag, Self >; - using Children = fatal::tuple>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::MatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(fabricPortGroupMap, 1); - STRUCT_CHILD_GETTERS(switchIdToFabricPortGroupMap, 2); + STRUCT_CHILD_GETTERS(matcher, 1); + STRUCT_CHILD_GETTERS(action, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return fabricPortGroupMap(); } - else if constexpr (__id == 2) { return switchIdToFabricPortGroupMap(); } + if constexpr (__id == 1) { return matcher(); } + else if constexpr (__id == 2) { return action(); } } template @@ -8123,121 +8173,86 @@ std::pair +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::string); +}; template -class ChildThriftPath<::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MediaLaneSignals, + ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, Parent> { public: using Self = Path< - ::facebook::fboss::MediaLaneSignals, + ::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>>, Parent>; - using strings = ::facebook::fboss::transceiver_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = Path<::facebook::fboss::fsdb::FsdbSubscriptionState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::fsdb::FsdbSubscriptionState>, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(txLos, 2); - STRUCT_CHILD_GETTERS(rxLos, 3); - STRUCT_CHILD_GETTERS(txLol, 4); - STRUCT_CHILD_GETTERS(rxLol, 5); - STRUCT_CHILD_GETTERS(txFault, 6); - STRUCT_CHILD_GETTERS(txAdaptEqFault, 7); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return txLos(); } - else if constexpr (__id == 3) { return rxLos(); } - else if constexpr (__id == 4) { return txLol(); } - else if constexpr (__id == 5) { return rxLol(); } - else if constexpr (__id == 6) { return txFault(); } - else if constexpr (__id == 7) { return txAdaptEqFault(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, + ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, + ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::AclEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::FibContainerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::string); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PinID, + ::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PinID, + ::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -8246,25 +8261,25 @@ class ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::Fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(chip, 1); - STRUCT_CHILD_GETTERS(lane, 2); + STRUCT_CHILD_GETTERS(trafficClass, 1); + STRUCT_CHILD_GETTERS(attr, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return chip(); } - else if constexpr (__id == 2) { return lane(); } + if constexpr (__id == 1) { return trafficClass(); } + else if constexpr (__id == 2) { return attr(); } } template @@ -8274,62 +8289,41 @@ std::pair>> }; template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, - Parent>; - using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BurstMonitorWeight); -}; - -template -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, + ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, + ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int16_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::DataPlanePhyChip, + ::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::DataPlanePhyChip, + ::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, Parent>; using strings = ::facebook::fboss::phy::phy_tags::strings; template @@ -8340,30 +8334,50 @@ class ChildThriftPath<::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::phy::DataPlanePhyChipType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::phy::DataPlanePhyChipType>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(type, 2); - STRUCT_CHILD_GETTERS(physicalID, 3); + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(signalDetectLive, 2); + STRUCT_CHILD_GETTERS(signalDetectChanged, 3); + STRUCT_CHILD_GETTERS(cdrLockLive, 4); + STRUCT_CHILD_GETTERS(cdrLockChanged, 5); + STRUCT_CHILD_GETTERS(txSettings, 6); + STRUCT_CHILD_GETTERS(rxFrequencyPPM, 7); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return type(); } - else if constexpr (__id == 3) { return physicalID(); } + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return signalDetectLive(); } + else if constexpr (__id == 3) { return signalDetectChanged(); } + else if constexpr (__id == 4) { return cdrLockLive(); } + else if constexpr (__id == 5) { return cdrLockChanged(); } + else if constexpr (__id == 6) { return txSettings(); } + else if constexpr (__id == 7) { return rxFrequencyPPM(); } } template @@ -8374,21 +8388,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::state::IpTunnelFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::IpTunnelFields, + ::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::state::IpTunnelFields, + ::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::asic::asic_config_tags::strings; template using Child = Path< ChildType, @@ -8397,75 +8411,20 @@ class ChildThriftPath<::facebook::fboss::state::IpTunnelFields, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(ipTunnelId, 1); - STRUCT_CHILD_GETTERS(underlayIntfId, 2); - STRUCT_CHILD_GETTERS(mode, 3); - STRUCT_CHILD_GETTERS(dstIp, 4); - STRUCT_CHILD_GETTERS(type, 5); - STRUCT_CHILD_GETTERS(tunnelTermType, 6); - STRUCT_CHILD_GETTERS(ttlMode, 7); - STRUCT_CHILD_GETTERS(dscpMode, 8); - STRUCT_CHILD_GETTERS(ecnMode, 9); - STRUCT_CHILD_GETTERS(srcIp, 10); - STRUCT_CHILD_GETTERS(dstIpMask, 11); - STRUCT_CHILD_GETTERS(srcIpMask, 12); + STRUCT_CHILD_GETTERS(config, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ipTunnelId(); } - else if constexpr (__id == 2) { return underlayIntfId(); } - else if constexpr (__id == 3) { return mode(); } - else if constexpr (__id == 4) { return dstIp(); } - else if constexpr (__id == 5) { return type(); } - else if constexpr (__id == 6) { return tunnelTermType(); } - else if constexpr (__id == 7) { return ttlMode(); } - else if constexpr (__id == 8) { return dscpMode(); } - else if constexpr (__id == 9) { return ecnMode(); } - else if constexpr (__id == 10) { return srcIp(); } - else if constexpr (__id == 11) { return dstIpMask(); } - else if constexpr (__id == 12) { return srcIpMask(); } + if constexpr (__id == 1) { return config(); } } template @@ -8474,101 +8433,86 @@ std::pair -class ChildThriftPath<::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MediaInterfaceId, + ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, Parent> { public: using Self = Path< - ::facebook::fboss::MediaInterfaceId, + ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, Parent>; - using strings = ::facebook::fboss::transceiver_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::MediaInterfaceUnion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = Path<::facebook::fboss::cfg::AclTableQualifier, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(media, 2); - STRUCT_CHILD_GETTERS(code, 3); - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return media(); } - else if constexpr (__id == 3) { return code(); } - } + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } +template +class ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::state::Subport>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::state::Subport>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::Subport, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, + ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, + ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::BufferPoolFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortQueueConfigName); }; template -class ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::TeFlow, + ::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, Parent> { public: using Self = Path< - ::facebook::fboss::TeFlow, + ::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, Parent>; - using strings = ::facebook::fboss::ctrl_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -8577,25 +8521,35 @@ class ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOp ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(srcPort, 1); - STRUCT_CHILD_GETTERS(dstPrefix, 2); + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(scalingFactor, 2); + STRUCT_CHILD_GETTERS(loadWeight, 3); + STRUCT_CHILD_GETTERS(queueWeight, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return srcPort(); } - else if constexpr (__id == 2) { return dstPrefix(); } + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return scalingFactor(); } + else if constexpr (__id == 3) { return loadWeight(); } + else if constexpr (__id == 4) { return queueWeight(); } } template @@ -8606,21 +8560,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::BufferPoolConfig, + ::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::BufferPoolConfig, + ::facebook::fboss::state::BlockedMacAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedMacAddress>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -8629,30 +8583,25 @@ class ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fbos ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(sharedBytes, 1); - STRUCT_CHILD_GETTERS(headroomBytes, 2); - STRUCT_CHILD_GETTERS(reservedBytes, 3); + STRUCT_CHILD_GETTERS(macAddrToBlockVlanID, 1); + STRUCT_CHILD_GETTERS(macAddrToBlockAddr, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return sharedBytes(); } - else if constexpr (__id == 2) { return headroomBytes(); } - else if constexpr (__id == 3) { return reservedBytes(); } + if constexpr (__id == 1) { return macAddrToBlockVlanID(); } + else if constexpr (__id == 2) { return macAddrToBlockAddr(); } } template @@ -8662,75 +8611,138 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::std::string>, + ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::std::string>, + ::std::map<::std::string, ::facebook::fboss::state::RouteFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteFields>>, Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::RouteFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::string); }; - template -class ChildThriftPath<::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortFlowletConfig, + ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortFlowletConfig, + ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(scalingFactor, 1); - STRUCT_CHILD_GETTERS(loadWeight, 2); - STRUCT_CHILD_GETTERS(queueWeight, 3); - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return scalingFactor(); } - else if constexpr (__id == 2) { return loadWeight(); } - else if constexpr (__id == 3) { return queueWeight(); } + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AggregatePortMember, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::ClientID); +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::AclUdfEntry, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::AclUdfEntry, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, + Parent>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(udfGroup, 1); + STRUCT_CHILD_GETTERS(roceBytes, 2); + STRUCT_CHILD_GETTERS(roceMask, 3); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return udfGroup(); } + else if constexpr (__id == 2) { return roceBytes(); } + else if constexpr (__id == 3) { return roceMask(); } } template @@ -8739,46 +8751,168 @@ std::pair -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, + ::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, + ::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, Parent>; - using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::PacketRxReason, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(rxReason, 1); + STRUCT_CHILD_GETTERS(queueId, 2); - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return rxReason(); } + else if constexpr (__id == 2) { return queueId(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; + template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, + ::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, + ::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(dscp, 3); + STRUCT_CHILD_GETTERS(truncate, 4); + STRUCT_CHILD_GETTERS(configHasEgressPort, 5); + STRUCT_CHILD_GETTERS(egressPort, 6); + STRUCT_CHILD_GETTERS(destinationIp, 7); + STRUCT_CHILD_GETTERS(srcIp, 8); + STRUCT_CHILD_GETTERS(udpSrcPort, 9); + STRUCT_CHILD_GETTERS(udpDstPort, 10); + STRUCT_CHILD_GETTERS(tunnel, 11); + STRUCT_CHILD_GETTERS(isResolved, 12); + STRUCT_CHILD_GETTERS(switchId, 13); + STRUCT_CHILD_GETTERS(egressPortDesc, 14); + STRUCT_CHILD_GETTERS(samplingRate, 15); - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 3) { return dscp(); } + else if constexpr (__id == 4) { return truncate(); } + else if constexpr (__id == 5) { return configHasEgressPort(); } + else if constexpr (__id == 6) { return egressPort(); } + else if constexpr (__id == 7) { return destinationIp(); } + else if constexpr (__id == 8) { return srcIp(); } + else if constexpr (__id == 9) { return udpSrcPort(); } + else if constexpr (__id == 10) { return udpDstPort(); } + else if constexpr (__id == 11) { return tunnel(); } + else if constexpr (__id == 12) { return isResolved(); } + else if constexpr (__id == 13) { return switchId(); } + else if constexpr (__id == 14) { return egressPortDesc(); } + else if constexpr (__id == 15) { return samplingRate(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; @@ -8982,21 +9116,21 @@ class ChildThriftPath<::std::set<::std::int32_t>, ::facebook::fboss::fsdb::FsdbO template -class ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::switch_reachability::SwitchReachability, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::VlanPort, + ::facebook::fboss::switch_reachability::SwitchReachability, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, + ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::VlanPort, + ::facebook::fboss::switch_reachability::SwitchReachability, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, + ::apache::thrift::type::struct_t<::facebook::fboss::switch_reachability::SwitchReachability>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::switch_reachability::switch_reachability_tags::strings; template using Child = Path< ChildType, @@ -9005,35 +9139,25 @@ class ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::facebook::fboss::cfg::SpanningTreeState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SpanningTreeState>>>, - std::pair, Child>>; + using Children = fatal::tuple>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(vlanID, 1); - STRUCT_CHILD_GETTERS(logicalPort, 2); - STRUCT_CHILD_GETTERS(spanningTreeState, 3); - STRUCT_CHILD_GETTERS(emitTags, 4); + STRUCT_CHILD_GETTERS(fabricPortGroupMap, 1); + STRUCT_CHILD_GETTERS(switchIdToFabricPortGroupMap, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanID(); } - else if constexpr (__id == 2) { return logicalPort(); } - else if constexpr (__id == 3) { return spanningTreeState(); } - else if constexpr (__id == 4) { return emitTags(); } + if constexpr (__id == 1) { return fabricPortGroupMap(); } + else if constexpr (__id == 2) { return switchIdToFabricPortGroupMap(); } } template @@ -9042,63 +9166,119 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::VlanPort>, + ::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::VlanPort>, + ::facebook::fboss::MediaLaneSignals, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSignals>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::transceiver_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(txLos, 2); + STRUCT_CHILD_GETTERS(rxLos, 3); + STRUCT_CHILD_GETTERS(txLol, 4); + STRUCT_CHILD_GETTERS(rxLol, 5); + STRUCT_CHILD_GETTERS(txFault, 6); + STRUCT_CHILD_GETTERS(txAdaptEqFault, 7); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return txLos(); } + else if constexpr (__id == 3) { return rxLos(); } + else if constexpr (__id == 4) { return txLol(); } + else if constexpr (__id == 5) { return rxLol(); } + else if constexpr (__id == 6) { return txFault(); } + else if constexpr (__id == 7) { return txAdaptEqFault(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::vector<::facebook::fboss::HostLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::HostLaneSettings>, + ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::HostLaneSettings>, + ::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::AclEntryFields>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::HostLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::AclEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::PmdState, + ::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::PmdState, + ::facebook::fboss::phy::PinID, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PinID>, Parent>; using strings = ::facebook::fboss::phy::phy_tags::strings; template @@ -9109,20 +9289,25 @@ class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lanes, 1); + STRUCT_CHILD_GETTERS(chip, 1); + STRUCT_CHILD_GETTERS(lane, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lanes(); } + if constexpr (__id == 1) { return chip(); } + else if constexpr (__id == 2) { return lane(); } } template @@ -9131,101 +9316,65 @@ class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb: } }; - template -class ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::network::thrift::BinaryAddress, + ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, Parent> { public: using Self = Path< - ::facebook::network::thrift::BinaryAddress, + ::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::BurstMonitorWeight>, ::apache::thrift::type::i16_t>, Parent>; - using strings = ::facebook::network::thrift::Address_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::folly::fbstring, ::apache::thrift::type_class::binary, ::apache::thrift::type::cpp_type<::folly::fbstring, ::apache::thrift::type::binary_t>>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(addr, 1); - STRUCT_CHILD_GETTERS(port, 2); - STRUCT_CHILD_GETTERS(ifName, 3); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return addr(); } - else if constexpr (__id == 2) { return port(); } - else if constexpr (__id == 3) { return ifName(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BurstMonitorWeight); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::state::BlockedNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::BlockedNeighbor>, + ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::BlockedNeighbor>, + ::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Neighbor, + ::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Neighbor, + ::facebook::fboss::phy::DataPlanePhyChip, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::DataPlanePhyChip>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -9234,25 +9383,30 @@ class ChildThriftPath<::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::phy::DataPlanePhyChipType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::phy::DataPlanePhyChipType>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(vlanID, 1); - STRUCT_CHILD_GETTERS(ipAddress, 2); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(type, 2); + STRUCT_CHILD_GETTERS(physicalID, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return vlanID(); } - else if constexpr (__id == 2) { return ipAddress(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return type(); } + else if constexpr (__id == 3) { return physicalID(); } } template @@ -9261,86 +9415,125 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::IpTunnelFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, + ::facebook::fboss::state::IpTunnelFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, + ::facebook::fboss::state::IpTunnelFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>, Parent>; - using Child = ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; -template -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::PortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(ipTunnelId, 1); + STRUCT_CHILD_GETTERS(underlayIntfId, 2); + STRUCT_CHILD_GETTERS(mode, 3); + STRUCT_CHILD_GETTERS(dstIp, 4); + STRUCT_CHILD_GETTERS(type, 5); + STRUCT_CHILD_GETTERS(tunnelTermType, 6); + STRUCT_CHILD_GETTERS(ttlMode, 7); + STRUCT_CHILD_GETTERS(dscpMode, 8); + STRUCT_CHILD_GETTERS(ecnMode, 9); + STRUCT_CHILD_GETTERS(srcIp, 10); + STRUCT_CHILD_GETTERS(dstIpMask, 11); + STRUCT_CHILD_GETTERS(srcIpMask, 12); - CONTAINER_CHILD_GETTERS(::std::int16_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return ipTunnelId(); } + else if constexpr (__id == 2) { return underlayIntfId(); } + else if constexpr (__id == 3) { return mode(); } + else if constexpr (__id == 4) { return dstIp(); } + else if constexpr (__id == 5) { return type(); } + else if constexpr (__id == 6) { return tunnelTermType(); } + else if constexpr (__id == 7) { return ttlMode(); } + else if constexpr (__id == 8) { return dscpMode(); } + else if constexpr (__id == 9) { return ecnMode(); } + else if constexpr (__id == 10) { return srcIp(); } + else if constexpr (__id == 11) { return dstIpMask(); } + else if constexpr (__id == 12) { return srcIpMask(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PfcWatchdog, + ::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PfcWatchdog, + ::facebook::fboss::MediaInterfaceId, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaInterfaceId>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::transceiver_tags::strings; template using Child = Path< ChildType, @@ -9349,30 +9542,30 @@ class ChildThriftPath<::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::facebook::fboss::cfg::PfcWatchdogRecoveryAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PfcWatchdogRecoveryAction>>>>; + std::pair, ChildThriftPath<::facebook::fboss::MediaInterfaceUnion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(detectionTimeMsecs, 1); - STRUCT_CHILD_GETTERS(recoveryTimeMsecs, 2); - STRUCT_CHILD_GETTERS(recoveryAction, 3); + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(media, 2); + STRUCT_CHILD_GETTERS(code, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return detectionTimeMsecs(); } - else if constexpr (__id == 2) { return recoveryTimeMsecs(); } - else if constexpr (__id == 3) { return recoveryAction(); } + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return media(); } + else if constexpr (__id == 3) { return code(); } } template @@ -9382,64 +9575,43 @@ std::pair -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int64_t); -}; - -template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::BufferPoolFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::BufferPoolFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::BufferPoolFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BufferPoolConfigName); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template -class ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::LoadBalancerFields, + ::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, Parent> { public: using Self = Path< - ::facebook::fboss::state::LoadBalancerFields, + ::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::TeFlow>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::ctrl_tags::strings; template using Child = Path< ChildType, @@ -9448,55 +9620,25 @@ class ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook:: ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, - std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv4Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::MPLSField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(algorithm, 2); - STRUCT_CHILD_GETTERS(seed, 3); - STRUCT_CHILD_GETTERS(v4Fields, 4); - STRUCT_CHILD_GETTERS(v6Fields, 5); - STRUCT_CHILD_GETTERS(transportFields, 6); - STRUCT_CHILD_GETTERS(mplsFields, 7); - STRUCT_CHILD_GETTERS(udfGroups, 8); + STRUCT_CHILD_GETTERS(srcPort, 1); + STRUCT_CHILD_GETTERS(dstPrefix, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return algorithm(); } - else if constexpr (__id == 3) { return seed(); } - else if constexpr (__id == 4) { return v4Fields(); } - else if constexpr (__id == 5) { return v6Fields(); } - else if constexpr (__id == 6) { return transportFields(); } - else if constexpr (__id == 7) { return mplsFields(); } - else if constexpr (__id == 8) { return udfGroups(); } + if constexpr (__id == 1) { return srcPort(); } + else if constexpr (__id == 2) { return dstPrefix(); } } template @@ -9507,21 +9649,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::fsdb::AgentData, + ::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::fsdb::AgentData, + ::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>, Parent>; - using strings = ::facebook::fboss::fsdb::fsdb_model_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -9530,35 +9672,30 @@ class ChildThriftPath<::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::state::SwitchState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::switch_reachability::SwitchReachability>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); - STRUCT_CHILD_GETTERS(switchState, 2); - STRUCT_CHILD_GETTERS(fsdbSubscriptions, 4); - STRUCT_CHILD_GETTERS(dsfSwitchReachability, 5); + STRUCT_CHILD_GETTERS(sharedBytes, 1); + STRUCT_CHILD_GETTERS(headroomBytes, 2); + STRUCT_CHILD_GETTERS(reservedBytes, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } - else if constexpr (__id == 2) { return switchState(); } - else if constexpr (__id == 4) { return fsdbSubscriptions(); } - else if constexpr (__id == 5) { return dsfSwitchReachability(); } + if constexpr (__id == 1) { return sharedBytes(); } + else if constexpr (__id == 2) { return headroomBytes(); } + else if constexpr (__id == 3) { return reservedBytes(); } } template @@ -9568,41 +9705,41 @@ std::pair -class ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::std::int32_t>, + ::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::std::int32_t>, + ::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::string>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, Parent>; - using Child = Path<::std::int32_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t, Self>; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template -class ChildThriftPath<::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::NdpConfig, + ::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::NdpConfig, + ::facebook::fboss::cfg::PortFlowletConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortFlowletConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -9613,55 +9750,30 @@ class ChildThriftPath<::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(routerAdvertisementSeconds, 1); - STRUCT_CHILD_GETTERS(curHopLimit, 2); - STRUCT_CHILD_GETTERS(routerLifetime, 3); - STRUCT_CHILD_GETTERS(prefixValidLifetimeSeconds, 4); - STRUCT_CHILD_GETTERS(prefixPreferredLifetimeSeconds, 5); - STRUCT_CHILD_GETTERS(routerAdvertisementManagedBit, 6); - STRUCT_CHILD_GETTERS(routerAdvertisementOtherBit, 7); - STRUCT_CHILD_GETTERS(routerAddress, 8); + STRUCT_CHILD_GETTERS(scalingFactor, 1); + STRUCT_CHILD_GETTERS(loadWeight, 2); + STRUCT_CHILD_GETTERS(queueWeight, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return routerAdvertisementSeconds(); } - else if constexpr (__id == 2) { return curHopLimit(); } - else if constexpr (__id == 3) { return routerLifetime(); } - else if constexpr (__id == 4) { return prefixValidLifetimeSeconds(); } - else if constexpr (__id == 5) { return prefixPreferredLifetimeSeconds(); } - else if constexpr (__id == 6) { return routerAdvertisementManagedBit(); } - else if constexpr (__id == 7) { return routerAdvertisementOtherBit(); } - else if constexpr (__id == 8) { return routerAddress(); } + if constexpr (__id == 1) { return scalingFactor(); } + else if constexpr (__id == 2) { return loadWeight(); } + else if constexpr (__id == 3) { return queueWeight(); } } template @@ -9670,21 +9782,63 @@ std::pair +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>>, + Parent>; + using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); +}; template -class ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::QosPolicy, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::MirrorFields>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>>>, + Parent>; + using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MirrorFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::QosPolicy, + ::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -9695,30 +9849,35 @@ class ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::QosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::facebook::fboss::cfg::SpanningTreeState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SpanningTreeState>>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(rules, 2); - STRUCT_CHILD_GETTERS(qosMap, 3); + STRUCT_CHILD_GETTERS(vlanID, 1); + STRUCT_CHILD_GETTERS(logicalPort, 2); + STRUCT_CHILD_GETTERS(spanningTreeState, 3); + STRUCT_CHILD_GETTERS(emitTags, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return rules(); } - else if constexpr (__id == 3) { return qosMap(); } + if constexpr (__id == 1) { return vlanID(); } + else if constexpr (__id == 2) { return logicalPort(); } + else if constexpr (__id == 3) { return spanningTreeState(); } + else if constexpr (__id == 4) { return emitTags(); } } template @@ -9727,23 +9886,65 @@ std::pair } }; - template -class ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::VlanPort>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::CPUTrafficPolicyConfig, + ::std::vector<::facebook::fboss::cfg::VlanPort>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::cfg::VlanPort>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::VlanPort>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::VlanPort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::HostLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::HostLaneSettings>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, + Parent> { + public: + using Self = Path< + ::std::vector<::facebook::fboss::HostLaneSettings>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::HostLaneSettings>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::HostLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + + +template +class ChildThriftPath<::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::CPUTrafficPolicyConfig, + ::facebook::fboss::phy::PmdState, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::phy::PmdState>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::phy::phy_tags::strings; template using Child = Path< ChildType, @@ -9752,30 +9953,20 @@ class ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::phy::LaneState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(trafficPolicy, 1); - STRUCT_CHILD_GETTERS(rxReasonToCPUQueue, 2); - STRUCT_CHILD_GETTERS(rxReasonToQueueOrderedList, 3); + STRUCT_CHILD_GETTERS(lanes, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return trafficPolicy(); } - else if constexpr (__id == 2) { return rxReasonToCPUQueue(); } - else if constexpr (__id == 3) { return rxReasonToQueueOrderedList(); } + if constexpr (__id == 1) { return lanes(); } } template @@ -9784,43 +9975,79 @@ std::pair -class ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int32_t, ::std::string>, + ::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, Parent> { public: using Self = Path< - ::std::map<::std::int32_t, ::std::string>, + ::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::string>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::network::thrift::BinaryAddress>, Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using strings = ::facebook::network::thrift::Address_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::folly::fbstring, ::apache::thrift::type_class::binary, ::apache::thrift::type::cpp_type<::folly::fbstring, ::apache::thrift::type::binary_t>>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(addr, 1); + STRUCT_CHILD_GETTERS(port, 2); + STRUCT_CHILD_GETTERS(ifName, 3); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return addr(); } + else if constexpr (__id == 2) { return port(); } + else if constexpr (__id == 3) { return ifName(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::state::BlockedNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::AclTable>, + ::std::vector<::facebook::fboss::state::BlockedNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclTable>, + ::std::vector<::facebook::fboss::state::BlockedNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclTable>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AclTable, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -9828,21 +10055,21 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTable>, ::faceboo template -class ChildThriftPath<::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::QcmCfgFields, + ::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, Parent> { public: using Self = Path< - ::facebook::fboss::state::QcmCfgFields, + ::facebook::fboss::cfg::Neighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Neighbor>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -9851,95 +10078,25 @@ class ChildThriftPath<::facebook::fboss::state::QcmCfgFields, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::set<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 1); - STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 2); - STRUCT_CHILD_GETTERS(flowLimit, 3); - STRUCT_CHILD_GETTERS(numFlowsClear, 4); - STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 5); - STRUCT_CHILD_GETTERS(exportThreshold, 6); - STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 7); - STRUCT_CHILD_GETTERS(flowWeights, 8); - STRUCT_CHILD_GETTERS(collectorSrcIp, 9); - STRUCT_CHILD_GETTERS(collectorDstIp, 10); - STRUCT_CHILD_GETTERS(collectorSrcPort, 11); - STRUCT_CHILD_GETTERS(collectorDstPort, 12); - STRUCT_CHILD_GETTERS(collectorDscp, 13); - STRUCT_CHILD_GETTERS(ppsToQcm, 14); - STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); - STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); + STRUCT_CHILD_GETTERS(vlanID, 1); + STRUCT_CHILD_GETTERS(ipAddress, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return agingIntervalInMsecs(); } - else if constexpr (__id == 2) { return numFlowSamplesPerView(); } - else if constexpr (__id == 3) { return flowLimit(); } - else if constexpr (__id == 4) { return numFlowsClear(); } - else if constexpr (__id == 5) { return scanIntervalInUsecs(); } - else if constexpr (__id == 6) { return exportThreshold(); } - else if constexpr (__id == 7) { return monitorQcmCfgPortsOnly(); } - else if constexpr (__id == 8) { return flowWeights(); } - else if constexpr (__id == 9) { return collectorSrcIp(); } - else if constexpr (__id == 10) { return collectorDstIp(); } - else if constexpr (__id == 11) { return collectorSrcPort(); } - else if constexpr (__id == 12) { return collectorDstPort(); } - else if constexpr (__id == 13) { return collectorDscp(); } - else if constexpr (__id == 14) { return ppsToQcm(); } - else if constexpr (__id == 15) { return monitorQcmPortList(); } - else if constexpr (__id == 16) { return port2QosQueueIds(); } + if constexpr (__id == 1) { return vlanID(); } + else if constexpr (__id == 2) { return ipAddress(); } } template @@ -9949,42 +10106,63 @@ std::pair -class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int32_t, ::std::vector<::std::string>>, + ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, Parent> { public: using Self = Path< - ::std::map<::std::int32_t, ::std::vector<::std::string>>, + ::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>>, Parent>; - using Child = ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::std::int16_t>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::std::int16_t>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>>>, Parent>; - using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; + using Child = ChildThriftPath<::std::map<::facebook::fboss::cfg::LoadBalancerID, ::facebook::fboss::state::LoadBalancerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); +}; + +template +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int16_t, ::facebook::fboss::state::PortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFields>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::PortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int16_t); @@ -9992,21 +10170,21 @@ class ChildThriftPath<::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fb template -class ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::TxSettings, + ::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::TxSettings, + ::facebook::fboss::cfg::PfcWatchdog, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::TxSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PfcWatchdog>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10015,170 +10193,216 @@ class ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::facebook::fboss::cfg::PfcWatchdogRecoveryAction, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PfcWatchdogRecoveryAction>>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(pre, 1); - STRUCT_CHILD_GETTERS(pre2, 2); - STRUCT_CHILD_GETTERS(main, 3); - STRUCT_CHILD_GETTERS(post, 4); - STRUCT_CHILD_GETTERS(post2, 5); - STRUCT_CHILD_GETTERS(post3, 6); - STRUCT_CHILD_GETTERS(lutMode, 7); - STRUCT_CHILD_GETTERS(driveCurrent, 8); - STRUCT_CHILD_GETTERS(diffEncoderEn, 9); - STRUCT_CHILD_GETTERS(digGain, 10); - STRUCT_CHILD_GETTERS(ffeCoeff0, 11); - STRUCT_CHILD_GETTERS(ffeCoeff1, 12); - STRUCT_CHILD_GETTERS(ffeCoeff2, 13); - STRUCT_CHILD_GETTERS(ffeCoeff3, 14); - STRUCT_CHILD_GETTERS(ffeCoeff4, 15); - STRUCT_CHILD_GETTERS(parityEncoderEn, 16); - STRUCT_CHILD_GETTERS(thpEn, 17); - STRUCT_CHILD_GETTERS(setPrecode, 18); - STRUCT_CHILD_GETTERS(pre3, 19); - STRUCT_CHILD_GETTERS(driverSwing, 20); - STRUCT_CHILD_GETTERS(innerEyeNeg, 21); - STRUCT_CHILD_GETTERS(innerEyePos, 22); - STRUCT_CHILD_GETTERS(ffeCoeff5, 23); - STRUCT_CHILD_GETTERS(ldoBypass, 24); - STRUCT_CHILD_GETTERS(firPre1, 25); - STRUCT_CHILD_GETTERS(firPre2, 26); - STRUCT_CHILD_GETTERS(firPre3, 27); - STRUCT_CHILD_GETTERS(firMain, 28); - STRUCT_CHILD_GETTERS(firPost1, 29); - STRUCT_CHILD_GETTERS(firPost2, 30); - STRUCT_CHILD_GETTERS(firPost3, 31); + STRUCT_CHILD_GETTERS(detectionTimeMsecs, 1); + STRUCT_CHILD_GETTERS(recoveryTimeMsecs, 2); + STRUCT_CHILD_GETTERS(recoveryAction, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return pre(); } - else if constexpr (__id == 2) { return pre2(); } - else if constexpr (__id == 3) { return main(); } - else if constexpr (__id == 4) { return post(); } - else if constexpr (__id == 5) { return post2(); } - else if constexpr (__id == 6) { return post3(); } - else if constexpr (__id == 7) { return lutMode(); } - else if constexpr (__id == 8) { return driveCurrent(); } - else if constexpr (__id == 9) { return diffEncoderEn(); } - else if constexpr (__id == 10) { return digGain(); } - else if constexpr (__id == 11) { return ffeCoeff0(); } - else if constexpr (__id == 12) { return ffeCoeff1(); } - else if constexpr (__id == 13) { return ffeCoeff2(); } - else if constexpr (__id == 14) { return ffeCoeff3(); } - else if constexpr (__id == 15) { return ffeCoeff4(); } - else if constexpr (__id == 16) { return parityEncoderEn(); } - else if constexpr (__id == 17) { return thpEn(); } - else if constexpr (__id == 18) { return setPrecode(); } - else if constexpr (__id == 19) { return pre3(); } - else if constexpr (__id == 20) { return driverSwing(); } - else if constexpr (__id == 21) { return innerEyeNeg(); } - else if constexpr (__id == 22) { return innerEyePos(); } - else if constexpr (__id == 23) { return ffeCoeff5(); } - else if constexpr (__id == 24) { return ldoBypass(); } - else if constexpr (__id == 25) { return firPre1(); } - else if constexpr (__id == 26) { return firPre2(); } - else if constexpr (__id == 27) { return firPre3(); } - else if constexpr (__id == 28) { return firMain(); } - else if constexpr (__id == 29) { return firPost1(); } - else if constexpr (__id == 30) { return firPost2(); } - else if constexpr (__id == 31) { return firPost3(); } + if constexpr (__id == 1) { return detectionTimeMsecs(); } + else if constexpr (__id == 2) { return recoveryTimeMsecs(); } + else if constexpr (__id == 3) { return recoveryAction(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + +template +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int64_t, ::facebook::fboss::cfg::AsicConfigEntry>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int64_t); +}; + +template +class ChildThriftPath<::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::cfg::BufferPoolConfigName, ::facebook::fboss::cfg::BufferPoolConfig>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::BufferPoolConfig>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::BufferPoolConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::BufferPoolConfigName); +}; + + +template +class ChildThriftPath<::facebook::fboss::state::LoadBalancerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::state::LoadBalancerFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::state::LoadBalancerFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::LoadBalancerFields>, + Parent>; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>, +std::pair>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, + std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv4Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::TransportField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::set<::facebook::fboss::cfg::MPLSField>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(id, 1); + STRUCT_CHILD_GETTERS(algorithm, 2); + STRUCT_CHILD_GETTERS(seed, 3); + STRUCT_CHILD_GETTERS(v4Fields, 4); + STRUCT_CHILD_GETTERS(v6Fields, 5); + STRUCT_CHILD_GETTERS(transportFields, 6); + STRUCT_CHILD_GETTERS(mplsFields, 7); + STRUCT_CHILD_GETTERS(udfGroups, 8); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return id(); } + else if constexpr (__id == 2) { return algorithm(); } + else if constexpr (__id == 3) { return seed(); } + else if constexpr (__id == 4) { return v4Fields(); } + else if constexpr (__id == 5) { return v6Fields(); } + else if constexpr (__id == 6) { return transportFields(); } + else if constexpr (__id == 7) { return mplsFields(); } + else if constexpr (__id == 8) { return udfGroups(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::fsdb::AgentData, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::fsdb::AgentData, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::fsdb::AgentData, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::fsdb::AgentData>, + Parent>; + using strings = ::facebook::fboss::fsdb::fsdb_model_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::AgentConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::state::SwitchState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::fsdb::FsdbSubscriptionState>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::switch_reachability::SwitchReachability>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(switchState, 2); + STRUCT_CHILD_GETTERS(fsdbSubscriptions, 4); + STRUCT_CHILD_GETTERS(dsfSwitchReachability, 5); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return config(); } + else if constexpr (__id == 2) { return switchState(); } + else if constexpr (__id == 4) { return fsdbSubscriptions(); } + else if constexpr (__id == 5) { return dsfSwitchReachability(); } } template @@ -10187,21 +10411,63 @@ std::pair +class ChildThriftPath<::std::map<::std::int64_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::int64_t, ::std::int32_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int64_t, ::std::int32_t>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::i32_t>, + Parent>; + using Child = Path<::std::int32_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int64_t); +}; template -class ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::UdfConfig, + ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::int64_t, ::facebook::fboss::state::SystemPortFields>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::SystemPortThrift>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::state::SystemPortFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int64_t); +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::UdfConfig, + ::facebook::fboss::cfg::NdpConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::NdpConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -10212,25 +10478,55 @@ class ChildThriftPath<::facebook::fboss::cfg::UdfConfig, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(udfGroups, 1); - STRUCT_CHILD_GETTERS(udfPacketMatcher, 2); + STRUCT_CHILD_GETTERS(routerAdvertisementSeconds, 1); + STRUCT_CHILD_GETTERS(curHopLimit, 2); + STRUCT_CHILD_GETTERS(routerLifetime, 3); + STRUCT_CHILD_GETTERS(prefixValidLifetimeSeconds, 4); + STRUCT_CHILD_GETTERS(prefixPreferredLifetimeSeconds, 5); + STRUCT_CHILD_GETTERS(routerAdvertisementManagedBit, 6); + STRUCT_CHILD_GETTERS(routerAdvertisementOtherBit, 7); + STRUCT_CHILD_GETTERS(routerAddress, 8); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return udfGroups(); } - else if constexpr (__id == 2) { return udfPacketMatcher(); } + if constexpr (__id == 1) { return routerAdvertisementSeconds(); } + else if constexpr (__id == 2) { return curHopLimit(); } + else if constexpr (__id == 3) { return routerLifetime(); } + else if constexpr (__id == 4) { return prefixValidLifetimeSeconds(); } + else if constexpr (__id == 5) { return prefixPreferredLifetimeSeconds(); } + else if constexpr (__id == 6) { return routerAdvertisementManagedBit(); } + else if constexpr (__id == 7) { return routerAdvertisementOtherBit(); } + else if constexpr (__id == 8) { return routerAddress(); } } template @@ -10239,44 +10535,80 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::facebook::fboss::cfg::QosPolicy, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosPolicy>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::QosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(rules, 2); + STRUCT_CHILD_GETTERS(qosMap, 3); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return rules(); } + else if constexpr (__id == 3) { return qosMap(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::phy::LaneState, + ::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::phy::LaneState, + ::facebook::fboss::cfg::CPUTrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::phy::LaneState>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::CPUTrafficPolicyConfig>, Parent>; - using strings = ::facebook::fboss::phy::phy_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10285,50 +10617,30 @@ class ChildThriftPath<::facebook::fboss::phy::LaneState, ::facebook::fboss::fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, ChildThriftPath<::facebook::fboss::phy::TxSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::PacketRxReason, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::PacketRxReasonToQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(signalDetectLive, 2); - STRUCT_CHILD_GETTERS(signalDetectChanged, 3); - STRUCT_CHILD_GETTERS(cdrLockLive, 4); - STRUCT_CHILD_GETTERS(cdrLockChanged, 5); - STRUCT_CHILD_GETTERS(txSettings, 6); - STRUCT_CHILD_GETTERS(rxFrequencyPPM, 7); + STRUCT_CHILD_GETTERS(trafficPolicy, 1); + STRUCT_CHILD_GETTERS(rxReasonToCPUQueue, 2); + STRUCT_CHILD_GETTERS(rxReasonToQueueOrderedList, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return signalDetectLive(); } - else if constexpr (__id == 3) { return signalDetectChanged(); } - else if constexpr (__id == 4) { return cdrLockLive(); } - else if constexpr (__id == 5) { return cdrLockChanged(); } - else if constexpr (__id == 6) { return txSettings(); } - else if constexpr (__id == 7) { return rxFrequencyPPM(); } + if constexpr (__id == 1) { return trafficPolicy(); } + else if constexpr (__id == 2) { return rxReasonToCPUQueue(); } + else if constexpr (__id == 3) { return rxReasonToQueueOrderedList(); } } template @@ -10339,21 +10651,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::asic::AsicConfig, + ::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, Parent> { public: using Self = Path< - ::facebook::fboss::asic::AsicConfig, + ::facebook::fboss::state::QcmCfgFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::asic::AsicConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::QcmCfgFields>, Parent>; - using strings = ::facebook::fboss::asic::asic_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -10362,20 +10674,95 @@ class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fs ChildTag, Self >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::set<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); + STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 1); + STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 2); + STRUCT_CHILD_GETTERS(flowLimit, 3); + STRUCT_CHILD_GETTERS(numFlowsClear, 4); + STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 5); + STRUCT_CHILD_GETTERS(exportThreshold, 6); + STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 7); + STRUCT_CHILD_GETTERS(flowWeights, 8); + STRUCT_CHILD_GETTERS(collectorSrcIp, 9); + STRUCT_CHILD_GETTERS(collectorDstIp, 10); + STRUCT_CHILD_GETTERS(collectorSrcPort, 11); + STRUCT_CHILD_GETTERS(collectorDstPort, 12); + STRUCT_CHILD_GETTERS(collectorDscp, 13); + STRUCT_CHILD_GETTERS(ppsToQcm, 14); + STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); + STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } + if constexpr (__id == 1) { return agingIntervalInMsecs(); } + else if constexpr (__id == 2) { return numFlowSamplesPerView(); } + else if constexpr (__id == 3) { return flowLimit(); } + else if constexpr (__id == 4) { return numFlowsClear(); } + else if constexpr (__id == 5) { return scanIntervalInUsecs(); } + else if constexpr (__id == 6) { return exportThreshold(); } + else if constexpr (__id == 7) { return monitorQcmCfgPortsOnly(); } + else if constexpr (__id == 8) { return flowWeights(); } + else if constexpr (__id == 9) { return collectorSrcIp(); } + else if constexpr (__id == 10) { return collectorDstIp(); } + else if constexpr (__id == 11) { return collectorSrcPort(); } + else if constexpr (__id == 12) { return collectorDstPort(); } + else if constexpr (__id == 13) { return collectorDscp(); } + else if constexpr (__id == 14) { return ppsToQcm(); } + else if constexpr (__id == 15) { return monitorQcmPortList(); } + else if constexpr (__id == 16) { return port2QosQueueIds(); } } template @@ -10385,145 +10772,62 @@ class ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fs }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclTableQualifier>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>>, - Parent>; - using Child = Path<::facebook::fboss::cfg::AclTableQualifier, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclTableQualifier>, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::state::Subport>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::Subport>, + ::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::Subport>, + ::std::map<::std::int32_t, ::std::vector<::std::string>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::Subport>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::string>>, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::string_t>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::Subport, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::cfg::PortQueueConfigName, ::std::vector<::facebook::fboss::cfg::PortQueue>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>>, - Parent>; - using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortQueueConfigName); -}; - - -template -class ChildThriftPath<::facebook::fboss::state::PortFlowletFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::PortFlowletFields, + ::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, Parent> { public: using Self = Path< - ::facebook::fboss::state::PortFlowletFields, + ::std::map<::std::int16_t, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::PortFlowletFields>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::integral>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::i16_t>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = Path<::std::int16_t, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(scalingFactor, 2); - STRUCT_CHILD_GETTERS(loadWeight, 3); - STRUCT_CHILD_GETTERS(queueWeight, 4); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return scalingFactor(); } - else if constexpr (__id == 3) { return loadWeight(); } - else if constexpr (__id == 4) { return queueWeight(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int16_t); }; template -class ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::MirrorFields, + ::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, Parent> { public: using Self = Path< - ::facebook::fboss::state::MirrorFields, + ::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, Parent>; using strings = ::facebook::fboss::state::switch_state_tags::strings; template @@ -10534,85 +10838,25 @@ class ChildThriftPath<::facebook::fboss::state::MirrorFields, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(dscp, 3); - STRUCT_CHILD_GETTERS(truncate, 4); - STRUCT_CHILD_GETTERS(configHasEgressPort, 5); - STRUCT_CHILD_GETTERS(egressPort, 6); - STRUCT_CHILD_GETTERS(destinationIp, 7); - STRUCT_CHILD_GETTERS(srcIp, 8); - STRUCT_CHILD_GETTERS(udpSrcPort, 9); - STRUCT_CHILD_GETTERS(udpDstPort, 10); - STRUCT_CHILD_GETTERS(tunnel, 11); - STRUCT_CHILD_GETTERS(isResolved, 12); - STRUCT_CHILD_GETTERS(switchId, 13); - STRUCT_CHILD_GETTERS(egressPortDesc, 14); - STRUCT_CHILD_GETTERS(samplingRate, 15); + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(from, 1); + STRUCT_CHILD_GETTERS(to, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 3) { return dscp(); } - else if constexpr (__id == 4) { return truncate(); } - else if constexpr (__id == 5) { return configHasEgressPort(); } - else if constexpr (__id == 6) { return egressPort(); } - else if constexpr (__id == 7) { return destinationIp(); } - else if constexpr (__id == 8) { return srcIp(); } - else if constexpr (__id == 9) { return udpSrcPort(); } - else if constexpr (__id == 10) { return udpDstPort(); } - else if constexpr (__id == 11) { return tunnel(); } - else if constexpr (__id == 12) { return isResolved(); } - else if constexpr (__id == 13) { return switchId(); } - else if constexpr (__id == 14) { return egressPortDesc(); } - else if constexpr (__id == 15) { return samplingRate(); } + if constexpr (__id == 1) { return from(); } + else if constexpr (__id == 2) { return to(); } } template @@ -10623,21 +10867,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PacketRxReasonToQueue, + ::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PacketRxReasonToQueue, + ::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketRxReasonToQueue>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -10646,25 +10890,25 @@ class ChildThriftPath<::facebook::fboss::cfg::PacketRxReasonToQueue, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::PacketRxReason, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PacketRxReason>>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(rxReason, 1); - STRUCT_CHILD_GETTERS(queueId, 2); + STRUCT_CHILD_GETTERS(blockNeighborVlanID, 1); + STRUCT_CHILD_GETTERS(blockNeighborIP, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return rxReason(); } - else if constexpr (__id == 2) { return queueId(); } + if constexpr (__id == 1) { return blockNeighborVlanID(); } + else if constexpr (__id == 2) { return blockNeighborIP(); } } template @@ -10674,43 +10918,43 @@ std::pair -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, + ::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::state::FibContainerFields>, + ::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::FibContainerFields>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::FibContainerFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int16_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::TrafficClassToQosAttributeEntry, + ::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, Parent> { public: using Self = Path< - ::facebook::fboss::state::TrafficClassToQosAttributeEntry, + ::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10719,25 +10963,25 @@ class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeEntry, ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + std::pair, Child<::facebook::fboss::cfg::PortDescriptorType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortDescriptorType>>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(trafficClass, 1); - STRUCT_CHILD_GETTERS(attr, 2); + STRUCT_CHILD_GETTERS(portId, 1); + STRUCT_CHILD_GETTERS(portType, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return trafficClass(); } - else if constexpr (__id == 2) { return attr(); } + if constexpr (__id == 1) { return portId(); } + else if constexpr (__id == 2) { return portType(); } } template @@ -10748,21 +10992,21 @@ std::pair>> template -class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::TrafficClassToQosAttributeMap, + ::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, Parent> { public: using Self = Path< - ::facebook::fboss::state::TrafficClassToQosAttributeMap, + ::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TrafficClassToQosAttributeMap>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10771,25 +11015,85 @@ class ChildThriftPath<::facebook::fboss::state::TrafficClassToQosAttributeMap, : ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::state::TrafficClassToQosAttributeEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>>, +std::pair>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, Child<::facebook::fboss::cfg::DsfNodeType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::DsfNodeType>>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, + std::pair, Child<::facebook::fboss::PlatformType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::PlatformType>>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(from, 1); - STRUCT_CHILD_GETTERS(to, 2); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(switchId, 2); + STRUCT_CHILD_GETTERS(type, 3); + STRUCT_CHILD_GETTERS(loopbackIps, 4); + STRUCT_CHILD_GETTERS(systemPortRange, 5); + STRUCT_CHILD_GETTERS(nodeMac, 6); + STRUCT_CHILD_GETTERS(asicType, 7); + STRUCT_CHILD_GETTERS(platformType, 8); + STRUCT_CHILD_GETTERS(clusterId, 9); + STRUCT_CHILD_GETTERS(fabricLevel, 10); + STRUCT_CHILD_GETTERS(localSystemPortOffset, 11); + STRUCT_CHILD_GETTERS(globalSystemPortOffset, 12); + STRUCT_CHILD_GETTERS(systemPortRanges, 13); + STRUCT_CHILD_GETTERS(inbandPortId, 14); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return from(); } - else if constexpr (__id == 2) { return to(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return switchId(); } + else if constexpr (__id == 3) { return type(); } + else if constexpr (__id == 4) { return loopbackIps(); } + else if constexpr (__id == 5) { return systemPortRange(); } + else if constexpr (__id == 6) { return nodeMac(); } + else if constexpr (__id == 7) { return asicType(); } + else if constexpr (__id == 8) { return platformType(); } + else if constexpr (__id == 9) { return clusterId(); } + else if constexpr (__id == 10) { return fabricLevel(); } + else if constexpr (__id == 11) { return localSystemPortOffset(); } + else if constexpr (__id == 12) { return globalSystemPortOffset(); } + else if constexpr (__id == 13) { return systemPortRanges(); } + else if constexpr (__id == 14) { return inbandPortId(); } } template @@ -10800,21 +11104,21 @@ std::pair>>:: template -class ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::BlockedNeighbor, + ::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, Parent> { public: using Self = Path< - ::facebook::fboss::state::BlockedNeighbor, + ::facebook::fboss::cfg::SflowCollector, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::BlockedNeighbor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowCollector>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -10823,25 +11127,77 @@ class ChildThriftPath<::facebook::fboss::state::BlockedNeighbor, ::facebook::fbo ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(ip, 1); + STRUCT_CHILD_GETTERS(port, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return ip(); } + else if constexpr (__id == 2) { return port(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::PortPause, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::PortPause, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::PortPause, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + Parent>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(blockNeighborVlanID, 1); - STRUCT_CHILD_GETTERS(blockNeighborIP, 2); + STRUCT_CHILD_GETTERS(tx, 1); + STRUCT_CHILD_GETTERS(rx, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return blockNeighborVlanID(); } - else if constexpr (__id == 2) { return blockNeighborIP(); } + if constexpr (__id == 1) { return tx(); } + else if constexpr (__id == 2) { return rx(); } } template @@ -10851,21 +11207,21 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::QosRule>, + ::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::QosRule>, + ::std::vector<::facebook::fboss::cfg::PortQueue>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::QosRule>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortQueue>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::QosRule, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::PortQueue, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -10873,19 +11229,19 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::QosRule>, ::facebook template -class ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortDescriptor, + ::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortDescriptor, + ::facebook::fboss::cfg::SflowTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortDescriptor>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SflowTunnel>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -10896,25 +11252,35 @@ class ChildThriftPath<::facebook::fboss::cfg::PortDescriptor, ::facebook::fboss: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::facebook::fboss::cfg::PortDescriptorType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortDescriptorType>>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(portId, 1); - STRUCT_CHILD_GETTERS(portType, 2); + STRUCT_CHILD_GETTERS(ip, 1); + STRUCT_CHILD_GETTERS(udpSrcPort, 2); + STRUCT_CHILD_GETTERS(udpDstPort, 3); + STRUCT_CHILD_GETTERS(ttl, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return portId(); } - else if constexpr (__id == 2) { return portType(); } + if constexpr (__id == 1) { return ip(); } + else if constexpr (__id == 2) { return udpSrcPort(); } + else if constexpr (__id == 3) { return udpDstPort(); } + else if constexpr (__id == 4) { return ttl(); } } template @@ -10923,56 +11289,25 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::PortPause, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::PortPause, + ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::PortPause, + ::std::map<::facebook::fboss::state::SwitchIdList, ::facebook::fboss::state::SwitchSettingsFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPause>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::SwitchSettingsFields>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::state::SwitchSettingsFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(tx, 1); - STRUCT_CHILD_GETTERS(rx, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return tx(); } - else if constexpr (__id == 2) { return rx(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; template @@ -11260,177 +11595,57 @@ class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::faceb ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::ControlPlaneFields>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::UserDefinedTrapAction, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::UserDefinedTrapAction, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(queueId, 1); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return queueId(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::AclUdfEntry, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::AclUdfEntry, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::int8_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(udfGroup, 1); - STRUCT_CHILD_GETTERS(roceBytes, 2); - STRUCT_CHILD_GETTERS(roceMask, 3); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return udfGroup(); } - else if constexpr (__id == 2) { return roceBytes(); } - else if constexpr (__id == 3) { return roceMask(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::list<::apache::thrift::type_class::integral>>, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>, - Parent>; - using Child = ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::AggregatePortMember>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePortMember>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AggregatePortMember, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::ControlPlaneFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); }; + template -class ChildThriftPath<::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::ClientID, ::facebook::fboss::state::RouteNextHopEntry>, + ::facebook::fboss::cfg::UserDefinedTrapAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::enumeration, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::enum_t<::facebook::fboss::ClientID>, ::apache::thrift::type::struct_t<::facebook::fboss::state::RouteNextHopEntry>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UserDefinedTrapAction>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::RouteNextHopEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + template + using NameToId = fatal::tuple>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(queueId, 1); - CONTAINER_CHILD_GETTERS(::facebook::fboss::ClientID); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return queueId(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; @@ -11550,74 +11765,22 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::Range, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::Range, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(minimum, 1); - STRUCT_CHILD_GETTERS(maximum, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return minimum(); } - else if constexpr (__id == 2) { return maximum(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclLookupClass>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, + ::std::vector<::facebook::fboss::cfg::AclLookupClass>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, + ::std::vector<::facebook::fboss::cfg::AclLookupClass>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::facebook::fboss::cfg::AclLookupClass, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -11625,21 +11788,21 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::face template -class ChildThriftPath<::facebook::fboss::state::TeFlowEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::TeFlowEntryFields, + ::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::state::TeFlowEntryFields, + ::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -11648,45 +11811,30 @@ class ChildThriftPath<::facebook::fboss::state::TeFlowEntryFields, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(flow, 1); - STRUCT_CHILD_GETTERS(nexthops, 3); - STRUCT_CHILD_GETTERS(resolvedNexthops, 4); - STRUCT_CHILD_GETTERS(enabled, 5); - STRUCT_CHILD_GETTERS(counterID, 6); - STRUCT_CHILD_GETTERS(statEnabled, 7); + STRUCT_CHILD_GETTERS(matchToAction, 1); + STRUCT_CHILD_GETTERS(defaultQosPolicy, 2); + STRUCT_CHILD_GETTERS(portIdToQosPolicy, 3); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return flow(); } - else if constexpr (__id == 3) { return nexthops(); } - else if constexpr (__id == 4) { return resolvedNexthops(); } - else if constexpr (__id == 5) { return enabled(); } - else if constexpr (__id == 6) { return counterID(); } - else if constexpr (__id == 7) { return statEnabled(); } + if constexpr (__id == 1) { return matchToAction(); } + else if constexpr (__id == 2) { return defaultQosPolicy(); } + else if constexpr (__id == 3) { return portIdToQosPolicy(); } } template @@ -11695,42 +11843,21 @@ std::pair -class ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::std::string>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, - ::apache::thrift::type::list<::apache::thrift::type::string_t>, - Parent> { - public: - using Self = Path< - ::std::vector<::std::string>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, - ::apache::thrift::type::list<::apache::thrift::type::string_t>, - Parent>; - using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::DsfNode, + ::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::DsfNode, + ::facebook::fboss::cfg::QueueMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QueueMatchAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -11741,65 +11868,20 @@ class ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair>>, -std::pair>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, Child<::facebook::fboss::cfg::DsfNodeType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::DsfNodeType>>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, - std::pair, Child<::facebook::fboss::PlatformType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::PlatformType>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(switchId, 2); - STRUCT_CHILD_GETTERS(type, 3); - STRUCT_CHILD_GETTERS(loopbackIps, 4); - STRUCT_CHILD_GETTERS(systemPortRange, 5); - STRUCT_CHILD_GETTERS(nodeMac, 6); - STRUCT_CHILD_GETTERS(asicType, 7); - STRUCT_CHILD_GETTERS(platformType, 8); - STRUCT_CHILD_GETTERS(clusterId, 9); - STRUCT_CHILD_GETTERS(fabricLevel, 10); + STRUCT_CHILD_GETTERS(queueId, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return switchId(); } - else if constexpr (__id == 3) { return type(); } - else if constexpr (__id == 4) { return loopbackIps(); } - else if constexpr (__id == 5) { return systemPortRange(); } - else if constexpr (__id == 6) { return nodeMac(); } - else if constexpr (__id == 7) { return asicType(); } - else if constexpr (__id == 8) { return platformType(); } - else if constexpr (__id == 9) { return clusterId(); } - else if constexpr (__id == 10) { return fabricLevel(); } + if constexpr (__id == 1) { return queueId(); } } template @@ -11810,19 +11892,19 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::ActiveQueueManagement, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::ActiveQueueManagement, + ::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::ActiveQueueManagement, + ::facebook::fboss::cfg::PacketCounterMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ActiveQueueManagement>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::PacketCounterMatchAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -11833,25 +11915,20 @@ class ChildThriftPath<::facebook::fboss::cfg::ActiveQueueManagement, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::QueueCongestionBehavior, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::QueueCongestionBehavior>>>>; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(detection, 1); - STRUCT_CHILD_GETTERS(behavior, 2); + STRUCT_CHILD_GETTERS(counterName, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return detection(); } - else if constexpr (__id == 2) { return behavior(); } + if constexpr (__id == 1) { return counterName(); } } template @@ -11862,21 +11939,21 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::AsicConfigEntry, + ::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::AsicConfigEntry, + ::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::variant, - ::apache::thrift::type::union_t<::facebook::fboss::cfg::AsicConfigEntry>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>, Parent>; - using strings = ::facebook::fboss::cfg::asic_config_v2_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -11885,30 +11962,25 @@ class ChildThriftPath<::facebook::fboss::cfg::AsicConfigEntry, ::facebook::fboss ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(config, 1); - STRUCT_CHILD_GETTERS(jsonConfig, 2); - STRUCT_CHILD_GETTERS(yamlConfig, 3); + STRUCT_CHILD_GETTERS(vlanID, 1); + STRUCT_CHILD_GETTERS(macAddress, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return config(); } - else if constexpr (__id == 2) { return jsonConfig(); } - else if constexpr (__id == 3) { return yamlConfig(); } + if constexpr (__id == 1) { return vlanID(); } + else if constexpr (__id == 2) { return macAddress(); } } template @@ -11917,63 +11989,125 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExpQosMap>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::ExpQosMap>, + ::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::ExpQosMap>, + ::facebook::fboss::cfg::QueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExpQosMap>>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::QueueCongestionDetection>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::ExpQosMap, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::cfg::LinearQueueCongestionDetection, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(linear, 1); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return linear(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; + template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclLookupClass>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::AclLookupClass>, + ::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::AclLookupClass>, + ::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>>, + ::apache::thrift::type_class::variant, + ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>, Parent>; - using Child = Path<::facebook::fboss::cfg::AclLookupClass, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AclLookupClass>, Self>; + using strings = ::facebook::fboss::cfg::platform_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::bcm::BcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::asic::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::AsicConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(bcm, 1); + STRUCT_CHILD_GETTERS(asic, 2); + STRUCT_CHILD_GETTERS(asicConfig, 3); - CONTAINER_CHILD_GETTERS(::std::int32_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return bcm(); } + else if constexpr (__id == 2) { return asic(); } + else if constexpr (__id == 3) { return asicConfig(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::TrafficPolicyConfig, + ::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::TrafficPolicyConfig, + ::facebook::fboss::cfg::QcmConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::TrafficPolicyConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::QcmConfig>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -11984,30 +12118,95 @@ class ChildThriftPath<::facebook::fboss::cfg::TrafficPolicyConfig, ::facebook::f ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::map<::facebook::fboss::cfg::BurstMonitorWeight, ::std::int16_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::vector<::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int32_t, ::std::vector<::std::int32_t>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(matchToAction, 1); - STRUCT_CHILD_GETTERS(defaultQosPolicy, 2); - STRUCT_CHILD_GETTERS(portIdToQosPolicy, 3); + STRUCT_CHILD_GETTERS(numFlowSamplesPerView, 1); + STRUCT_CHILD_GETTERS(flowLimit, 2); + STRUCT_CHILD_GETTERS(numFlowsClear, 3); + STRUCT_CHILD_GETTERS(scanIntervalInUsecs, 4); + STRUCT_CHILD_GETTERS(exportThreshold, 5); + STRUCT_CHILD_GETTERS(flowWeights, 6); + STRUCT_CHILD_GETTERS(agingIntervalInMsecs, 7); + STRUCT_CHILD_GETTERS(collectorDstIp, 8); + STRUCT_CHILD_GETTERS(collectorSrcPort, 10); + STRUCT_CHILD_GETTERS(collectorDstPort, 11); + STRUCT_CHILD_GETTERS(collectorDscp, 12); + STRUCT_CHILD_GETTERS(ppsToQcm, 13); + STRUCT_CHILD_GETTERS(collectorSrcIp, 14); + STRUCT_CHILD_GETTERS(monitorQcmPortList, 15); + STRUCT_CHILD_GETTERS(port2QosQueueIds, 16); + STRUCT_CHILD_GETTERS(monitorQcmCfgPortsOnly, 17); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return matchToAction(); } - else if constexpr (__id == 2) { return defaultQosPolicy(); } - else if constexpr (__id == 3) { return portIdToQosPolicy(); } + if constexpr (__id == 1) { return numFlowSamplesPerView(); } + else if constexpr (__id == 2) { return flowLimit(); } + else if constexpr (__id == 3) { return numFlowsClear(); } + else if constexpr (__id == 4) { return scanIntervalInUsecs(); } + else if constexpr (__id == 5) { return exportThreshold(); } + else if constexpr (__id == 6) { return flowWeights(); } + else if constexpr (__id == 7) { return agingIntervalInMsecs(); } + else if constexpr (__id == 8) { return collectorDstIp(); } + else if constexpr (__id == 10) { return collectorSrcPort(); } + else if constexpr (__id == 11) { return collectorDstPort(); } + else if constexpr (__id == 12) { return collectorDscp(); } + else if constexpr (__id == 13) { return ppsToQcm(); } + else if constexpr (__id == 14) { return collectorSrcIp(); } + else if constexpr (__id == 15) { return monitorQcmPortList(); } + else if constexpr (__id == 16) { return port2QosQueueIds(); } + else if constexpr (__id == 17) { return monitorQcmCfgPortsOnly(); } } template @@ -12243,43 +12442,188 @@ class ChildThriftPath<::std::vector<::facebook::fboss::cfg::SflowCollector>, ::f CONTAINER_CHILD_GETTERS(::std::int32_t); }; + template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::Range, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::Interface>, + ::facebook::fboss::cfg::Range, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::Range, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Range>, + Parent>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + template + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(minimum, 1); + STRUCT_CHILD_GETTERS(maximum, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return minimum(); } + else if constexpr (__id == 2) { return maximum(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::Interface>, + ::std::vector<::facebook::fboss::cfg::AclUdfEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::AclUdfEntry>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::Interface, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::AclUdfEntry, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); }; + template -class ChildThriftPath<::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::TeFlowEntryFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::state::RxSak>, + ::facebook::fboss::state::TeFlowEntryFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::state::TeFlowEntryFields, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::state::TeFlowEntryFields>, + Parent>; + using strings = ::facebook::fboss::state::switch_state_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::fboss::TeFlow, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::NextHopThrift>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(flow, 1); + STRUCT_CHILD_GETTERS(nexthops, 3); + STRUCT_CHILD_GETTERS(resolvedNexthops, 4); + STRUCT_CHILD_GETTERS(enabled, 5); + STRUCT_CHILD_GETTERS(counterID, 6); + STRUCT_CHILD_GETTERS(statEnabled, 7); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return flow(); } + else if constexpr (__id == 3) { return nexthops(); } + else if constexpr (__id == 4) { return resolvedNexthops(); } + else if constexpr (__id == 5) { return enabled(); } + else if constexpr (__id == 6) { return counterID(); } + else if constexpr (__id == 7) { return statEnabled(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + +template +class ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::std::string>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, + ::apache::thrift::type::list<::apache::thrift::type::string_t>, + Parent> { + public: + using Self = Path< + ::std::vector<::std::string>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::list<::apache::thrift::type_class::string>, + ::apache::thrift::type::list<::apache::thrift::type::string_t>, + Parent>; + using Child = Path<::std::string, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::int32_t); +}; + +template +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::state::RxSak>, + ::std::vector<::facebook::fboss::cfg::IpInIpTunnel>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::state::RxSak, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -12287,19 +12631,19 @@ class ChildThriftPath<::std::vector<::facebook::fboss::state::RxSak>, ::facebook template -class ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::IpInIpTunnel, + ::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::IpInIpTunnel, + ::facebook::fboss::cfg::AggregatePort, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::AggregatePort>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12310,70 +12654,45 @@ class ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>, -std::pair>>, -std::pair>>, -std::pair>>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, - std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, - std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, - std::pair, Child<::facebook::fboss::cfg::TunnelTerminationType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelTerminationType>>>, - std::pair, Child<::facebook::fboss::cfg::TunnelType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelType>>>>; + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AggregatePortMember>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::MinimumCapacity, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(ipInIpTunnelId, 1); - STRUCT_CHILD_GETTERS(underlayIntfID, 2); - STRUCT_CHILD_GETTERS(dstIp, 3); - STRUCT_CHILD_GETTERS(srcIp, 4); - STRUCT_CHILD_GETTERS(dstIpMask, 5); - STRUCT_CHILD_GETTERS(srcIpMask, 6); - STRUCT_CHILD_GETTERS(ttlMode, 7); - STRUCT_CHILD_GETTERS(dscpMode, 8); - STRUCT_CHILD_GETTERS(ecnMode, 9); - STRUCT_CHILD_GETTERS(tunnelTermType, 10); - STRUCT_CHILD_GETTERS(tunnelType, 11); + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(key, 1); + STRUCT_CHILD_GETTERS(name, 2); + STRUCT_CHILD_GETTERS(description, 3); + STRUCT_CHILD_GETTERS(memberPorts, 4); + STRUCT_CHILD_GETTERS(minimumCapacity, 5); + STRUCT_CHILD_GETTERS(counterTags, 6); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return ipInIpTunnelId(); } - else if constexpr (__id == 2) { return underlayIntfID(); } - else if constexpr (__id == 3) { return dstIp(); } - else if constexpr (__id == 4) { return srcIp(); } - else if constexpr (__id == 5) { return dstIpMask(); } - else if constexpr (__id == 6) { return srcIpMask(); } - else if constexpr (__id == 7) { return ttlMode(); } - else if constexpr (__id == 8) { return dscpMode(); } - else if constexpr (__id == 9) { return ecnMode(); } - else if constexpr (__id == 10) { return tunnelTermType(); } - else if constexpr (__id == 11) { return tunnelType(); } + if constexpr (__id == 1) { return key(); } + else if constexpr (__id == 2) { return name(); } + else if constexpr (__id == 3) { return description(); } + else if constexpr (__id == 4) { return memberPorts(); } + else if constexpr (__id == 5) { return minimumCapacity(); } + else if constexpr (__id == 6) { return counterTags(); } } template @@ -12383,43 +12702,64 @@ std::pair -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, + ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::state::TransceiverSpecFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); +}; + +template +class ChildThriftPath<::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + Parent> { + public: + using Self = Path< + ::std::map<::facebook::fboss::cfg::PortPgConfigName, ::std::vector<::facebook::fboss::cfg::PortPgConfig>>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortPgConfig>>>, + Parent>; + using Child = ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortPgConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::PortPgConfigName); }; template -class ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::RedirectToNextHopAction, + ::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::RedirectToNextHopAction, + ::facebook::fboss::state::VlanFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, + ::apache::thrift::type::struct_t<::facebook::fboss::state::VlanFields>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::state::switch_state_tags::strings; template using Child = Path< ChildType, @@ -12428,25 +12768,80 @@ class ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::faceboo ChildTag, Self >; - using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int16_t, bool>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::NeighborResponseEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::MacEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(nexthops, 1); - STRUCT_CHILD_GETTERS(redirectNextHops, 2); + STRUCT_CHILD_GETTERS(vlanId, 1); + STRUCT_CHILD_GETTERS(vlanName, 2); + STRUCT_CHILD_GETTERS(intfID, 3); + STRUCT_CHILD_GETTERS(dhcpV4Relay, 4); + STRUCT_CHILD_GETTERS(dhcpV6Relay, 5); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV4, 6); + STRUCT_CHILD_GETTERS(dhcpRelayOverridesV6, 7); + STRUCT_CHILD_GETTERS(ports, 8); + STRUCT_CHILD_GETTERS(arpTable, 9); + STRUCT_CHILD_GETTERS(arpResponseTable, 10); + STRUCT_CHILD_GETTERS(ndpTable, 11); + STRUCT_CHILD_GETTERS(ndpResponseTable, 12); + STRUCT_CHILD_GETTERS(macTable, 13); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return nexthops(); } - else if constexpr (__id == 2) { return redirectNextHops(); } + if constexpr (__id == 1) { return vlanId(); } + else if constexpr (__id == 2) { return vlanName(); } + else if constexpr (__id == 3) { return intfID(); } + else if constexpr (__id == 4) { return dhcpV4Relay(); } + else if constexpr (__id == 5) { return dhcpV6Relay(); } + else if constexpr (__id == 6) { return dhcpRelayOverridesV4(); } + else if constexpr (__id == 7) { return dhcpRelayOverridesV6(); } + else if constexpr (__id == 8) { return ports(); } + else if constexpr (__id == 9) { return arpTable(); } + else if constexpr (__id == 10) { return arpResponseTable(); } + else if constexpr (__id == 11) { return ndpTable(); } + else if constexpr (__id == 12) { return ndpResponseTable(); } + else if constexpr (__id == 13) { return macTable(); } } template @@ -12455,42 +12850,21 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, - Parent> { - public: - using Self = Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::UdfGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::string); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::FlowletSwitchingConfig, + ::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::FlowletSwitchingConfig, + ::facebook::fboss::cfg::RedirectNextHop, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::FlowletSwitchingConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectNextHop>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12501,75 +12875,25 @@ class ChildThriftPath<::facebook::fboss::cfg::FlowletSwitchingConfig, ::facebook ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::facebook::fboss::cfg::SwitchingMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchingMode>>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(inactivityIntervalUsecs, 1); - STRUCT_CHILD_GETTERS(flowletTableSize, 2); - STRUCT_CHILD_GETTERS(dynamicEgressLoadExponent, 3); - STRUCT_CHILD_GETTERS(dynamicQueueExponent, 4); - STRUCT_CHILD_GETTERS(dynamicQueueMinThresholdBytes, 5); - STRUCT_CHILD_GETTERS(dynamicQueueMaxThresholdBytes, 6); - STRUCT_CHILD_GETTERS(dynamicSampleRate, 7); - STRUCT_CHILD_GETTERS(dynamicEgressMinThresholdBytes, 8); - STRUCT_CHILD_GETTERS(dynamicEgressMaxThresholdBytes, 9); - STRUCT_CHILD_GETTERS(dynamicPhysicalQueueExponent, 10); - STRUCT_CHILD_GETTERS(maxLinks, 11); - STRUCT_CHILD_GETTERS(switchingMode, 12); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return inactivityIntervalUsecs(); } - else if constexpr (__id == 2) { return flowletTableSize(); } - else if constexpr (__id == 3) { return dynamicEgressLoadExponent(); } - else if constexpr (__id == 4) { return dynamicQueueExponent(); } - else if constexpr (__id == 5) { return dynamicQueueMinThresholdBytes(); } - else if constexpr (__id == 6) { return dynamicQueueMaxThresholdBytes(); } - else if constexpr (__id == 7) { return dynamicSampleRate(); } - else if constexpr (__id == 8) { return dynamicEgressMinThresholdBytes(); } - else if constexpr (__id == 9) { return dynamicEgressMaxThresholdBytes(); } - else if constexpr (__id == 10) { return dynamicPhysicalQueueExponent(); } - else if constexpr (__id == 11) { return maxLinks(); } - else if constexpr (__id == 12) { return switchingMode(); } + using NameToId = fatal::tuple>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(ip, 1); + STRUCT_CHILD_GETTERS(intfID, 2); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return ip(); } + else if constexpr (__id == 2) { return intfID(); } } template @@ -12578,44 +12902,23 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::TransceiverConfigOverride>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::TransceiverConfigOverride>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::TransceiverConfigOverride, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - template -class ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::Ttl, + ::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, + ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::Ttl, + ::facebook::fboss::NextHopThrift, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::Ttl>, + ::apache::thrift::type::struct_t<::facebook::fboss::NextHopThrift>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + using strings = ::facebook::fboss::common_tags::strings; template using Child = Path< ChildType, @@ -12624,25 +12927,35 @@ class ChildThriftPath<::facebook::fboss::cfg::Ttl, ::facebook::fboss::fsdb::Fsdb ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::facebook::fboss::MplsAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(value, 1); - STRUCT_CHILD_GETTERS(mask, 2); + STRUCT_CHILD_GETTERS(address, 1); + STRUCT_CHILD_GETTERS(weight, 2); + STRUCT_CHILD_GETTERS(mplsAction, 3); + STRUCT_CHILD_GETTERS(disableTTLDecrement, 4); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return value(); } - else if constexpr (__id == 2) { return mask(); } + if constexpr (__id == 1) { return address(); } + else if constexpr (__id == 2) { return weight(); } + else if constexpr (__id == 3) { return mplsAction(); } + else if constexpr (__id == 4) { return disableTTLDecrement(); } } template @@ -12652,63 +12965,63 @@ std::pair>> }; template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, + ::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, Parent> { public: using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>>, + ::std::vector<::facebook::fboss::cfg::Interface>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::IpTunnelFields>>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::Interface>>, Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::IpTunnelFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::Interface, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::set<::facebook::fboss::cfg::IPv6Field>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::set<::facebook::fboss::cfg::IPv6Field>, + ::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, Parent> { public: using Self = Path< - ::std::set<::facebook::fboss::cfg::IPv6Field>, + ::std::vector<::facebook::fboss::state::RxSak>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::set<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::set<::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::state::RxSak>>, Parent>; - using Child = Path<::facebook::fboss::cfg::IPv6Field, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IPv6Field>, Self>; + using Child = ChildThriftPath<::facebook::fboss::state::RxSak, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::IPv6Field); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::MediaLaneSettings>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::MediaLaneSettings>, + ::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::MediaLaneSettings>, + ::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; CONTAINER_CHILD_GETTERS(::std::int32_t); @@ -12716,21 +13029,21 @@ class ChildThriftPath<::std::vector<::facebook::fboss::MediaLaneSettings>, ::fac template -class ChildThriftPath<::facebook::fboss::state::RoutePrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::state::RoutePrefix, + ::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, Parent> { public: using Self = Path< - ::facebook::fboss::state::RoutePrefix, + ::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::RoutePrefix>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -12739,30 +13052,115 @@ class ChildThriftPath<::facebook::fboss::state::RoutePrefix, ::facebook::fboss:: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; + using Children = fatal::tuple>>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Neighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, + std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::facebook::fboss::cfg::SwitchDrainState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchDrainState>>>, + std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(v6, 1); - STRUCT_CHILD_GETTERS(prefix, 2); - STRUCT_CHILD_GETTERS(mask, 3); + STRUCT_CHILD_GETTERS(l2LearningMode, 1); + STRUCT_CHILD_GETTERS(qcmEnable, 2); + STRUCT_CHILD_GETTERS(ptpTcEnable, 3); + STRUCT_CHILD_GETTERS(l2AgeTimerSeconds, 4); + STRUCT_CHILD_GETTERS(maxRouteCounterIDs, 5); + STRUCT_CHILD_GETTERS(blockNeighbors, 6); + STRUCT_CHILD_GETTERS(macAddrsToBlock, 7); + STRUCT_CHILD_GETTERS(switchType, 8); + STRUCT_CHILD_GETTERS(switchId, 9); + STRUCT_CHILD_GETTERS(exactMatchTableConfigs, 10); + STRUCT_CHILD_GETTERS(switchIdToSwitchType_DEPRECATED, 11); + STRUCT_CHILD_GETTERS(switchDrainState, 12); + STRUCT_CHILD_GETTERS(switchIdToSwitchInfo, 13); + STRUCT_CHILD_GETTERS(minLinksToRemainInVOQDomain, 14); + STRUCT_CHILD_GETTERS(minLinksToJoinVOQDomain, 15); + STRUCT_CHILD_GETTERS(vendorMacOuis, 16); + STRUCT_CHILD_GETTERS(metaMacOuis, 17); + STRUCT_CHILD_GETTERS(needL2EntryForNeighbor, 18); + STRUCT_CHILD_GETTERS(sramGlobalFreePercentXoffThreshold, 19); + STRUCT_CHILD_GETTERS(sramGlobalFreePercentXonThreshold, 20); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return v6(); } - else if constexpr (__id == 2) { return prefix(); } - else if constexpr (__id == 3) { return mask(); } + if constexpr (__id == 1) { return l2LearningMode(); } + else if constexpr (__id == 2) { return qcmEnable(); } + else if constexpr (__id == 3) { return ptpTcEnable(); } + else if constexpr (__id == 4) { return l2AgeTimerSeconds(); } + else if constexpr (__id == 5) { return maxRouteCounterIDs(); } + else if constexpr (__id == 6) { return blockNeighbors(); } + else if constexpr (__id == 7) { return macAddrsToBlock(); } + else if constexpr (__id == 8) { return switchType(); } + else if constexpr (__id == 9) { return switchId(); } + else if constexpr (__id == 10) { return exactMatchTableConfigs(); } + else if constexpr (__id == 11) { return switchIdToSwitchType_DEPRECATED(); } + else if constexpr (__id == 12) { return switchDrainState(); } + else if constexpr (__id == 13) { return switchIdToSwitchInfo(); } + else if constexpr (__id == 14) { return minLinksToRemainInVOQDomain(); } + else if constexpr (__id == 15) { return minLinksToJoinVOQDomain(); } + else if constexpr (__id == 16) { return vendorMacOuis(); } + else if constexpr (__id == 17) { return metaMacOuis(); } + else if constexpr (__id == 18) { return needL2EntryForNeighbor(); } + else if constexpr (__id == 19) { return sramGlobalFreePercentXoffThreshold(); } + else if constexpr (__id == 20) { return sramGlobalFreePercentXonThreshold(); } } template @@ -12773,19 +13171,19 @@ std::pair>> template -class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SdkVersion, + ::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SdkVersion, + ::facebook::fboss::cfg::IpInIpTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SdkVersion>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::IpInIpTunnel>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12796,25 +13194,70 @@ class ChildThriftPath<::facebook::fboss::cfg::SdkVersion, ::facebook::fboss::fsd ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>, +std::pair>>, +std::pair>>, +std::pair>>, +std::pair>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, + std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, + std::pair, Child<::facebook::fboss::cfg::IpTunnelMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::IpTunnelMode>>>, + std::pair, Child<::facebook::fboss::cfg::TunnelTerminationType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelTerminationType>>>, + std::pair, Child<::facebook::fboss::cfg::TunnelType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::TunnelType>>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(asicSdk, 1); - STRUCT_CHILD_GETTERS(saiSdk, 2); + STRUCT_CHILD_GETTERS(ipInIpTunnelId, 1); + STRUCT_CHILD_GETTERS(underlayIntfID, 2); + STRUCT_CHILD_GETTERS(dstIp, 3); + STRUCT_CHILD_GETTERS(srcIp, 4); + STRUCT_CHILD_GETTERS(dstIpMask, 5); + STRUCT_CHILD_GETTERS(srcIpMask, 6); + STRUCT_CHILD_GETTERS(ttlMode, 7); + STRUCT_CHILD_GETTERS(dscpMode, 8); + STRUCT_CHILD_GETTERS(ecnMode, 9); + STRUCT_CHILD_GETTERS(tunnelTermType, 10); + STRUCT_CHILD_GETTERS(tunnelType, 11); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return asicSdk(); } - else if constexpr (__id == 2) { return saiSdk(); } + if constexpr (__id == 1) { return ipInIpTunnelId(); } + else if constexpr (__id == 2) { return underlayIntfID(); } + else if constexpr (__id == 3) { return dstIp(); } + else if constexpr (__id == 4) { return srcIp(); } + else if constexpr (__id == 5) { return dstIpMask(); } + else if constexpr (__id == 6) { return srcIpMask(); } + else if constexpr (__id == 7) { return ttlMode(); } + else if constexpr (__id == 8) { return dscpMode(); } + else if constexpr (__id == 9) { return ecnMode(); } + else if constexpr (__id == 10) { return tunnelTermType(); } + else if constexpr (__id == 11) { return tunnelType(); } } template @@ -12824,41 +13267,41 @@ std::pair }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MatchToAction>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::MatchToAction>, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::DsfNode>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MatchToAction>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::DsfNode>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::MatchToAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::DsfNode, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int64_t); }; template -class ChildThriftPath<::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::LoadBalancer, + ::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::LoadBalancer, + ::facebook::fboss::cfg::RedirectToNextHopAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::LoadBalancer>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::RedirectToNextHopAction>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -12869,35 +13312,25 @@ class ChildThriftPath<::facebook::fboss::cfg::LoadBalancer, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>>, -std::pair>, -std::pair>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::LoadBalancerID, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::LoadBalancerID>>>, - std::pair, ChildThriftPath<::facebook::fboss::cfg::Fields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::HashingAlgorithm, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::HashingAlgorithm>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::RedirectNextHop>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(fieldSelection, 2); - STRUCT_CHILD_GETTERS(algorithm, 3); - STRUCT_CHILD_GETTERS(seed, 4); + STRUCT_CHILD_GETTERS(nexthops, 1); + STRUCT_CHILD_GETTERS(redirectNextHops, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return fieldSelection(); } - else if constexpr (__id == 3) { return algorithm(); } - else if constexpr (__id == 4) { return seed(); } + if constexpr (__id == 1) { return nexthops(); } + else if constexpr (__id == 2) { return redirectNextHops(); } } template @@ -12906,6 +13339,27 @@ std::pair>> } }; +template +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, + Parent> { + public: + using Self = Path< + ::std::map<::std::string, ::facebook::fboss::cfg::UdfGroup>, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfGroup>>, + Parent>; + using Child = ChildThriftPath<::facebook::fboss::cfg::UdfGroup, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Self::Self; + + CONTAINER_CHILD_GETTERS(::std::string); +}; + template class ChildThriftPath<::facebook::fboss::IpPrefix, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : @@ -13412,19 +13866,86 @@ std::pair -class ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::ExactMatchTableConfig, + ::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::ExactMatchTableConfig, + ::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, + ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, + Parent>; + using strings = ::facebook::fboss::transceiver_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>, + std::pair, Child>>; + template + using NameToId = fatal::tuple>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; + + template + using TypeFor = typename Children::template type_of; + using Self::Self; + + STRUCT_CHILD_GETTERS(lane, 1); + STRUCT_CHILD_GETTERS(txDisable, 2); + STRUCT_CHILD_GETTERS(txSquelch, 3); + STRUCT_CHILD_GETTERS(txAdaptiveEqControl, 4); + STRUCT_CHILD_GETTERS(txSquelchForce, 5); + + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return lane(); } + else if constexpr (__id == 2) { return txDisable(); } + else if constexpr (__id == 3) { return txSquelch(); } + else if constexpr (__id == 4) { return txAdaptiveEqControl(); } + else if constexpr (__id == 5) { return txSquelchForce(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } +}; + + +template +class ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : + public Path< + ::facebook::fboss::cfg::SystemPortRanges, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SystemPortRanges>, + Parent> { + public: + using Self = Path< + ::facebook::fboss::cfg::SystemPortRanges, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SystemPortRanges>, Parent>; using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template @@ -13435,25 +13956,20 @@ class ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook: ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + using Children = fatal::tuple, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Range64>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(name, 1); - STRUCT_CHILD_GETTERS(dstPrefixLength, 2); + STRUCT_CHILD_GETTERS(systemPortRanges, 1); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return name(); } - else if constexpr (__id == 2) { return dstPrefixLength(); } + if constexpr (__id == 1) { return systemPortRanges(); } } template @@ -13463,43 +13979,43 @@ std::pair -class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, + ::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, Parent> { public: using Self = Path< - ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, + ::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, + ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = Path<::facebook::fboss::cfg::CounterType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::string); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::MediaLaneSettings, + ::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, Parent> { public: using Self = Path< - ::facebook::fboss::MediaLaneSettings, + ::facebook::fboss::cfg::ExactMatchTableConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::MediaLaneSettings>, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::ExactMatchTableConfig>, Parent>; - using strings = ::facebook::fboss::transceiver_tags::strings; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; template using Child = Path< ChildType, @@ -13508,40 +14024,25 @@ class ChildThriftPath<::facebook::fboss::MediaLaneSettings, ::facebook::fboss::f ChildTag, Self >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child>>; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(lane, 1); - STRUCT_CHILD_GETTERS(txDisable, 2); - STRUCT_CHILD_GETTERS(txSquelch, 3); - STRUCT_CHILD_GETTERS(txAdaptiveEqControl, 4); - STRUCT_CHILD_GETTERS(txSquelchForce, 5); + STRUCT_CHILD_GETTERS(name, 1); + STRUCT_CHILD_GETTERS(dstPrefixLength, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return lane(); } - else if constexpr (__id == 2) { return txDisable(); } - else if constexpr (__id == 3) { return txSquelch(); } - else if constexpr (__id == 4) { return txAdaptiveEqControl(); } - else if constexpr (__id == 5) { return txSquelchForce(); } + if constexpr (__id == 1) { return name(); } + else if constexpr (__id == 2) { return dstPrefixLength(); } } template @@ -13551,24 +14052,24 @@ std::pair -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::CounterType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::CounterType>, + ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::CounterType>, + ::std::map<::std::string, ::facebook::fboss::cfg::UdfPacketMatcher>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::enumeration>, - ::apache::thrift::type::list<::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::UdfPacketMatcher>>, Parent>; - using Child = Path<::facebook::fboss::cfg::CounterType, ::facebook::fboss::fsdb::FsdbOperStateRoot, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::CounterType>, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::UdfPacketMatcher, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::string); }; template @@ -13707,244 +14208,29 @@ class ChildThriftPath<::facebook::fboss::phy::LaneMap, ::facebook::fboss::fsdb:: using Child = Path< ChildType, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, - std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(rx, 1); - STRUCT_CHILD_GETTERS(tx, 2); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return rx(); } - else if constexpr (__id == 2) { return tx(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - - -template -class ChildThriftPath<::facebook::fboss::cfg::SwitchSettings, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::cfg::SwitchSettings, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::cfg::SwitchSettings, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchSettings>, - Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>, -std::pair>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::L2LearningMode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::L2LearningMode>>>, - std::pair, Child>, - std::pair, Child>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::Neighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, - std::pair, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::ExactMatchTableConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::facebook::fboss::cfg::SwitchDrainState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchDrainState>>>, - std::pair, ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(l2LearningMode, 1); - STRUCT_CHILD_GETTERS(qcmEnable, 2); - STRUCT_CHILD_GETTERS(ptpTcEnable, 3); - STRUCT_CHILD_GETTERS(l2AgeTimerSeconds, 4); - STRUCT_CHILD_GETTERS(maxRouteCounterIDs, 5); - STRUCT_CHILD_GETTERS(blockNeighbors, 6); - STRUCT_CHILD_GETTERS(macAddrsToBlock, 7); - STRUCT_CHILD_GETTERS(switchType, 8); - STRUCT_CHILD_GETTERS(switchId, 9); - STRUCT_CHILD_GETTERS(exactMatchTableConfigs, 10); - STRUCT_CHILD_GETTERS(switchIdToSwitchType_DEPRECATED, 11); - STRUCT_CHILD_GETTERS(switchDrainState, 12); - STRUCT_CHILD_GETTERS(switchIdToSwitchInfo, 13); - STRUCT_CHILD_GETTERS(minLinksToRemainInVOQDomain, 14); - STRUCT_CHILD_GETTERS(minLinksToJoinVOQDomain, 15); - STRUCT_CHILD_GETTERS(vendorMacOuis, 16); - STRUCT_CHILD_GETTERS(metaMacOuis, 17); - STRUCT_CHILD_GETTERS(needL2EntryForNeighbor, 18); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return l2LearningMode(); } - else if constexpr (__id == 2) { return qcmEnable(); } - else if constexpr (__id == 3) { return ptpTcEnable(); } - else if constexpr (__id == 4) { return l2AgeTimerSeconds(); } - else if constexpr (__id == 5) { return maxRouteCounterIDs(); } - else if constexpr (__id == 6) { return blockNeighbors(); } - else if constexpr (__id == 7) { return macAddrsToBlock(); } - else if constexpr (__id == 8) { return switchType(); } - else if constexpr (__id == 9) { return switchId(); } - else if constexpr (__id == 10) { return exactMatchTableConfigs(); } - else if constexpr (__id == 11) { return switchIdToSwitchType_DEPRECATED(); } - else if constexpr (__id == 12) { return switchDrainState(); } - else if constexpr (__id == 13) { return switchIdToSwitchInfo(); } - else if constexpr (__id == 14) { return minLinksToRemainInVOQDomain(); } - else if constexpr (__id == 15) { return minLinksToJoinVOQDomain(); } - else if constexpr (__id == 16) { return vendorMacOuis(); } - else if constexpr (__id == 17) { return metaMacOuis(); } - else if constexpr (__id == 18) { return needL2EntryForNeighbor(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - -template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::PortNeighbor>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::vector<::facebook::fboss::cfg::PortNeighbor>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, - Parent> { - public: - using Self = Path< - ::std::vector<::facebook::fboss::cfg::PortNeighbor>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::PortNeighbor>>, - Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::PortNeighbor, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::std::int32_t); -}; - - -template -class ChildThriftPath<::facebook::fboss::state::TransceiverSpecFields, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::state::TransceiverSpecFields, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::state::TransceiverSpecFields, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::TransceiverSpecFields>, - Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>>, -std::pair>>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child>, - std::pair, Child<::facebook::fboss::MediaInterfaceCode, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::MediaInterfaceCode>>>, - std::pair, Child<::facebook::fboss::TransceiverManagementInterface, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::TransceiverManagementInterface>>>>; + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>, +std::pair>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>, + std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>>::template type_of; + using NameToId = fatal::tuple>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; using Self::Self; - STRUCT_CHILD_GETTERS(id, 1); - STRUCT_CHILD_GETTERS(cableLength, 2); - STRUCT_CHILD_GETTERS(mediaInterface, 3); - STRUCT_CHILD_GETTERS(managementInterface, 4); + STRUCT_CHILD_GETTERS(rx, 1); + STRUCT_CHILD_GETTERS(tx, 2); template auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return id(); } - else if constexpr (__id == 2) { return cableLength(); } - else if constexpr (__id == 3) { return mediaInterface(); } - else if constexpr (__id == 4) { return managementInterface(); } + if constexpr (__id == 1) { return rx(); } + else if constexpr (__id == 2) { return tx(); } } template @@ -14060,18 +14346,21 @@ class ChildThriftPath<::facebook::fboss::cfg::AclTable, ::facebook::fboss::fsdb: std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclEntry>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template using NameToId = fatal::tuple>, std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -14082,6 +14371,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -14090,6 +14380,7 @@ std::pair @@ -14806,7 +15097,8 @@ std::pair>>, std::pair>, std::pair>>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::facebook::fboss::cfg::PortState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortState>>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, @@ -14836,7 +15128,8 @@ std::pair, Child<::facebook::fboss::cfg::PortDrainState, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::PortDrainState>>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::facebook::fboss::cfg::Scope, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::Scope>>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, Child>>; template using NameToId = fatal::tuple>, std::pair>, @@ -14867,7 +15160,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -14903,6 +15197,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -14936,6 +15231,7 @@ std::pair @@ -15001,114 +15297,114 @@ std::pair -class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, + ::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, Parent> { public: using Self = Path< - ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, + ::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, - ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, + ::apache::thrift::type_class::structure, + ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using strings = ::facebook::fboss::cfg::switch_config_tags::strings; + template + using Child = Path< + ChildType, + ::facebook::fboss::fsdb::FsdbOperStateRoot, + ChildTC, + ChildTag, + Self + >; + using Children = fatal::tuple>>; + using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; + template + using NameToId = fatal::tuple>>::template type_of; + + template + using TypeFor = typename Children::template type_of; using Self::Self; + + STRUCT_CHILD_GETTERS(dscpValue, 1); - CONTAINER_CHILD_GETTERS(::std::int16_t); + template + auto operator()(const std::integral_constant&) { + if constexpr (__id == 1) { return dscpValue(); } + } + + template + auto operator()(const fatal::sequence&) { + return operator()(NameToId>()); + } }; template -class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, + ::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, Parent> { public: using Self = Path< - ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, + ::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, - ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, + ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, + ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::SwitchInfo, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int64_t); + CONTAINER_CHILD_GETTERS(::std::int32_t); }; template -class ChildThriftPath<::std::vector<::facebook::fboss::cfg::MacAndVlan>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::std::vector<::facebook::fboss::cfg::MacAndVlan>, + ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, Parent> { public: using Self = Path< - ::std::vector<::facebook::fboss::cfg::MacAndVlan>, + ::std::map<::std::int16_t, ::facebook::fboss::cfg::ChipConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::list<::apache::thrift::type_class::structure>, - ::apache::thrift::type::list<::apache::thrift::type::struct_t<::facebook::fboss::cfg::MacAndVlan>>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::variant>, + ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::facebook::fboss::cfg::ChipConfig>>, Parent>; - using Child = ChildThriftPath<::facebook::fboss::cfg::MacAndVlan, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; + using Child = ChildThriftPath<::facebook::fboss::cfg::ChipConfig, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - CONTAINER_CHILD_GETTERS(::std::int32_t); + CONTAINER_CHILD_GETTERS(::std::int16_t); }; - template -class ChildThriftPath<::facebook::fboss::cfg::SetDscpMatchAction, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : +class ChildThriftPath<::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : public Path< - ::facebook::fboss::cfg::SetDscpMatchAction, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, Parent> { public: using Self = Path< - ::facebook::fboss::cfg::SetDscpMatchAction, + ::std::map<::std::int64_t, ::facebook::fboss::cfg::SwitchInfo>, ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SetDscpMatchAction>, + ::apache::thrift::type_class::map<::apache::thrift::type_class::integral, ::apache::thrift::type_class::structure>, + ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::struct_t<::facebook::fboss::cfg::SwitchInfo>>, Parent>; - using strings = ::facebook::fboss::cfg::switch_config_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>>; - using ChildrenById = fatal::tuple< std::pair, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>>; - template - using NameToId = fatal::tuple>>::template type_of; - - template - using TypeFor = typename Children::template type_of; + using Child = ChildThriftPath<::facebook::fboss::cfg::SwitchInfo, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; using Self::Self; - - STRUCT_CHILD_GETTERS(dscpValue, 1); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return dscpValue(); } - } - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } + CONTAINER_CHILD_GETTERS(::std::int64_t); }; @@ -15140,18 +15436,21 @@ class ChildThriftPath<::facebook::fboss::state::AclTableFields, ::facebook::fbos std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, -std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, +std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::AclEntryFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableActionType>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; + std::pair, ChildThriftPath<::std::vector<::facebook::fboss::cfg::AclTableQualifier>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, ChildThriftPath<::std::vector<::std::string>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>; template using NameToId = fatal::tuple>, std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -15162,6 +15461,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -15170,6 +15470,7 @@ std::pair @@ -16009,7 +16310,8 @@ std::pair>, std::pair, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair>>, -std::pair>>; +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, @@ -16061,7 +16363,8 @@ std::pair, Child>, std::pair, ChildThriftPath<::std::vector<::facebook::fboss::PortError>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::facebook::fboss::cfg::Scope, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::Scope>>>, - std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child>>; template using NameToId = fatal::tuple>, std::pair>, @@ -16114,7 +16417,8 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -16172,6 +16476,7 @@ std::pair auto operator()(const std::integral_constant&) { @@ -16227,6 +16532,7 @@ std::pair @@ -16759,14 +17065,22 @@ std::pair>, std::pair>, std::pair>, -std::pair>>; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>; using ChildrenById = fatal::tuple< std::pair, Child<::facebook::fboss::cfg::SwitchType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::SwitchType>>>, std::pair, Child<::facebook::fboss::cfg::AsicType, ::apache::thrift::type_class::enumeration, ::apache::thrift::type::enum_t<::facebook::fboss::cfg::AsicType>>>, std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, ChildThriftPath<::facebook::fboss::cfg::Range64, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>>; + std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, + std::pair, ChildThriftPath<::facebook::fboss::cfg::SystemPortRanges, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>, + std::pair, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>>; template using NameToId = fatal::tuple>, std::pair>, @@ -16774,7 +17088,11 @@ std::pair>, std::pair>, std::pair>, -std::pair>>::template type_of; +std::pair>, +std::pair>, +std::pair>, +std::pair>, +std::pair>>::template type_of; template using TypeFor = typename Children::template type_of; @@ -16787,6 +17105,10 @@ std::pair auto operator()(const std::integral_constant&) { @@ -16797,6 +17119,10 @@ std::pair @@ -17462,104 +17788,6 @@ class ChildThriftPath<::std::map<::facebook::fboss::cfg::AclStage, ::facebook::f CONTAINER_CHILD_GETTERS(::facebook::fboss::cfg::AclStage); }; -template -class ChildThriftPath<::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, - Parent> { - public: - using Self = Path< - ::std::map<::facebook::fboss::state::SwitchIdList, ::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>>, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::facebook::fboss::state::QosPolicyFields>>>, - Parent>; - using Child = ChildThriftPath<::std::map<::std::string, ::facebook::fboss::state::QosPolicyFields>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>; - using Self::Self; - - CONTAINER_CHILD_GETTERS(::facebook::fboss::state::SwitchIdList); -}; - - -template -class ChildThriftPath<::facebook::fboss::state::MirrorTunnel, ::facebook::fboss::fsdb::FsdbOperStateRoot, Parent> : - public Path< - ::facebook::fboss::state::MirrorTunnel, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, - Parent> { - public: - using Self = Path< - ::facebook::fboss::state::MirrorTunnel, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ::apache::thrift::type_class::structure, - ::apache::thrift::type::struct_t<::facebook::fboss::state::MirrorTunnel>, - Parent>; - using strings = ::facebook::fboss::state::switch_state_tags::strings; - template - using Child = Path< - ChildType, - ::facebook::fboss::fsdb::FsdbOperStateRoot, - ChildTC, - ChildTag, - Self - >; - using Children = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>; - using ChildrenById = fatal::tuple< std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, ChildThriftPath<::facebook::network::thrift::BinaryAddress, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>, - std::pair, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>>; - template - using NameToId = fatal::tuple>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>, -std::pair>>::template type_of; - - template - using TypeFor = typename Children::template type_of; - using Self::Self; - - STRUCT_CHILD_GETTERS(srcIp, 1); - STRUCT_CHILD_GETTERS(dstIp, 2); - STRUCT_CHILD_GETTERS(srcMac, 3); - STRUCT_CHILD_GETTERS(dstMac, 4); - STRUCT_CHILD_GETTERS(udpSrcPort, 5); - STRUCT_CHILD_GETTERS(udpDstPort, 6); - STRUCT_CHILD_GETTERS(ttl, 7); - - template - auto operator()(const std::integral_constant&) { - if constexpr (__id == 1) { return srcIp(); } - else if constexpr (__id == 2) { return dstIp(); } - else if constexpr (__id == 3) { return srcMac(); } - else if constexpr (__id == 4) { return dstMac(); } - else if constexpr (__id == 5) { return udpSrcPort(); } - else if constexpr (__id == 6) { return udpDstPort(); } - else if constexpr (__id == 7) { return ttl(); } - } - - template - auto operator()(const fatal::sequence&) { - return operator()(NameToId>()); - } -}; - template<> diff --git a/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp b/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp index 36815acd0c837..1eed454a4eb5d 100644 --- a/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp +++ b/fboss/fsdb/oper/CowPublishAndAddTraverseHelper.cpp @@ -27,7 +27,8 @@ void CowPublishAndAddTraverseHelper::onPushImpl( if (FLAGS_lazyPathStoreCreation) { child = lastPathStore->child(newTok); } else { - child = lastPathStore->getOrCreateChild(newTok); + child = + lastPathStore->getOrCreateChild(newTok, store_->getPathStoreStats()); } // this assumes currPath has size > 0, which we know because we // would have added at least one elem in TraverseHelper::push(). diff --git a/fboss/fsdb/oper/CowSubscriptionManager.h b/fboss/fsdb/oper/CowSubscriptionManager.h index 4a5fe45ca8e69..323330a86324e 100644 --- a/fboss/fsdb/oper/CowSubscriptionManager.h +++ b/fboss/fsdb/oper/CowSubscriptionManager.h @@ -220,7 +220,7 @@ class CowSubscriptionManager patchNode.set_val(*buf); patchSubscription->offer(std::move(patchNode)); } - store.lookup().add(subscription); + store.lookup().add(subscription, store.getPathStoreStats()); subscription->firstChunkSent(); // TODO: trim empty path store nodes it = subscriptions.erase(it); @@ -309,7 +309,7 @@ class CowSubscriptionManager } void pruneDeletedPaths( - SubscriptionPathStore* lookup, + SubscriptionStore& store, const std::shared_ptr& oldRoot, const std::shared_ptr& newRoot) { // This helper uses DeltaVisitor to visit all deleted nodes in @@ -333,13 +333,13 @@ class CowSubscriptionManager if (parentStore) { auto path = traverser.path(); auto lastTok = path.back(); - parentStore->removeChild(lastTok); + parentStore->removeChild(lastTok, store.getPathStoreStats()); } } } }; - CowDeletePathTraverseHelper traverser(lookup); + CowDeletePathTraverseHelper traverser(&store.lookup()); thrift_cow::RootDeltaVisitor::visit( traverser, diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h index d42cb060349da..214fd09cc273d 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorage.h @@ -41,24 +41,14 @@ class NaivePeriodicSubscribableStorage explicit NaivePeriodicSubscribableStorage( const RootT& initialState, - std::chrono::milliseconds subscriptionServeInterval = - std::chrono::milliseconds(50), - std::chrono::milliseconds subscriptionHeartbeatInterval = - std::chrono::seconds(5), - bool trackMetadata = false, - const std::string& metricPrefix = "fsdb", - bool convertToIDPaths = false, - bool requireResponseOnInitialSync = false) - : NaivePeriodicSubscribableStorageBase( - subscriptionServeInterval, - subscriptionHeartbeatInterval, - trackMetadata, - metricPrefix, - convertToIDPaths), + StorageParams params = {}) + : NaivePeriodicSubscribableStorageBase(params), currentState_(std::in_place, initialState), lastPublishedState_(*currentState_.rlock()), - subscriptions_(patchOperProtocol_, requireResponseOnInitialSync) { - subscriptions_.useIdPaths(convertToIDPaths); + subscriptions_( + patchOperProtocol_, + params.requireResponseOnInitialSync_) { + subscriptions_.useIdPaths(params.convertSubsToIDPaths_); auto currentState = currentState_.wlock(); currentState->publish(); } @@ -95,7 +85,7 @@ class NaivePeriodicSubscribableStorage get_encoded_impl(PathIter begin, PathIter end, OperProtocol protocol) const { auto state = currentState_.rlock(); auto result = state->get_encoded(begin, end, protocol); - if (result.hasValue() && trackMetadata_) { + if (result.hasValue() && params_.trackMetadata_) { metadataTracker_.withRLock([&](auto& tracker) { CHECK(tracker); auto metadata = @@ -117,7 +107,7 @@ class NaivePeriodicSubscribableStorage OperProtocol protocol) const { auto state = currentState_.rlock(); auto result = state->get_encoded_extended(begin, end, protocol); - if (result.hasValue() && trackMetadata_) { + if (result.hasValue() && params_.trackMetadata_) { metadataTracker_.withRLock([&](auto& tracker) { CHECK(tracker); auto metadata = @@ -248,12 +238,14 @@ class NaivePeriodicSubscribableStorage exportServeMetrics(start); - co_await folly::coro::sleep(subscriptionServeInterval_); + co_await folly::coro::sleep(params_.subscriptionServeInterval_); } } using NaivePeriodicSubscribableStorageBase::getSubscriptions; using NaivePeriodicSubscribableStorageBase::numPathStores; + // Do not use, except for UTs that cross check numPathStores() + using NaivePeriodicSubscribableStorageBase::numPathStoresRecursive_Expensive; using NaivePeriodicSubscribableStorageBase::numSubscriptions; using NaivePeriodicSubscribableStorageBase::setConvertToIDPaths; @@ -297,7 +289,7 @@ template typename Storage::ConcretePath NaivePeriodicSubscribableStorage::convertPath( ConcretePath&& path) const { - return convertSubsToIDPaths_ + return params_.convertSubsToIDPaths_ ? PathConverter::pathToIdTokens(std::move(path)) : path; } @@ -306,8 +298,9 @@ template typename Storage::ExtPath NaivePeriodicSubscribableStorage::convertPath( const ExtPath& path) const { - return convertSubsToIDPaths_ ? PathConverter::extPathToIdTokens(path) - : path; + return params_.convertSubsToIDPaths_ + ? PathConverter::extPathToIdTokens(path) + : path; } template diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp index b9ec84bae9e9d..f22ef2d82db7a 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.cpp @@ -33,19 +33,17 @@ DEFINE_bool( namespace facebook::fboss::fsdb { NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( - std::chrono::milliseconds subscriptionServeInterval, - std::chrono::milliseconds subscriptionHeartbeatInterval, - bool trackMetadata, - const std::string& metricPrefix, - bool convertToIDPaths) - : subscriptionServeInterval_(subscriptionServeInterval), - subscriptionHeartbeatInterval_(subscriptionHeartbeatInterval), - trackMetadata_(trackMetadata), - convertSubsToIDPaths_(convertToIDPaths), - rss_(fmt::format("{}.{}", metricPrefix, kRss)), - serveSubMs_(fmt::format("{}.{}", metricPrefix, kServeSubMs)), - serveSubNum_(fmt::format("{}.{}", metricPrefix, kServeSubNum)) { - if (trackMetadata) { + StorageParams params) + : params_(std::move(params)), + rss_(fmt::format("{}.{}", params_.metricPrefix_, kRss)), + registeredSubs_( + fmt::format("{}.{}", params_.metricPrefix_, kRegisteredSubs)), + nPathStores_(fmt::format("{}.{}", params_.metricPrefix_, kPathStoreNum)), + nPathStoreAllocs_( + fmt::format("{}.{}", params_.metricPrefix_, kPathStoreAllocs)), + serveSubMs_(fmt::format("{}.{}", params_.metricPrefix_, kServeSubMs)), + serveSubNum_(fmt::format("{}.{}", params_.metricPrefix_, kServeSubNum)) { + if (params_.trackMetadata_) { metadataTracker_ = std::make_unique(); } @@ -53,6 +51,15 @@ NaivePeriodicSubscribableStorageBase::NaivePeriodicSubscribableStorageBase( fb303::ThreadCachedServiceData::get()->addStatExportType(rss_, fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatExportType( + registeredSubs_, fb303::AVG); + + fb303::ThreadCachedServiceData::get()->addStatExportType( + nPathStores_, fb303::AVG); + + fb303::ThreadCachedServiceData::get()->addStatExportType( + nPathStoreAllocs_, fb303::AVG); + // elapsed time to serve each subscription // histogram range [0, 1s], 10ms width (100 bins) fb303::ThreadCachedServiceData::get()->addHistogram(serveSubMs_, 10, 0, 1000); @@ -132,7 +139,7 @@ void NaivePeriodicSubscribableStorageBase::stop_impl() { void NaivePeriodicSubscribableStorageBase::registerPublisher( PathIter begin, PathIter end) { - if (!trackMetadata_) { + if (!params_.trackMetadata_) { return; } metadataTracker_.withWLock([&](auto& tracker) { @@ -145,7 +152,7 @@ void NaivePeriodicSubscribableStorageBase::unregisterPublisher( PathIter begin, PathIter end, FsdbErrorCode disconnectReason) { - if (!trackMetadata_) { + if (!params_.trackMetadata_) { return; } metadataTracker_.withWLock([&](auto& tracker) { @@ -177,6 +184,15 @@ void NaivePeriodicSubscribableStorageBase::exportServeMetrics( int64_t memUsage = getMemoryUsage(); // RSS fb303::ThreadCachedServiceData::get()->addStatValue( rss_, memUsage, fb303::AVG); + + int64_t n_registeredSubs = numSubscriptions(); + fb303::ThreadCachedServiceData::get()->addStatValue( + registeredSubs_, n_registeredSubs, fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatValue( + nPathStores_, numPathStores(), fb303::AVG); + fb303::ThreadCachedServiceData::get()->addStatValue( + nPathStoreAllocs_, numPathStores(), fb303::AVG); + auto elapsed = std::chrono::duration_cast( std::chrono::steady_clock::now() - serveStartTime); if (elapsed.count() > 0) { @@ -193,7 +209,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( PathIter begin, PathIter end) const { auto path = convertPath(ConcretePath(begin, end)); - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional( OperPathToPublisherRoot().publisherRoot(path.begin(), path.end())) : std::nullopt; @@ -203,7 +219,7 @@ std::optional NaivePeriodicSubscribableStorageBase::getPublisherRoot( const std::vector& paths) const { auto convertedPaths = convertExtPaths(paths); - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional( OperPathToPublisherRoot().publisherRoot(convertedPaths)) : std::nullopt; @@ -214,7 +230,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( ExtPathIter begin, ExtPathIter end) const { auto path = convertPath(ExtPath(begin, end)); - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional( OperPathToPublisherRoot().publisherRoot(path.begin(), path.end())) : std::nullopt; @@ -223,7 +239,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( std::optional NaivePeriodicSubscribableStorageBase::getPublisherRoot( const std::map& paths) const { - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional(OperPathToPublisherRoot().publisherRoot(paths)) : std::nullopt; } @@ -231,7 +247,7 @@ NaivePeriodicSubscribableStorageBase::getPublisherRoot( std::optional NaivePeriodicSubscribableStorageBase::getPublisherRoot( const std::map& paths) const { - return trackMetadata_ + return params_.trackMetadata_ ? std::make_optional(OperPathToPublisherRoot().publisherRoot(paths)) : std::nullopt; } @@ -255,7 +271,7 @@ void NaivePeriodicSubscribableStorageBase::updateMetadata( std::vector NaivePeriodicSubscribableStorageBase::convertExtPaths( const std::vector& paths) const { - if (!convertSubsToIDPaths_) { + if (!params_.convertSubsToIDPaths_) { return paths; } std::vector convertedPaths; @@ -282,7 +298,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_encoded_impl( protocol, getPublisherRoot(path.begin(), path.end()), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerSubscription(std::move(subscription)); return std::move(gen); } @@ -301,7 +317,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_delta_impl( protocol, getPublisherRoot(path.begin(), path.end()), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerSubscription(std::move(subscription)); return std::move(gen); } @@ -319,7 +335,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_encoded_extended_impl( std::move(publisherRoot), protocol, heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } @@ -337,7 +353,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_delta_extended_impl( std::move(publisherRoot), protocol, heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } @@ -357,7 +373,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_patch_impl( patchOperProtocol_, std::move(root), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } @@ -377,7 +393,7 @@ NaivePeriodicSubscribableStorageBase::subscribe_patch_extended_impl( patchOperProtocol_, std::move(root), heartbeatThread_ ? heartbeatThread_->getEventBase() : nullptr, - subscriptionHeartbeatInterval_); + params_.subscriptionHeartbeatInterval_); subMgr().registerExtendedSubscription(std::move(subscription)); return std::move(gen); } diff --git a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h index e29847ff34841..83793c053085d 100644 --- a/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h +++ b/fboss/fsdb/oper/NaivePeriodicSubscribableStorageBase.h @@ -22,6 +22,9 @@ namespace facebook::fboss::fsdb { inline constexpr std::string_view kServeSubMs{"storage.serve_sub_ms"}; inline constexpr std::string_view kServeSubNum{"storage.serve_sub_num"}; inline constexpr std::string_view kRss{"rss"}; +inline constexpr std::string_view kRegisteredSubs{"subscriptions.registered"}; +inline constexpr std::string_view kPathStoreNum{"object.count.pathStores"}; +inline constexpr std::string_view kPathStoreAllocs{"object.allocs.pathStores"}; // non-templated parts of NaivePeriodicSubscribableStorage to help with // compilation @@ -32,12 +35,32 @@ class NaivePeriodicSubscribableStorageBase { using ExtPath = typename OperPathToPublisherRoot::ExtPath; using ExtPathIter = typename OperPathToPublisherRoot::ExtPathIter; - NaivePeriodicSubscribableStorageBase( - std::chrono::milliseconds subscriptionServeInterval, - std::chrono::milliseconds subscriptionHeartbeatInterval, - bool trackMetadata, - const std::string& metricPrefix, - bool convertToIDPaths); + struct StorageParams { + StorageParams( + std::chrono::milliseconds subscriptionServeInterval = + std::chrono::milliseconds(50), + std::chrono::milliseconds subscriptionHeartbeatInterval = + std::chrono::seconds(5), + bool trackMetadata = false, + const std::string& metricPrefix = "fsdb", + bool convertToIDPaths = false, + bool requireResponseOnInitialSync = false) + : subscriptionServeInterval_(subscriptionServeInterval), + subscriptionHeartbeatInterval_(subscriptionHeartbeatInterval), + trackMetadata_(trackMetadata), + metricPrefix_(metricPrefix), + convertSubsToIDPaths_(convertToIDPaths), + requireResponseOnInitialSync_(requireResponseOnInitialSync) {} + + const std::chrono::milliseconds subscriptionServeInterval_; + const std::chrono::milliseconds subscriptionHeartbeatInterval_; + const bool trackMetadata_; + const std::string& metricPrefix_; + bool convertSubsToIDPaths_; + const bool requireResponseOnInitialSync_; + }; + + explicit NaivePeriodicSubscribableStorageBase(StorageParams params); virtual ~NaivePeriodicSubscribableStorageBase() {} @@ -127,9 +150,18 @@ class NaivePeriodicSubscribableStorageBase { size_t numPathStores() const { return subMgr().numPathStores(); } + size_t numPathStoresRecursive_Expensive() const { + return subMgr().numPathStoresRecursive_Expensive(); + } + uint64_t numPathStoreAllocs() const { + return subMgr().numPathStoreAllocs(); + } + uint64_t numPathStoreFrees() const { + return subMgr().numPathStoreFrees(); + } void setConvertToIDPaths(bool convertToIDPaths) { - convertSubsToIDPaths_ = convertToIDPaths; + params_.convertSubsToIDPaths_ = convertToIDPaths; subMgr().useIdPaths(convertToIDPaths); } @@ -169,13 +201,9 @@ class NaivePeriodicSubscribableStorageBase { folly::Synchronized running_{false}; - const std::chrono::milliseconds subscriptionServeInterval_; - const std::chrono::milliseconds subscriptionHeartbeatInterval_; + StorageParams params_; folly::Synchronized> metadataTracker_; - const bool trackMetadata_{false}; - - bool convertSubsToIDPaths_{false}; // as an optimization, for now we decide what protocol is used in patches // instead of letting the client choose @@ -191,6 +219,9 @@ class NaivePeriodicSubscribableStorageBase { // metric names const std::string rss_{""}; + const std::string registeredSubs_{""}; + const std::string nPathStores_{""}; + const std::string nPathStoreAllocs_{""}; const std::string serveSubMs_{""}; const std::string serveSubNum_{""}; diff --git a/fboss/fsdb/oper/Subscription.cpp b/fboss/fsdb/oper/Subscription.cpp index cbd307cad73f6..779814cabe737 100644 --- a/fboss/fsdb/oper/Subscription.cpp +++ b/fboss/fsdb/oper/Subscription.cpp @@ -44,11 +44,17 @@ BaseSubscription::BaseSubscription( } BaseSubscription::~BaseSubscription() { + // subclasses need to call stop since we have virtual method calls queued + CHECK(backgroundScope_.isScopeCancellationRequested()); +} + +void BaseSubscription::stop() { folly::coro::blockingWait(backgroundScope_.cancelAndJoinAsync()); } folly::coro::Task BaseSubscription::heartbeatLoop() { - while (true) { + // make sure to stop loop when we're cancelled + while (!backgroundScope_.isScopeCancellationRequested()) { co_await folly::coro::sleep(heartbeatInterval_); serveHeartbeat(); } diff --git a/fboss/fsdb/oper/Subscription.h b/fboss/fsdb/oper/Subscription.h index 9f4e14092b200..51475d8610c96 100644 --- a/fboss/fsdb/oper/Subscription.h +++ b/fboss/fsdb/oper/Subscription.h @@ -73,6 +73,8 @@ class BaseSubscription { return heartbeatInterval_; } + void stop(); + protected: BaseSubscription( SubscriberId subscriber, @@ -181,8 +183,6 @@ class ExtendedSubscription : public BaseSubscription { class BasePathSubscription : public Subscription { public: - virtual ~BasePathSubscription() override = default; - using Subscription::Subscription; virtual void offer(DeltaValue newVal) = 0; @@ -197,7 +197,9 @@ class PathSubscription : public BasePathSubscription, public: using value_type = DeltaValue; - virtual ~PathSubscription() override = default; + virtual ~PathSubscription() override { + stop(); + } using PathIter = std::vector::const_iterator; void offer(DeltaValue newVal) override { @@ -277,8 +279,6 @@ class PathSubscription : public BasePathSubscription, class BaseDeltaSubscription : public Subscription { public: - virtual ~BaseDeltaSubscription() override = default; - PubSubType type() const override { return PubSubType::DELTA; } @@ -314,6 +314,10 @@ class BaseDeltaSubscription : public Subscription { class DeltaSubscription : public BaseDeltaSubscription, private boost::noncopyable { public: + virtual ~DeltaSubscription() override { + stop(); + } + using PathIter = std::vector::const_iterator; void flush(const SubscriptionMetadataServer& metadataServer) override; @@ -363,7 +367,9 @@ class ExtendedPathSubscription; class FullyResolvedExtendedPathSubscription : public BasePathSubscription, private boost::noncopyable { public: - virtual ~FullyResolvedExtendedPathSubscription() override = default; + virtual ~FullyResolvedExtendedPathSubscription() override { + stop(); + } FullyResolvedExtendedPathSubscription( const std::vector& path, @@ -390,7 +396,9 @@ class FullyResolvedExtendedPathSubscription : public BasePathSubscription, class ExtendedPathSubscription : public ExtendedSubscription, private boost::noncopyable { public: - virtual ~ExtendedPathSubscription() override = default; + virtual ~ExtendedPathSubscription() override { + stop(); + } // we only support encoded extended subscriptions using value_type = TaggedOperState; using gen_type = std::vector>; @@ -458,7 +466,9 @@ class ExtendedDeltaSubscription; class FullyResolvedExtendedDeltaSubscription : public BaseDeltaSubscription, private boost::noncopyable { public: - virtual ~FullyResolvedExtendedDeltaSubscription() override = default; + virtual ~FullyResolvedExtendedDeltaSubscription() override { + stop(); + } FullyResolvedExtendedDeltaSubscription( const std::vector& path, @@ -483,7 +493,9 @@ class FullyResolvedExtendedDeltaSubscription : public BaseDeltaSubscription, class ExtendedDeltaSubscription : public ExtendedSubscription, private boost::noncopyable { public: - virtual ~ExtendedDeltaSubscription() override = default; + virtual ~ExtendedDeltaSubscription() override { + stop(); + } // we only support encoded extended subscriptions using value_type = std::vector; @@ -556,7 +568,9 @@ class PatchSubscription : public Subscription, private boost::noncopyable { std::vector path, ExtendedPatchSubscription& subscription); - virtual ~PatchSubscription() override = default; + virtual ~PatchSubscription() override { + stop(); + } PubSubType type() const override { return PubSubType::PATCH; @@ -585,7 +599,9 @@ class ExtendedPatchSubscription : public ExtendedSubscription, public: using gen_type = SubscriberMessage; - virtual ~ExtendedPatchSubscription() override = default; + virtual ~ExtendedPatchSubscription() override { + stop(); + } // Single path static std::pair< diff --git a/fboss/fsdb/oper/SubscriptionManager.h b/fboss/fsdb/oper/SubscriptionManager.h index 152fcd2414b41..be9bbe17511b8 100644 --- a/fboss/fsdb/oper/SubscriptionManager.h +++ b/fboss/fsdb/oper/SubscriptionManager.h @@ -39,8 +39,21 @@ class SubscriptionManagerBase { return store_.rlock()->subscriptions().size(); } + // Do not use, except for UTs that cross check numPathStores() + size_t numPathStoresRecursive_Expensive() const { + return store_.rlock()->numPathStoresRecursive_Expensive(); + } + size_t numPathStores() const { - return store_.rlock()->lookup().numPathStores(); + return store_.rlock()->numPathStores(); + } + + uint64_t numPathStoreAllocs() const { + return store_.rlock()->numPathStoreAllocs(); + } + + uint64_t numPathStoreFrees() const { + return store_.rlock()->numPathStoreFrees(); } std::vector getSubscriptions() const; @@ -116,7 +129,7 @@ class SubscriptionManager : public SubscriptionManagerBase { } catch (const std::exception&) { XLOG(ERR) << "Exception serving subscriptions..."; } - impl->pruneDeletedPaths(&store->lookup(), oldRoot, newRoot); + impl->pruneDeletedPaths(*store, oldRoot, newRoot); } // Serve new subscriptions after serving existing subscriptions. // New subscriptions will get a full object dump on first sync. diff --git a/fboss/fsdb/oper/SubscriptionPathStore.cpp b/fboss/fsdb/oper/SubscriptionPathStore.cpp index 95c4899281ab2..3865b4b1e0e0b 100644 --- a/fboss/fsdb/oper/SubscriptionPathStore.cpp +++ b/fboss/fsdb/oper/SubscriptionPathStore.cpp @@ -7,9 +7,25 @@ namespace facebook::fboss::fsdb { DEFINE_bool(lazyPathStoreCreation, true, "Lazy path store creation"); -void SubscriptionPathStore::add(Subscription* subscription) { +SubscriptionPathStore::SubscriptionPathStore( + SubscriptionPathStoreTreeStats* stats) { + CHECK(stats); + stats->numPathStoreAllocs++; + stats->numPathStores++; +} + +void SubscriptionPathStore::freePathStore( + SubscriptionPathStoreTreeStats* stats) { + CHECK(stats); + stats->numPathStoreFrees++; + stats->numPathStores--; +} + +void SubscriptionPathStore::add( + Subscription* subscription, + SubscriptionPathStoreTreeStats* stats) { auto path = subscription->path(); - add(path.begin(), path.end(), subscription); + add(stats, path.begin(), path.end(), subscription); } void SubscriptionPathStore::remove(Subscription* subscription) { @@ -52,7 +68,9 @@ void SubscriptionPathStore::incrementallyResolve( const auto& key = path.at(idx).raw_ref().value(); if (auto it = children_.find(key); it == children_.end()) { - children_.emplace(key, std::make_shared()); + children_.emplace( + key, + std::make_shared(store.getPathStoreStats())); } pathSoFar.emplace_back(key); children_.at(key)->incrementallyResolve( @@ -79,7 +97,9 @@ void SubscriptionPathStore::processAddedPath( bool childStorePresent{true}; if (auto it = children_.find(key); it == children_.end()) { if (!FLAGS_lazyPathStoreCreation) { - children_.emplace(key, std::make_shared()); + children_.emplace( + key, + std::make_shared(store.getPathStoreStats())); } else { childStorePresent = false; } @@ -118,7 +138,9 @@ void SubscriptionPathStore::processAddedPath( // partial subscription to next wilcard or the end. std::vector pathSoFar(begin, curr); if (!childStorePresent) { - children_.emplace(key, std::make_shared()); + children_.emplace( + key, + std::make_shared(store.getPathStoreStats())); childStorePresent = true; } children_.at(key)->incrementallyResolve( @@ -187,18 +209,25 @@ SubscriptionPathStore::child(const std::string& key) const { } SubscriptionPathStore* SubscriptionPathStore::getOrCreateChild( - const std::string& key) { + const std::string& key, + SubscriptionPathStoreTreeStats* stats) { + if (auto it2 = children_.find(key); it2 != children_.end()) { + return it2->second.get(); + } auto [it, added] = - children_.emplace(key, std::make_shared()); + children_.emplace(key, std::make_shared(stats)); return it->second.get(); } -void SubscriptionPathStore::removeChild(const std::string& key) { +void SubscriptionPathStore::removeChild( + const std::string& key, + SubscriptionPathStoreTreeStats* stats) { if (auto it = children_.find(key); it == children_.end()) { return; } auto child = children_[key]; CHECK_EQ(children_[key]->numSubsRecursive(), 0); + child->freePathStore(stats); children_.erase(key); return; } @@ -216,6 +245,7 @@ void SubscriptionPathStore::gatherChildren( } void SubscriptionPathStore::add( + SubscriptionPathStoreTreeStats* stats, PathIter begin, PathIter end, Subscription* subscription) { @@ -227,10 +257,10 @@ void SubscriptionPathStore::add( auto key = *begin++; if (auto it = children_.find(key); it == children_.end()) { - children_.emplace(key, std::make_shared()); + children_.emplace(key, std::make_shared(stats)); } - children_[key]->add(begin, end, subscription); + children_[key]->add(stats, begin, end, subscription); incrementCounts(subscription, true); } @@ -262,7 +292,10 @@ bool SubscriptionPathStore::remove( return false; } -void SubscriptionPathStore::clear() { +void SubscriptionPathStore::clear(SubscriptionPathStoreTreeStats* stats) { + for (auto& [_name, child] : children_) { + child->freePathStore(stats); + } children_.clear(); partiallyResolvedSubs_.clear(); subscriptions_.clear(); diff --git a/fboss/fsdb/oper/SubscriptionPathStore.h b/fboss/fsdb/oper/SubscriptionPathStore.h index 3a380f387308e..e18a9e039199b 100644 --- a/fboss/fsdb/oper/SubscriptionPathStore.h +++ b/fboss/fsdb/oper/SubscriptionPathStore.h @@ -30,11 +30,19 @@ struct PartiallyResolvedExtendedSubscription { class SubscriptionStore; +struct SubscriptionPathStoreTreeStats { + uint64_t numPathStores{0}; + uint64_t numPathStoreAllocs{0}; + uint64_t numPathStoreFrees{0}; +}; + class SubscriptionPathStore { public: using PathIter = std::vector::const_iterator; - void add(Subscription* subscription); + explicit SubscriptionPathStore(SubscriptionPathStoreTreeStats* stats); + + void add(Subscription* subscription, SubscriptionPathStoreTreeStats* stats); void remove(Subscription* subscription); @@ -57,11 +65,15 @@ class SubscriptionPathStore { SubscriptionPathStore* FOLLY_NULLABLE child(const std::string& key) const; - SubscriptionPathStore* getOrCreateChild(const std::string& key); + SubscriptionPathStore* getOrCreateChild( + const std::string& key, + SubscriptionPathStoreTreeStats* stats); - void removeChild(const std::string& key); + void removeChild( + const std::string& key, + SubscriptionPathStoreTreeStats* stats); - void clear(); + void clear(SubscriptionPathStoreTreeStats* stats); void debugPrint() const; @@ -74,10 +86,10 @@ class SubscriptionPathStore { uint32_t numSubsRecursive() const { return numSubs() + numChildSubs(); } - uint32_t numPathStores() const { - auto totalPathStores = children_.size(); + uint32_t numPathStoresRecursive_Expensive() const { + uint32_t totalPathStores{1}; for (auto& [_name, child] : children_) { - totalPathStores += child->numPathStores(); + totalPathStores += child->numPathStoresRecursive_Expensive(); } return totalPathStores; } @@ -94,11 +106,17 @@ class SubscriptionPathStore { } private: + void freePathStore(SubscriptionPathStoreTreeStats* stats); + void debugPrint(std::vector& pathSoFar) const; void gatherChildren(std::vector& gathered); - void add(PathIter begin, PathIter end, Subscription* subscription); + void add( + SubscriptionPathStoreTreeStats* stats, + PathIter begin, + PathIter end, + Subscription* subscription); // returns true if a subscription was actually removed bool remove(PathIter begin, PathIter end, Subscription* subscription); diff --git a/fboss/fsdb/oper/SubscriptionStore.cpp b/fboss/fsdb/oper/SubscriptionStore.cpp index 2760ba43c1d03..a382fa9c585de 100644 --- a/fboss/fsdb/oper/SubscriptionStore.cpp +++ b/fboss/fsdb/oper/SubscriptionStore.cpp @@ -12,10 +12,10 @@ namespace facebook::fboss::fsdb { SubscriptionStore::~SubscriptionStore() { - initialSyncNeeded_.clear(); + initialSyncNeeded_.clear(&pathStoreStats_); initialSyncNeededExtended_.clear(); - lookup_.clear(); + lookup_.clear(&pathStoreStats_); // fully resolved extended subs have a ref to the extended sub // make sure to destroy those before destroy the extended sub subscriptions_.clear(); @@ -131,7 +131,7 @@ void SubscriptionStore::registerSubscription( throw Utils::createFsdbException( FsdbErrorCode::ID_ALREADY_EXISTS, name + " already exixts"); } - initialSyncNeeded_.add(rawPtr); + initialSyncNeeded_.add(rawPtr, &pathStoreStats_); } void SubscriptionStore::registerExtendedSubscription( diff --git a/fboss/fsdb/oper/SubscriptionStore.h b/fboss/fsdb/oper/SubscriptionStore.h index 96e2937680aad..af93bac2a7b7f 100644 --- a/fboss/fsdb/oper/SubscriptionStore.h +++ b/fboss/fsdb/oper/SubscriptionStore.h @@ -9,6 +9,9 @@ namespace facebook::fboss::fsdb { class SubscriptionStore { public: + SubscriptionStore() + : initialSyncNeeded_(&pathStoreStats_), lookup_(&pathStoreStats_) {} + virtual ~SubscriptionStore(); void pruneCancelledSubscriptions(); @@ -68,6 +71,25 @@ class SubscriptionStore { return lookup_; } + SubscriptionPathStoreTreeStats* getPathStoreStats() { + return &pathStoreStats_; + } + + size_t numPathStoresRecursive_Expensive() const { + return initialSyncNeeded_.numPathStoresRecursive_Expensive() + + lookup_.numPathStoresRecursive_Expensive(); + } + + auto numPathStores() const { + return pathStoreStats_.numPathStores; + } + auto numPathStoreAllocs() const { + return pathStoreStats_.numPathStoreAllocs; + } + auto numPathStoreFrees() const { + return pathStoreStats_.numPathStoreFrees; + } + private: std::vector markExtendedSubscriptionsThatNeedPruning(); @@ -83,6 +105,9 @@ class SubscriptionStore { std::string name, std::shared_ptr subscription); + // stats for tree + SubscriptionPathStoreTreeStats pathStoreStats_; + // owned subscriptions, keyed on name they were registered with std::unordered_map> subscriptions_; std::unordered_map> diff --git a/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp b/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp index bcff36f21bd5d..49fc7820c55ac 100644 --- a/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp +++ b/fboss/fsdb/oper/tests/SubscribableStorageTests.cpp @@ -948,7 +948,7 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { folly::coro::timeout(consumeOne(generator), std::chrono::seconds(1))); EXPECT_EQ(deltaVal.changes()->size(), 1); - auto initialNumPathStores = storage.numPathStores(); + auto initialNumPathStores = storage.numPathStoresRecursive_Expensive(); XLOG(DBG2) << "initialNumPathStores: " << initialNumPathStores; // add another path and check PathStores count @@ -958,7 +958,7 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { folly::coro::timeout(consumeOne(generator), std::chrono::seconds(1))); EXPECT_EQ(deltaVal.changes()->size(), 1); - auto maxNumPathStores = storage.numPathStores(); + auto maxNumPathStores = storage.numPathStoresRecursive_Expensive(); XLOG(DBG2) << "maxNumPathStores: " << maxNumPathStores; if (FLAGS_lazyPathStoreCreation) { // with lazy PathStore creation, numPathStores should not change @@ -976,7 +976,7 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { EXPECT_EQ(deltaVal.changes()->size(), 1); // after path deletion, numPathStores should drop - auto finalNumPathStores = storage.numPathStores(); + auto finalNumPathStores = storage.numPathStoresRecursive_Expensive(); XLOG(DBG2) << "finalNumPathStores : " << finalNumPathStores; if (FLAGS_lazyPathStoreCreation) { EXPECT_EQ(finalNumPathStores, maxNumPathStores); @@ -984,6 +984,10 @@ TEST_P(SubscribableStorageTests, PruneSubscriptionPathStores) { EXPECT_LT(finalNumPathStores, maxNumPathStores); } EXPECT_EQ(finalNumPathStores, initialNumPathStores); + + // stronger check: allocation stats and numPathStores must match + auto numAllocatedPathStore = storage.numPathStores(); + EXPECT_EQ(numAllocatedPathStore, finalNumPathStores); } TEST_P(SubscribableStorageTests, ApplyPatch) { diff --git a/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp b/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp index 9bb5bb6f871e6..fdf700d3ff16f 100644 --- a/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp +++ b/fboss/fsdb/oper/tests/SubscriptionPathStoreTests.cpp @@ -16,6 +16,10 @@ using namespace facebook::fboss::fsdb; class TestSubscription : public Subscription { public: + ~TestSubscription() override { + stop(); + } + PubSubType type() const override { return PubSubType::PATH; } @@ -43,6 +47,10 @@ class TestSubscription : public Subscription { class TestDeltaSubscription : public Subscription { public: + ~TestDeltaSubscription() override { + stop(); + } + PubSubType type() const override { return PubSubType::DELTA; } @@ -79,6 +87,10 @@ class TestExtendedSubscription : public ExtendedSubscription { nullptr, std::chrono::milliseconds(0)) {} + ~TestExtendedSubscription() override { + stop(); + } + PubSubType type() const override { return PubSubType::PATH; } @@ -131,9 +143,10 @@ TEST(SubscriptionPathStoreTests, FindSimple) { makeSubscription({"a", "b", "c", "d"}), makeSubscription({"a", "b", "c", "d", "e"})}; - SubscriptionPathStore store; + SubscriptionPathStoreTreeStats stats; + SubscriptionPathStore store(&stats); for (const auto& sub : subs) { - store.add(sub.get()); + store.add(sub.get(), &stats); } std::vector testPath = {"a", "b", "c"}; @@ -215,7 +228,8 @@ TEST(SubscriptionPathStoreTests, IncrementalResolveExtended) { auto extSub4 = std::make_shared( ExtSubPathMap{{0, std::move(path5)}}); - SubscriptionPathStore pathStore; + SubscriptionPathStoreTreeStats stats; + SubscriptionPathStore pathStore(&stats); StubSubscriptionStore store; // seed incremental resolutions of all the subscriptions @@ -281,9 +295,10 @@ TEST(SubscriptionPathStoreTests, TestRecursiveCounts) { makeSubscription({"a", "b", "c", "d", "e"}), makeDeltaSubscription({"a", "b", "c", "d", "e"})}; - SubscriptionPathStore store; + SubscriptionPathStoreTreeStats stats; + SubscriptionPathStore store(&stats); for (const auto& sub : subs) { - store.add(sub.get()); + store.add(sub.get(), &stats); } EXPECT_EQ(store.numSubs(), 0); diff --git a/fboss/fsdb/server/ServiceHandler.cpp b/fboss/fsdb/server/ServiceHandler.cpp index 27f178bb55d14..78d195a355e7c 100644 --- a/fboss/fsdb/server/ServiceHandler.cpp +++ b/fboss/fsdb/server/ServiceHandler.cpp @@ -241,19 +241,21 @@ ServiceHandler::ServiceHandler( fb303::RATE), operStorage_( {}, - std::chrono::milliseconds(FLAGS_stateSubscriptionServe_ms), - std::chrono::seconds(FLAGS_stateSubscriptionHeartbeat_s), - FLAGS_trackMetadata, - "fsdb", - options_.serveIdPathSubs, - true), + NaivePeriodicSubscribableStorageBase::StorageParams( + std::chrono::milliseconds(FLAGS_stateSubscriptionServe_ms), + std::chrono::seconds(FLAGS_stateSubscriptionHeartbeat_s), + FLAGS_trackMetadata, + "fsdb", + options_.serveIdPathSubs, + true)), operStatsStorage_( {}, - std::chrono::seconds(FLAGS_statsSubscriptionServe_s), - std::chrono::seconds(FLAGS_statsSubscriptionHeartbeat_s), - FLAGS_trackMetadata, - "fsdb", - options_.serveIdPathSubs) { + NaivePeriodicSubscribableStorageBase::StorageParams( + std::chrono::seconds(FLAGS_statsSubscriptionServe_s), + std::chrono::seconds(FLAGS_statsSubscriptionHeartbeat_s), + FLAGS_trackMetadata, + "fsdb", + options_.serveIdPathSubs)) { num_instances_.incrementValue(1); initPerStreamCounters(); @@ -632,7 +634,8 @@ void validatePaths( void ServiceHandler::updateSubscriptionCounters( const OperSubscriberInfo& info, - bool isConnected) { + bool isConnected, + bool uniqueSubForClient) { auto connectedCountIncrement = isConnected ? 1 : -1; auto disconnectCountIncrement = isConnected ? -1 : 1; @@ -650,18 +653,8 @@ void ServiceHandler::updateSubscriptionCounters( counter != connectedSubscriptions_.end()) { counter->second.incrementValue(connectedCountIncrement); // per-subscriber counters: checks global subscription count - int nSubscriptions{0}; - activeSubscriptions_.withRLock( - [&clientId, &nSubscriptions](const auto& activeSubscriptions) { - for (const auto& it : activeSubscriptions) { - auto& subscription = it.second; - if (clientId == *subscription.subscriberId()) { - nSubscriptions++; - } - } - }); - bool isFirstSubscriptionConnected = isConnected && nSubscriptions == 1; - bool isLastSubscriptionDisconnected = !isConnected && nSubscriptions == 0; + bool isFirstSubscriptionConnected = isConnected && uniqueSubForClient; + bool isLastSubscriptionDisconnected = !isConnected && uniqueSubForClient; if (isFirstSubscriptionConnected || isLastSubscriptionDisconnected) { num_subscribers_.incrementValue(connectedCountIncrement); num_disconnected_subscribers_.incrementValue(disconnectCountIncrement); @@ -674,7 +667,9 @@ void ServiceHandler::updateSubscriptionCounters( } } -void ServiceHandler::registerSubscription(const OperSubscriberInfo& info) { +void ServiceHandler::registerSubscription( + const OperSubscriberInfo& info, + bool forceSubscribe) { if (info.subscriberId()->empty()) { throw Utils::createFsdbException( FsdbErrorCode::EMPTY_SUBSCRIBER_ID, "Subscriber Id must not be empty"); @@ -694,19 +689,34 @@ void ServiceHandler::registerSubscription(const OperSubscriberInfo& info) { buildPathUnion(info), *info.type(), *info.isStats()); - if (FLAGS_forceRegisterSubscriptions) { - (*activeSubscriptions_.wlock())[std::move(key)] = info; - } else { - auto resp = activeSubscriptions_.wlock()->insert({std::move(key), info}); - if (!resp.second) { - throw Utils::createFsdbException( - FsdbErrorCode::ID_ALREADY_EXISTS, - "Dup subscriber id: ", - *info.subscriberId()); - } - } - updateSubscriptionCounters(info, true); + // update activeSubscriptions_ : TODO: move into SubscriptionManager + bool forceRegisterNewSubscription = + FLAGS_forceRegisterSubscriptions || forceSubscribe; + int numSubsForClient{0}; + activeSubscriptions_.withWLock( + [&key, &info, &numSubsForClient, forceRegisterNewSubscription]( + auto& activeSubscriptions) { + if (forceRegisterNewSubscription) { + activeSubscriptions[std::move(key)] = info; + } else { + auto resp = activeSubscriptions.insert({std::move(key), info}); + if (!resp.second) { + throw Utils::createFsdbException( + FsdbErrorCode::ID_ALREADY_EXISTS, + "Dup subscriber id: ", + *info.subscriberId()); + } + } + // check for existing subs by same SubscriberId + for (const auto& it : activeSubscriptions) { + if (std::get<0>(key) == *it.second.subscriberId()) { + numSubsForClient++; + } + } + }); + updateSubscriptionCounters(info, true, (numSubsForClient == 1)); } + void ServiceHandler::unregisterSubscription(const OperSubscriberInfo& info) { std::string pathStr; // TODO: handle extended path to string @@ -720,8 +730,18 @@ void ServiceHandler::unregisterSubscription(const OperSubscriberInfo& info) { buildPathUnion(info), *info.type(), *info.isStats()); - activeSubscriptions_.wlock()->erase(std::move(key)); - updateSubscriptionCounters(info, false); + int numSubsForClient{0}; + activeSubscriptions_.withWLock( + [&key, &numSubsForClient](auto& activeSubscriptions) { + // check for existing subs by same SubscriberId + for (const auto& it : activeSubscriptions) { + if (std::get<0>(key) == *it.second.subscriberId()) { + numSubsForClient++; + } + } + activeSubscriptions.erase(std::move(key)); + }); + updateSubscriptionCounters(info, false, (numSubsForClient == 1)); } folly::coro::AsyncGenerator&&> @@ -762,7 +782,7 @@ ServiceHandler::co_subscribeOperStatePath( PathValidator::validateStatePath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -800,7 +820,7 @@ ServiceHandler::co_subscribeOperStatsPath( PathValidator::validateStatsPath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -864,7 +884,7 @@ ServiceHandler::co_subscribeOperStateDelta( PathValidator::validateStatePath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -896,7 +916,7 @@ ServiceHandler::co_subscribeOperStatePathExtended( PathValidator::validateExtendedStatePaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -942,7 +962,7 @@ ServiceHandler::co_subscribeOperStateDeltaExtended( PathValidator::validateExtendedStatePaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -978,7 +998,7 @@ ServiceHandler::co_subscribeOperStatsDelta( PathValidator::validateStatsPath(*request->path()->raw()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1009,7 +1029,7 @@ ServiceHandler::co_subscribeOperStatsPathExtended( PathValidator::validateExtendedStatsPaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATH, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1055,7 +1075,7 @@ ServiceHandler::co_subscribeOperStatsDeltaExtended( PathValidator::validateExtendedStatsPaths(*request->paths()); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::DELTA, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1090,7 +1110,7 @@ ServiceHandler::co_subscribeState(std::unique_ptr request) { auto log = LOG_THRIFT_CALL(INFO, getRequestDetails(*request)); validatePaths(*request->paths(), false); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATCH, false); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); @@ -1113,7 +1133,7 @@ ServiceHandler::co_subscribeStats(std::unique_ptr request) { auto log = LOG_THRIFT_CALL(INFO, getRequestDetails(*request)); validatePaths(*request->paths(), true); auto subscriberInfo = makeSubscriberInfo(*request, PubSubType::PATCH, true); - registerSubscription(subscriberInfo); + registerSubscription(subscriberInfo, *request->forceSubscribe()); auto cleanupSubscriber = folly::makeGuard([this, subscriberInfo = std::move(subscriberInfo)]() { unregisterSubscription(subscriberInfo); diff --git a/fboss/fsdb/server/ServiceHandler.h b/fboss/fsdb/server/ServiceHandler.h index 61b4b1c5fbf2d..0bea52f6a8b81 100644 --- a/fboss/fsdb/server/ServiceHandler.h +++ b/fboss/fsdb/server/ServiceHandler.h @@ -204,11 +204,14 @@ class ServiceHandler : public FsdbServiceSvIf, } private: - void registerSubscription(const OperSubscriberInfo& info); + void registerSubscription( + const OperSubscriberInfo& info, + bool forceSubscribe = false); void unregisterSubscription(const OperSubscriberInfo& info); void updateSubscriptionCounters( const OperSubscriberInfo& info, - bool isConnected); + bool isConnected, + bool uniqueSubForClient); void registerPublisher(const OperPublisherInfo& info); void unregisterPublisher( const OperPublisherInfo& info, diff --git a/fboss/fsdb/tests/client/BUCK b/fboss/fsdb/tests/client/BUCK index 9013583bec0c1..1b2c94f599a76 100644 --- a/fboss/fsdb/tests/client/BUCK +++ b/fboss/fsdb/tests/client/BUCK @@ -13,7 +13,6 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/googletest:gtest", - "//fboss/fsdb/client:client", "//fboss/fsdb/client:fsdb_pub_sub", "//fboss/fsdb/client:fsdb_stream_client", "//fboss/fsdb/if:fsdb_model", @@ -36,13 +35,13 @@ cpp_unittest( deps = [ ":fsdb_test_clients", "//fb303:service_data", - "//fboss/fsdb/client:client", "//fboss/fsdb/client:fsdb_pub_sub", "//fboss/fsdb/client:fsdb_stream_client", "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/oper:extended_path_builder", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly/coro:blocking_wait", "//folly/io/async:scoped_event_base_thread", "//folly/logging:log_level", diff --git a/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp b/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp index 1979b2e91388e..8d488ccaf1fa1 100644 --- a/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPubSubManagerTest.cpp @@ -7,6 +7,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -255,54 +256,53 @@ class FsdbPubSubManagerTest : public ::testing::Test { return {std::move(path)}; } - void addStatDeltaSubscription( + std::string addStatDeltaSubscription( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStatDeltaSubscription( + return pubSubManager_->addStatDeltaSubscription( subscriptionPath(), stChangeCb, operDeltaUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } - void addStateDeltaSubscription( + std::string addStateDeltaSubscription( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStateDeltaSubscription( + return pubSubManager_->addStateDeltaSubscription( subscriptionPath(), stChangeCb, operDeltaUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } void addSubscriptions( FsdbDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaUpdate) { addStatDeltaSubscription(operDeltaUpdate, subscrStateChangeCb()); addStateDeltaSubscription(operDeltaUpdate, subscrStateChangeCb()); } - void addStatPathSubscription( + std::string addStatPathSubscription( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStatPathSubscription( + return pubSubManager_->addStatPathSubscription( subscriptionPath(), stChangeCb, operPathUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } - void addStatePathSubscription( + std::string addStatePathSubscription( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, SubscriptionStateChangeCb stChangeCb) { - pubSubManager_->addStatePathSubscription( + return pubSubManager_->addStatePathSubscription( subscriptionPath(), stChangeCb, operPathUpdate, - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); } void addStatePathSubscriptionWithGrHoldTime( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate, SubscriptionStateChangeCb stChangeCb, uint32_t grHoldTimeSec) { auto subscribeStats = false; - ReconnectingThriftClient::ServerOptions serverOpts{ - "::1", fsdbTestServer_->getFsdbPort()}; + utils::ConnectionOptions connOpts{"::1", fsdbTestServer_->getFsdbPort()}; SubscriptionOptions opts{ pubSubManager_->getClientId(), subscribeStats, grHoldTimeSec}; pubSubManager_->addStatePathSubscription( @@ -310,15 +310,14 @@ class FsdbPubSubManagerTest : public ::testing::Test { subscriptionPath(), stChangeCb, operPathUpdate, - std::move(serverOpts)); + std::move(connOpts)); } - void addStateExtDeltaSubscription( + std::string addStateExtDeltaSubscription( FsdbExtDeltaSubscriber::FsdbOperDeltaUpdateCb operDeltaCb, SubscriptionStateChangeCb stChangeCb) { - ReconnectingThriftClient::ServerOptions serverOpts{ - "::1", fsdbTestServer_->getFsdbPort()}; - pubSubManager_->addStateExtDeltaSubscription( - extSubscriptionPaths(), stChangeCb, operDeltaCb, std::move(serverOpts)); + utils::ConnectionOptions connOpts{"::1", fsdbTestServer_->getFsdbPort()}; + return pubSubManager_->addStateExtDeltaSubscription( + extSubscriptionPaths(), stChangeCb, operDeltaCb, std::move(connOpts)); } void addSubscriptions( FsdbStateSubscriber::FsdbOperStateUpdateCb operPathUpdate) { @@ -471,6 +470,88 @@ TYPED_TEST(FsdbPubSubManagerTest, publishMultipleSubscribersPruneSome) { this->assertQueue(states, 4); } +TYPED_TEST(FsdbPubSubManagerTest, subscriberAppError) { + this->createPublishers(); + folly::Synchronized> statDeltas, stateDeltas; + folly::Synchronized> statPaths, statePaths; + std::map, std::string> subKeys; + std::map exceptionThrown; + + exceptionThrown["StatDelta"] = false; + subKeys[std::make_tuple(true, "StatDelta")] = this->addStatDeltaSubscription( + [&exceptionThrown](OperDelta&&) { + if (!exceptionThrown["StatDelta"]) { + exceptionThrown["StatDelta"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(statDeltas)); + exceptionThrown["StateDelta"] = false; + subKeys[std::make_tuple(false, "StateDelta")] = + this->addStateDeltaSubscription( + [&exceptionThrown](OperDelta&&) { + if (!exceptionThrown["StateDelta"]) { + exceptionThrown["StateDelta"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(stateDeltas)); + exceptionThrown["StatPath"] = false; + subKeys[std::make_tuple(true, "StatPath")] = this->addStatPathSubscription( + [&exceptionThrown](OperState&&) { + if (!exceptionThrown["StatPath"]) { + exceptionThrown["StatPath"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(statPaths)); + exceptionThrown["StatePath"] = false; + subKeys[std::make_tuple(false, "StatePath")] = this->addStatePathSubscription( + [&exceptionThrown](OperState&&) { + if (!exceptionThrown["StatePath"]) { + exceptionThrown["StatePath"] = true; + throw std::runtime_error("test app exception"); + } + }, + this->subscrStateChangeCb(statePaths)); + + // check: no dataCbErrors till publish + WITH_RETRIES_N(this->kRetries, { + // In tests, we don't start the publisher threads + fb303::ThreadCachedServiceData::get()->publishStats(); + for (auto [sub, key] : subKeys) { + auto counterPrefix = + this->pubSubManager_->getSubscriberStatsPrefix(std::get<0>(sub), key); + EXPECT_EVENTUALLY_EQ( + fb303::ServiceData::get()->getCounter( + counterPrefix + ".disconnectReason.dataCbError.sum.60"), + 0); + } + }); + + // Publish + this->publish(makePortStats(1)); + this->publish(makeAgentConfig({{"foo", "bar"}})); + + // check: disconnectReason.dataCbError for all subscription types + WITH_RETRIES_N(this->kRetries, { + // In tests, we don't start the publisher threads + fb303::ThreadCachedServiceData::get()->publishStats(); + for (auto [sub, key] : subKeys) { + auto counterPrefix = + this->pubSubManager_->getSubscriberStatsPrefix(std::get<0>(sub), key); + EXPECT_EVENTUALLY_EQ( + fb303::ServiceData::get()->getCounter( + counterPrefix + ".disconnectReason.dataCbError.sum.60"), + 1); + } + }); + + // Reset pubsub manager while local vector objects are in scope, since + // we reference them in state change callbacks + this->pubSubManager_.reset(); +} + template class FsdbPubSubManagerGRTest : public FsdbPubSubManagerTest {}; diff --git a/fboss/fsdb/tests/client/FsdbPubSubTest.cpp b/fboss/fsdb/tests/client/FsdbPubSubTest.cpp index 011b3fd05eefd..d0facbbd5d835 100644 --- a/fboss/fsdb/tests/client/FsdbPubSubTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPubSubTest.cpp @@ -5,6 +5,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include #include @@ -107,8 +108,8 @@ class FsdbPubSubTest : public ::testing::Test { void setupConnection( FsdbStreamClient& pubSub, bool updateServerPort = false) { - pubSub.setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort()), + pubSub.setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()), updateServerPort); WITH_RETRIES_N(kRetries, { ASSERT_EVENTUALLY_TRUE(pubSub.isConnectedToServer()) @@ -388,6 +389,9 @@ TYPED_TEST(FsdbPubSubTest, dupSubscriber) { // @lint-ignore CLANGTIDY std::this_thread::sleep_for(std::chrono::seconds(3)); EXPECT_THROW({ auto res2 = this->subscribe(req); }, FsdbException); + + req.forceSubscribe() = true; + EXPECT_NO_THROW({ auto res2 = this->subscribe(req); }); } TYPED_TEST(FsdbPubSubTest, multiplePublishers) { @@ -656,9 +660,8 @@ TYPED_TEST(FsdbPubSubTest, verifyUnknownPublisherRejected) { FLAGS_checkOperOwnership = true; FLAGS_enforcePublisherConfig = true; auto publisher = this->createPublisher(kUnknownPublisherId); - publisher->setServerOptions( - FsdbStreamClient::ServerOptions( - "::1", this->fsdbTestServer_->getFsdbPort()), + publisher->setConnectionOptions( + utils::ConnectionOptions("::1", this->fsdbTestServer_->getFsdbPort()), false); WITH_RETRIES_N( this->kRetries, ASSERT_FALSE(publisher->isConnectedToServer())); @@ -688,9 +691,8 @@ TYPED_TEST(FsdbUnknownPublisherPathTest, verifyUnknownPublisherPathRejected) { FLAGS_checkOperOwnership = true; FLAGS_enforcePublisherConfig = true; auto publisher = this->createPublisher(kPublisherId); - publisher->setServerOptions( - FsdbStreamClient::ServerOptions( - "::1", this->fsdbTestServer_->getFsdbPort()), + publisher->setConnectionOptions( + utils::ConnectionOptions("::1", this->fsdbTestServer_->getFsdbPort()), false); WITH_RETRIES_N( this->kRetries, ASSERT_FALSE(publisher->isConnectedToServer())); diff --git a/fboss/fsdb/tests/client/FsdbPublisherTest.cpp b/fboss/fsdb/tests/client/FsdbPublisherTest.cpp index 39388542c0dcf..4bbb0b2a31dd2 100644 --- a/fboss/fsdb/tests/client/FsdbPublisherTest.cpp +++ b/fboss/fsdb/tests/client/FsdbPublisherTest.cpp @@ -1,13 +1,14 @@ // (c) Facebook, Inc. and its affiliates. Confidential and proprietary. #include -#include "fboss/fsdb/client/Client.h" #include "fboss/fsdb/client/FsdbDeltaPublisher.h" #include "fboss/fsdb/client/FsdbStatePublisher.h" #include "fboss/fsdb/if/FsdbModel.h" #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" +#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" #include #include @@ -57,8 +58,8 @@ class FsdbPublisherTest : public ::testing::Test { return std::is_same_v; } void setupConnection(bool updateServerPort = false) { - publisher_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort()), + publisher_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()), updateServerPort); WITH_RETRIES_N( kRetries, auto metadata = getPublisherRootMetadata(); @@ -231,12 +232,8 @@ TYPED_TEST(FsdbPublisherTest, getState) { folly::ScopedEventBaseThread streamEvb; std::unique_ptr> client; streamEvb.getEventBase()->runInEventBaseThreadAndWait([&]() { - client = Client::getClient( - folly::SocketAddress( - "::1", this->fsdbTestServer_->getFsdbPort()) /* dstAddr */, - std::nullopt /* srcAddr */, - std::nullopt /* tos */, - false /* plaintextClient */, + client = utils::createFsdbClient( + utils::ConnectionOptions("::1", this->fsdbTestServer_->getFsdbPort()), streamEvb.getEventBase()); }); diff --git a/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp b/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp index 025c44d91cab8..b60fc5e43510d 100644 --- a/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp +++ b/fboss/fsdb/tests/client/FsdbStreamClientTest.cpp @@ -5,6 +5,7 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include @@ -35,8 +36,8 @@ class FsdbStreamClientTest : public ::testing::Test { }; TEST_F(FsdbStreamClientTest, connectAndCancel) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); EXPECT_EQ( *streamClient_->lastStateUpdateSeen(), @@ -49,12 +50,12 @@ TEST_F(FsdbStreamClientTest, connectAndCancel) { } TEST_F(FsdbStreamClientTest, multipleStreamClientsOnSameEvb) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); auto streamClient2 = std::make_unique( streamEvbThread_->getEventBase(), connRetryEvbThread_->getEventBase()); - streamClient2->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient2->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient2->isConnectedToServer())); EXPECT_EQ( @@ -76,8 +77,8 @@ TEST_F(FsdbStreamClientTest, multipleStreamClientsOnSameEvb) { } TEST_F(FsdbStreamClientTest, reconnect) { - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort())); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort())); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); EXPECT_EQ( *streamClient_->lastStateUpdateSeen(), @@ -92,9 +93,8 @@ TEST_F(FsdbStreamClientTest, reconnect) { fsdbTestServer_ = std::make_unique(); // Need to update server address since we are binding to ephemeral port // which will change on server recreate - streamClient_->setServerOptions( - FsdbStreamClient::ServerOptions("::1", fsdbTestServer_->getFsdbPort()), - true); + streamClient_->setConnectionOptions( + utils::ConnectionOptions("::1", fsdbTestServer_->getFsdbPort()), true); WITH_RETRIES(ASSERT_EVENTUALLY_TRUE(streamClient_->isConnectedToServer())); EXPECT_EQ( *streamClient_->lastStateUpdateSeen(), diff --git a/fboss/fsdb/tests/client/FsdbTestClients.cpp b/fboss/fsdb/tests/client/FsdbTestClients.cpp index 89b5f497d1e1d..1eacd35eb21ad 100644 --- a/fboss/fsdb/tests/client/FsdbTestClients.cpp +++ b/fboss/fsdb/tests/client/FsdbTestClients.cpp @@ -2,7 +2,6 @@ #include "fboss/fsdb/tests/client/FsdbTestClients.h" #include -#include "fboss/fsdb/client/Client.h" #include "fboss/fsdb/if/FsdbModel.h" #include diff --git a/fboss/fsdb/tests/server/BUCK b/fboss/fsdb/tests/server/BUCK index d8102124dfa95..3671158833089 100644 --- a/fboss/fsdb/tests/server/BUCK +++ b/fboss/fsdb/tests/server/BUCK @@ -8,8 +8,8 @@ cpp_unittest( "ServiceHandlerTest.cpp", ], deps = [ - "//fboss/fsdb/client:client", "//fboss/fsdb/tests/utils:fsdb_test_server", "//fboss/lib:common_utils", + "//fboss/lib/thrift_service_client:thrift-service-client", ], ) diff --git a/fboss/fsdb/tests/server/ServiceHandlerTest.cpp b/fboss/fsdb/tests/server/ServiceHandlerTest.cpp index cb1fe2e767819..a4dbbd24e7fac 100644 --- a/fboss/fsdb/tests/server/ServiceHandlerTest.cpp +++ b/fboss/fsdb/tests/server/ServiceHandlerTest.cpp @@ -3,9 +3,9 @@ #include #include -#include "fboss/fsdb/client/Client.h" #include "fboss/fsdb/tests/utils/FsdbTestServer.h" #include "fboss/lib/CommonUtils.h" +#include "fboss/lib/thrift_service_client/ThriftServiceClient.h" namespace facebook::fboss::fsdb::test { @@ -21,12 +21,8 @@ class ServiceHandlerTest : public ::testing::Test { std::unique_ptr> createClient( folly::EventBase* evb) { - return Client::getClient( - folly::SocketAddress("::1", getFsdbPort()), - std::nullopt, - std::nullopt, - false /* plaintextClient */, - evb); + return utils::createFsdbClient( + utils::ConnectionOptions("::1", getFsdbPort()), evb); } uint16_t getFsdbPort() const { @@ -42,6 +38,19 @@ class ServiceHandlerTest : public ::testing::Test { return req; } + SubRequest createPatchRequest( + const std::string& subId, + bool forceSubscribe = false) { + SubRequest req; + RawOperPath p; + p.path() = {"agent"}; + req.paths() = {{0, p}}; + req.clientId()->client() = FsdbClient::AGENT; + req.clientId()->instanceId() = subId; + req.forceSubscribe() = forceSubscribe; + return req; + } + std::unique_ptr fsdb_; }; @@ -109,4 +118,18 @@ TEST_F(ServiceHandlerTest, testSubscriberInfo) { }); } +TEST_F(ServiceHandlerTest, subscribeDup) { + folly::EventBase evb; + auto client = createClient(&evb); + auto sub1 = client->sync_subscribeState(createPatchRequest("test-sub-1")); + EXPECT_THROW( + client->sync_subscribeState(createPatchRequest("test-sub-1")), + fsdb::FsdbException); + + auto sub2 = + client->sync_subscribeState(createPatchRequest("test-sub-2", true)); + EXPECT_NO_THROW( + client->sync_subscribeState(createPatchRequest("test-sub-2", true))); +} + } // namespace facebook::fboss::fsdb::test diff --git a/fboss/led_service/FsdbSwitchStateSubscriber.cpp b/fboss/led_service/FsdbSwitchStateSubscriber.cpp index e2c11e3a06466..b9dedaa116883 100644 --- a/fboss/led_service/FsdbSwitchStateSubscriber.cpp +++ b/fboss/led_service/FsdbSwitchStateSubscriber.cpp @@ -52,11 +52,18 @@ void FsdbSwitchStateSubscriber::subscribeToState( // used by LED manager thread later auto newSwitchStateData = apache::thrift::BinarySerializer::deserialize< fboss::state::SwitchState>(*contents); + auto& swSettings = newSwitchStateData.switchSettingsMap().value(); auto swPortMaps = newSwitchStateData.portMaps().value(); std::map ledSwitchStateUpdate; for (auto& [switchStr, oneSwPortMap] : swPortMaps) { + bool switchDrained = false; + if (swSettings.find(switchStr) != swSettings.end()) { + switchDrained = + swSettings[switchStr].actualSwitchDrainState().value() == + cfg::SwitchDrainState::DRAINED; + } for (auto& [onePortId, onePortInfo] : oneSwPortMap) { ledSwitchStateUpdate[onePortId].swPortId = onePortId; ledSwitchStateUpdate[onePortId].portName = @@ -72,8 +79,15 @@ void FsdbSwitchStateSubscriber::subscribeToState( if (auto activeState = onePortInfo.portActiveState()) { ledSwitchStateUpdate[onePortId].activeState = *activeState; } + // We consider the port drained if either the individual port is + // drained or the entire switch is drained. This status is used to set + // blink pattern on the LEDs. We blink the LED when + // 1) port is inactive (other side, either port or the entire switch, + // is drained) 2) local port state is drained (local port is drained) + // 3) local switch state is drained (local switch is drained) ledSwitchStateUpdate[onePortId].drained = - onePortInfo.get_drainState() == cfg::PortDrainState::DRAINED; + onePortInfo.get_drainState() == cfg::PortDrainState::DRAINED || + switchDrained; } } diff --git a/fboss/led_service/LedManagerInit.cpp b/fboss/led_service/LedManagerInit.cpp index 1c4edc411a2da..aa0abde7b7baa 100644 --- a/fboss/led_service/LedManagerInit.cpp +++ b/fboss/led_service/LedManagerInit.cpp @@ -44,7 +44,9 @@ std::unique_ptr createLedManager() { mode == PlatformType::PLATFORM_MERU800BFA || mode == PlatformType::PLATFORM_MERU800BFA_P1) { return std::make_unique(); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { return std::make_unique(); } else if (mode == PlatformType::PLATFORM_MORGAN800CC) { return std::make_unique(); diff --git a/fboss/led_service/hw_test/LedServiceTest.cpp b/fboss/led_service/hw_test/LedServiceTest.cpp index c7c2d6753b4d9..a9769bd4bb1cb 100644 --- a/fboss/led_service/hw_test/LedServiceTest.cpp +++ b/fboss/led_service/hw_test/LedServiceTest.cpp @@ -131,17 +131,21 @@ TEST_F(LedServiceTest, checkForceLed) { } } -void LedServiceTest::checkLedColor(PortID port, enum led::LedColor color) { +void LedServiceTest::checkLedColor( + PortID port, + enum led::LedColor color, + int testNum) { auto portName = platformMap_->getPortNameByPortId(port); CHECK(portName.has_value()); auto currentColor = ledManager_->getCurrentLedColor(port); auto ledState = ledManager_->getPortLedState(portName.value()); EXPECT_EQ(currentColor, color) << "LED color should be " << enumToName(color) - << " for port " << portName.value(); + << " for port " << portName.value() << " but current color is " + << enumToName(currentColor) << " for test " << testNum; EXPECT_EQ(ledState.currentLedState()->ledColor().value(), color) << "LED state should be " << enumToName(color) - << " for port " << portName.value(); + << " for port " << portName.value() << " for test " << testNum; // If the flags is specified, add a delay to enable seeing the LED change sleep(FLAGS_visual_delay_sec); } @@ -151,11 +155,15 @@ TEST_F(LedServiceTest, checkLedColorChange) { std::sort(transceivers.begin(), transceivers.end()); for (auto tcvr : transceivers) { + XLOG(INFO) << "Testing transceiver " << tcvr; auto swPorts = platformMap_->getSwPortListFromTransceiverId(tcvr); for (auto& swPort : swPorts) { // Do the first update from FSDB to LedService. LED set to inactive. auto maxSpeed = platformMap_->getPortMaxSpeed(swPort); auto profile = platformMap_->getProfileIDBySpeed(swPort, maxSpeed); + XLOG(INFO) << "Testing SW Port " << swPort << " with speed " + << enumToName(maxSpeed) << " and profile " + << enumToName(profile); LedManager::LedSwitchStateUpdate ledUpdate = { static_cast(swPort), "", @@ -170,52 +178,52 @@ TEST_F(LedServiceTest, checkLedColorChange) { auto swPortName = platformMap_->getPortNameByPortId(swPort); CHECK(swPortName.has_value()); + int testNum = 0; // 1- Verify Default creation with operational state = false that the // LED color is off. - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); // 2- Set the operational state to true, verify that the LED color // is not off anymore. Platform determines its own on color. updateMap[swPort].operState = true; ledManager_->updateLedStatus(updateMap); auto colorBefore = ledManager_->getCurrentLedColor(swPort); - auto ledState = ledManager_->getPortLedState(swPortName.value()); EXPECT_NE(colorBefore, led::LedColor::OFF); - EXPECT_EQ(ledState.currentLedState()->ledColor().value(), colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // If the flags is specified, add a delay before forcing LED off - // to enable seeing the LED change + // to enable visual test for the LED change sleep(FLAGS_visual_delay_sec); // 3- Force LED to be off. The LED color should be off. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_OFF); - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); // 4- Unforce LED Off. LED should go back to the previous color. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 5- Force LED to be on. The LED color should not be off. // Each platform determines its own on color. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_ON); auto onLedColorExpected = ledManager_->forcedOnColor(); - checkLedColor(swPort, onLedColorExpected); + checkLedColor(swPort, onLedColorExpected, ++testNum); // 6- Unforce LED On. LED should go back to the previous color. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 7- Set the cabling error, expect yellow LED. updateMap[swPort].ledExternalState = PortLedExternalState::CABLING_ERROR; ledManager_->updateLedStatus(updateMap); - checkLedColor(swPort, led::LedColor::YELLOW); + checkLedColor(swPort, led::LedColor::YELLOW, ++testNum); // 8- Remove the cabling error, check the LED color goes back updateMap[swPort].ledExternalState = PortLedExternalState::NONE; ledManager_->updateLedStatus(updateMap); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 9- Set the cabling error, force LED ON, check the LED color is on, and // not yellow. @@ -223,30 +231,39 @@ TEST_F(LedServiceTest, checkLedColorChange) { ledManager_->updateLedStatus(updateMap); ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_ON); - checkLedColor(swPort, onLedColorExpected); + checkLedColor(swPort, onLedColorExpected, ++testNum); // 10 - Remove force on, LED should go back to cabling error. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, led::LedColor::YELLOW); + checkLedColor(swPort, led::LedColor::YELLOW, ++testNum); // 11- Force LED Off. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_OFF); - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); // 12 - Remove force off, LED should go back to cabling error. ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); - checkLedColor(swPort, led::LedColor::YELLOW); + checkLedColor(swPort, led::LedColor::YELLOW, ++testNum); // 13 - Remove Cabling Error, LED should go back to original color. updateMap[swPort].ledExternalState = PortLedExternalState::NONE; ledManager_->updateLedStatus(updateMap); - checkLedColor(swPort, colorBefore); + checkLedColor(swPort, colorBefore, ++testNum); // 14 - Force LED Off. ledManager_->setExternalLedState( swPort, PortLedExternalState::EXTERNAL_FORCE_OFF); - checkLedColor(swPort, led::LedColor::OFF); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); + + // 15 - Remove Force Off. LED should be in original color. + ledManager_->setExternalLedState(swPort, PortLedExternalState::NONE); + checkLedColor(swPort, colorBefore, ++testNum); + + // 16 - set Operational state off. Expect LED to be off. + updateMap[swPort].operState = false; + ledManager_->updateLedStatus(updateMap); + checkLedColor(swPort, led::LedColor::OFF, ++testNum); } } } diff --git a/fboss/led_service/hw_test/LedServiceTest.h b/fboss/led_service/hw_test/LedServiceTest.h index 1c1ca130c0a72..3c6fcd1a2803d 100644 --- a/fboss/led_service/hw_test/LedServiceTest.h +++ b/fboss/led_service/hw_test/LedServiceTest.h @@ -32,7 +32,7 @@ class LedServiceTest : public ::testing::Test { void SetUp() override; void TearDown() override; // Check the LED color. - void checkLedColor(PortID port, led::LedColor color); + void checkLedColor(PortID port, led::LedColor color, int testNum); facebook::fboss::LedManager* ledManager_ = nullptr; const facebook::fboss::PlatformMapping* platformMap_ = nullptr; diff --git a/fboss/lib/BUCK b/fboss/lib/BUCK index 289caeea95c78..937e1271fc336 100644 --- a/fboss/lib/BUCK +++ b/fboss/lib/BUCK @@ -254,6 +254,7 @@ cpp_library( ], exported_deps = [ "//fb303:thread_cached_service_data", + "//fboss/lib/thrift_service_client:thrift-service-client", "//folly:network_address", "//folly/coro:async_scope", "//folly/coro:blocking_wait", diff --git a/fboss/lib/CommonThriftUtils.cpp b/fboss/lib/CommonThriftUtils.cpp index 0f568d3978250..38ae54faae228 100644 --- a/fboss/lib/CommonThriftUtils.cpp +++ b/fboss/lib/CommonThriftUtils.cpp @@ -13,6 +13,7 @@ #include #include #include +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" namespace facebook::fboss { @@ -91,14 +92,14 @@ void ReconnectingThriftClient::setState(State state) { stateChangeCb_(oldState, state); } -void ReconnectingThriftClient::setServerOptions( - ServerOptions&& options, +void ReconnectingThriftClient::setConnectionOptions( + utils::ConnectionOptions options, bool allowReset) { - if (!allowReset && *serverOptions_.rlock()) { + if (!allowReset && *connectionOptions_.rlock()) { throw std::runtime_error("Cannot reset server address"); } - connectionLogStr_ = fmt::format("{}->{}", clientId(), options.deviceName); - *serverOptions_.wlock() = std::move(options); + connectionLogStr_ = fmt::format("{}->{}", clientId(), options.getHostname()); + *connectionOptions_.wlock() = std::move(options); } void ReconnectingThriftClient::cancel() { @@ -109,7 +110,7 @@ void ReconnectingThriftClient::cancel() { STREAM_XLOG(WARNING) << "Already cancelled"; return; } - serverOptions_.wlock()->reset(); + connectionOptions_.wlock()->reset(); connRetryEvb_->runImmediatelyOrRunInEventBaseThreadAndWait( [this] { timer_->cancelTimeout(); }); setState(State::CANCELLED); @@ -119,7 +120,7 @@ void ReconnectingThriftClient::cancel() { } void ReconnectingThriftClient::timeoutExpired() noexcept { - auto serverOptions = *serverOptions_.rlock(); + auto serverOptions = *connectionOptions_.rlock(); if (getState() == State::DISCONNECTED && serverOptions) { connectToServer(*serverOptions); } diff --git a/fboss/lib/CommonThriftUtils.h b/fboss/lib/CommonThriftUtils.h index fb50a5abdfa1a..a36046f618a44 100644 --- a/fboss/lib/CommonThriftUtils.h +++ b/fboss/lib/CommonThriftUtils.h @@ -9,6 +9,8 @@ */ #pragma once +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" + #include #include #include @@ -49,43 +51,6 @@ class ReconnectingThriftClient { using StreamStateChangeCb = std::function; - enum class Priority : uint8_t { NORMAL, CRITICAL }; - - struct ServerOptions { - ServerOptions( - const std::string& dstIp, - uint16_t dstPort, - const std::optional& deviceName = std::nullopt) - : dstAddr(folly::SocketAddress(dstIp, dstPort)), - deviceName(deviceName.value_or(dstAddr.getAddressStr())) {} - - ServerOptions( - const std::string& dstIp, - uint16_t dstPort, - const std::string& srcIp, - const std::optional& deviceName = std::nullopt) - : dstAddr(folly::SocketAddress(dstIp, dstPort)), - srcAddr(folly::SocketAddress(srcIp, 0)), - deviceName(deviceName.value_or(dstAddr.getAddressStr())) {} - - ServerOptions( - const std::string& dstIp, - uint16_t dstPort, - const std::string& srcIp, - Priority priority, - const std::optional& deviceName = std::nullopt) - : dstAddr(folly::SocketAddress(dstIp, dstPort)), - srcAddr(folly::SocketAddress(srcIp, 0)), - priority{priority}, - deviceName(deviceName.value_or(dstAddr.getAddressStr())) {} - - folly::SocketAddress dstAddr; - std::string fsdbPort; - std::optional srcAddr; - std::optional priority; - std::string deviceName; - }; - ReconnectingThriftClient( const std::string& clientId, folly::EventBase* streamEvb, @@ -109,14 +74,14 @@ class ReconnectingThriftClient { return clientId_; } - void setServerOptions( - ServerOptions&& options, + void setConnectionOptions( + utils::ConnectionOptions options, bool allowReset = false /* allow reset for use in tests*/); std::string getServer() const { - if (auto serverOptions = serverOptions_.rlock(); - serverOptions->has_value()) { - return (*serverOptions)->dstAddr.getAddressStr(); + if (auto connectionOptions = connectionOptions_.rlock(); + connectionOptions->has_value()) { + return (*connectionOptions)->getDstAddr().getAddressStr(); } return ""; } @@ -133,7 +98,7 @@ class ReconnectingThriftClient { std::string getConnectedCounterName() { return counterPrefix_ + ".connected"; } - virtual void connectToServer(const ServerOptions& options) = 0; + virtual void connectToServer(const utils::ConnectionOptions& options) = 0; void setGracefulServiceLoopCompletion(const std::function& cb) { auto requested = gracefulServiceLoopCompletionCb_.wlock(); @@ -165,7 +130,8 @@ class ReconnectingThriftClient { fb303::TimeseriesWrapper disconnectEvents_; fb303::TimeseriesWrapper aggDisconnectEvents_; StreamStateChangeCb stateChangeCb_; - folly::Synchronized> serverOptions_; + folly::Synchronized> + connectionOptions_; std::unique_ptr timer_; uint32_t reconnectTimeout_; std::string connectionLogStr_; diff --git a/fboss/lib/TimeSeriesWithMinMax-inl.h b/fboss/lib/TimeSeriesWithMinMax-inl.h index b63e6e8aee43a..e01a98f15c21b 100644 --- a/fboss/lib/TimeSeriesWithMinMax-inl.h +++ b/fboss/lib/TimeSeriesWithMinMax-inl.h @@ -90,9 +90,9 @@ void TimeSeriesWithMinMax::addValue( } else if (i + 1 < locked_buf->size()) { if (t < locked_buf->at(i + 1).getInstantiatedTime() && t > b->getInstantiatedTime()) { - Bucket b(t, bucketInterval_); - b.addValue(value); - locked_buf->insert(locked_buf->begin() + i, std::move(b)); + Bucket b_2(t, bucketInterval_); + b_2.addValue(value); + locked_buf->insert(locked_buf->begin() + i, std::move(b_2)); return; } } diff --git a/fboss/lib/bsp/bspmapping/Main.cpp b/fboss/lib/bsp/bspmapping/Main.cpp index 6d9f8a2d4726e..a8b8731097a2c 100644 --- a/fboss/lib/bsp/bspmapping/Main.cpp +++ b/fboss/lib/bsp/bspmapping/Main.cpp @@ -27,6 +27,8 @@ const std::map kHardwareNameMap = { kPortMappingMeru400biuCsv}, {facebook::fboss::PlatformType::PLATFORM_MERU800BIA, kPortMappingMeru800biaCsv}, + {facebook::fboss::PlatformType::PLATFORM_MERU800BIAB, + kPortMappingMeru800biaCsv}, {facebook::fboss::PlatformType::PLATFORM_MERU800BFA, kPortMappingMeru800bfaCsv}, {facebook::fboss::PlatformType::PLATFORM_JANGA800BIC, diff --git a/fboss/lib/bsp/bspmapping/test/ParserTest.cpp b/fboss/lib/bsp/bspmapping/test/ParserTest.cpp index d021a2bef077e..aa38694421dad 100644 --- a/fboss/lib/bsp/bspmapping/test/ParserTest.cpp +++ b/fboss/lib/bsp/bspmapping/test/ParserTest.cpp @@ -24,6 +24,10 @@ TEST(ParserTest, GetNameForTests) { facebook::fboss::Parser::getNameFor( facebook::fboss::PlatformType::PLATFORM_MERU800BIA), "meru800bia"); + EXPECT_EQ( + facebook::fboss::Parser::getNameFor( + facebook::fboss::PlatformType::PLATFORM_MERU800BIAB), + "meru800biab"); EXPECT_EQ( facebook::fboss::Parser::getNameFor( facebook::fboss::PlatformType::PLATFORM_MERU800BFA), diff --git a/fboss/lib/i2c/BUCK b/fboss/lib/i2c/BUCK index 27d95f964c958..47ef7233224c2 100644 --- a/fboss/lib/i2c/BUCK +++ b/fboss/lib/i2c/BUCK @@ -45,6 +45,7 @@ cpp_library( "//fboss/agent:utils", "//folly:format", "//folly:range", + "//folly:synchronized", "//folly/io/async:async_base", "//folly/lang:bits", "//folly/logging:logging", diff --git a/fboss/lib/i2c/I2cController.h b/fboss/lib/i2c/I2cController.h index fcf72d3b9a86d..4dc0bdc834c2b 100644 --- a/fboss/lib/i2c/I2cController.h +++ b/fboss/lib/i2c/I2cController.h @@ -9,6 +9,7 @@ */ #pragma once +#include #include #include "fboss/lib/i2c/gen-cpp2/i2c_controller_stats_types.h" @@ -18,50 +19,51 @@ namespace facebook::fboss { */ class I2cController { public: - I2cController(std::string name) { - *i2cControllerPlatformStats_.controllerName_() = name; + explicit I2cController(std::string name) { + *i2cControllerPlatformStats_.wlock()->controllerName_() = name; } virtual ~I2cController() {} // Reset all i2c stats void resetStats() { - *i2cControllerPlatformStats_.readTotal_() = 0; - *i2cControllerPlatformStats_.readFailed_() = 0; - *i2cControllerPlatformStats_.readBytes_() = 0; - *i2cControllerPlatformStats_.writeTotal_() = 0; - *i2cControllerPlatformStats_.writeFailed_() = 0; - *i2cControllerPlatformStats_.writeBytes_() = 0; + auto stats = i2cControllerPlatformStats_.wlock(); + *stats->readTotal_() = 0; + *stats->readFailed_() = 0; + *stats->readBytes_() = 0; + *stats->writeTotal_() = 0; + *stats->writeFailed_() = 0; + *stats->writeBytes_() = 0; } // Total number of reads void incrReadTotal(uint32_t count = 1) { - *i2cControllerPlatformStats_.readTotal_() += count; + *i2cControllerPlatformStats_.wlock()->readTotal_() += count; } // Total Read failures void incrReadFailed(uint32_t count = 1) { - *i2cControllerPlatformStats_.readFailed_() += count; + *i2cControllerPlatformStats_.wlock()->readFailed_() += count; } // Number of bytes read void incrReadBytes(uint32_t count = 1) { - *i2cControllerPlatformStats_.readBytes_() += count; + *i2cControllerPlatformStats_.wlock()->readBytes_() += count; } // Total number of writes void incrWriteTotal(uint32_t count = 1) { - *i2cControllerPlatformStats_.writeTotal_() += count; + *i2cControllerPlatformStats_.wlock()->writeTotal_() += count; } // Total write failures void incrWriteFailed(uint32_t count = 1) { - *i2cControllerPlatformStats_.writeFailed_() += count; + *i2cControllerPlatformStats_.wlock()->writeFailed_() += count; } // Number of bytes written void incrWriteBytes(uint32_t count = 1) { - *i2cControllerPlatformStats_.writeBytes_() += count; + *i2cControllerPlatformStats_.wlock()->writeBytes_() += count; } /* Get the I2c transaction stats from the i2c controller */ const I2cControllerStats getI2cControllerPlatformStats() const { // return the structre reference of latest i2c transaction stats - return i2cControllerPlatformStats_; + return *i2cControllerPlatformStats_.rlock(); } virtual void i2cTimeProfilingStart() {} @@ -72,7 +74,7 @@ class I2cController { private: // Platform i2c controller stats - I2cControllerStats i2cControllerPlatformStats_; + folly::Synchronized i2cControllerPlatformStats_; }; } // namespace facebook::fboss diff --git a/fboss/lib/if/fboss_common.thrift b/fboss/lib/if/fboss_common.thrift index a42ab5dddad91..b26fb48dd46dd 100644 --- a/fboss/lib/if/fboss_common.thrift +++ b/fboss/lib/if/fboss_common.thrift @@ -40,4 +40,6 @@ enum PlatformType { PLATFORM_JANGA800BIC = 32, PLATFORM_TAHAN800BC = 33, PLATFORM_MERU800BFA_P1 = 34, + PLATFORM_MERU800BIAB = 35, + PLATFORM_YANGRA = 36, } diff --git a/fboss/lib/led/BUCK b/fboss/lib/led/BUCK index 72815d22b3fe4..4c0fec08bab70 100644 --- a/fboss/lib/led/BUCK +++ b/fboss/lib/led/BUCK @@ -26,7 +26,6 @@ cpp_library( ], exported_deps = [ ":led_mapping-cpp2-types", - "//fboss/agent:fboss-error", "//fboss/led_service:led_utils", "//fboss/led_service/if:led_structs-cpp2-types", "//folly:format", diff --git a/fboss/lib/led/LedIO.cpp b/fboss/lib/led/LedIO.cpp index aa0fda9f6f558..6aae0551277c6 100644 --- a/fboss/lib/led/LedIO.cpp +++ b/fboss/lib/led/LedIO.cpp @@ -12,40 +12,46 @@ #include #include #include -#include "fboss/agent/FbossError.h" #include "fboss/led_service/LedUtils.h" #include "fboss/lib/led/gen-cpp2/led_mapping_types.h" -namespace { -constexpr auto kLedOn = "1"; -constexpr auto kLedOff = "0"; -constexpr auto kLedBrightnessPath = "/brightness"; -constexpr auto kLedTriggerPath = "/trigger"; -constexpr auto kLedDelayOnPath = "/delay_on"; -constexpr auto kLedDelayOffPath = "/delay_off"; -constexpr auto kLedTimerTrigger = "timer"; -constexpr auto kLedBlinkOff = "0"; -constexpr auto kLedBlinkSlow = "1000"; -constexpr auto kLedBlinkFast = "500"; -} // namespace - namespace facebook::fboss { -LedIO::LedIO(LedMapping ledMapping) { - id_ = *ledMapping.id(); - if (auto blue = ledMapping.bluePath()) { - bluePath_ = *blue; - } - if (auto yellow = ledMapping.yellowPath()) { - yellowPath_ = *yellow; - } - if (!bluePath_.has_value() && !yellowPath_.has_value()) { +LedIO::LedIO(LedMapping ledMapping) : id_(*ledMapping.id()) { + if (!ledMapping.bluePath().has_value() || + !ledMapping.yellowPath().has_value()) { throw LedIOError( fmt::format("No color path set for ID {:d} (0 base)", id_)); } + bluePath_ = ledMapping.bluePath().value(); + yellowPath_ = ledMapping.yellowPath().value(); + initMaxBrightness(bluePath_, blueMaxBrightness_); + initMaxBrightness(yellowPath_, yellowMaxBrightness_); init(); } +void LedIO::initMaxBrightness( + const std::string& path, + std::string& maxBrightness) { + std::fstream fs; + auto maxBrightnessPath = path + kLedMaxBrightnessPath; + fs.open(maxBrightnessPath, std::fstream::in); + if (fs.is_open()) { + fs >> maxBrightness; + fs.close(); + } else { + throw LedIOError(fmt::format( + "initMaxBrightness() failed to open {} for ID {:d} (0 base)", + maxBrightnessPath, + id_)); + } + auto value = folly::to(maxBrightness); + CHECK((value >= kMinBrightness) && (value <= kMaxBrightness)) << fmt::format( + "Value of brightness is not in range {} {}", + kMinBrightness, + kMaxBrightness); +} + void LedIO::setLedState(led::LedState ledState) { if (currState_ == ledState) { return; @@ -78,20 +84,14 @@ led::LedState LedIO::getLedState() const { void LedIO::init() { led::LedState ledState = utility::constructLedState(led::LedColor::OFF, led::Blink::OFF); - currState_ = ledState; - if (bluePath_.has_value()) { - blueOff(); - } - if (yellowPath_.has_value()) { - yellowOff(); - } + blueOff(); + yellowOff(); } void LedIO::blueOn(led::Blink blink) { - CHECK(bluePath_.has_value()); - setBlink(*bluePath_, blink); - setLed(*bluePath_, kLedOn); + setBlink(bluePath_, blink); + setLed(bluePath_, blueMaxBrightness_); XLOG(INFO) << fmt::format( "Trace: set LED {:d} (0 base) to Blue and blink {:s}", id_, @@ -99,15 +99,13 @@ void LedIO::blueOn(led::Blink blink) { } void LedIO::blueOff() { - CHECK(bluePath_.has_value()); - setBlink(*bluePath_, led::Blink::OFF); - setLed(*bluePath_, kLedOff); + setBlink(bluePath_, led::Blink::OFF); + setLed(bluePath_, kLedOff); } void LedIO::yellowOn(led::Blink blink) { - CHECK(yellowPath_.has_value()); - setBlink(*yellowPath_, blink); - setLed(*yellowPath_, kLedOn); + setBlink(yellowPath_, blink); + setLed(yellowPath_, yellowMaxBrightness_); XLOG(INFO) << fmt::format( "Trace: set LED {:d} (0 base) to Yellow and blink {:s}", id_, @@ -115,9 +113,8 @@ void LedIO::yellowOn(led::Blink blink) { } void LedIO::yellowOff() { - CHECK(yellowPath_.has_value()); - setBlink(*yellowPath_, led::Blink::OFF); - setLed(*yellowPath_, kLedOff); + setBlink(yellowPath_, led::Blink::OFF); + setLed(yellowPath_, kLedOff); } void LedIO::setLed(const std::string& ledBasePath, const std::string& ledOp) { diff --git a/fboss/lib/led/LedIO.h b/fboss/lib/led/LedIO.h index d2e7e2a585d31..76bbe5a50833c 100644 --- a/fboss/lib/led/LedIO.h +++ b/fboss/lib/led/LedIO.h @@ -15,6 +15,19 @@ namespace facebook::fboss { +constexpr auto kLedOff = "0"; +constexpr auto kLedMaxBrightnessPath = "/max_brightness"; +constexpr auto kLedBrightnessPath = "/brightness"; +constexpr auto kLedTriggerPath = "/trigger"; +constexpr auto kLedDelayOnPath = "/delay_on"; +constexpr auto kLedDelayOffPath = "/delay_off"; +constexpr auto kLedTimerTrigger = "timer"; +constexpr auto kLedBlinkOff = "0"; +constexpr auto kLedBlinkSlow = "1000"; +constexpr auto kLedBlinkFast = "500"; +constexpr auto kMinBrightness = 1; +constexpr auto kMaxBrightness = 255; + class LedIOError : public std::runtime_error { public: explicit LedIOError(const std::string& what) : runtime_error(what) {} @@ -46,10 +59,16 @@ class LedIO { void setLed(const std::string& ledPath, const std::string& ledOp); void setBlink(const std::string& ledPath, led::Blink blink); + // Max brightness for the LED is determined by /max_brightness + // per LED. + void initMaxBrightness(const std::string& path, std::string& maxBrightness); + led::LedState currState_; - uint32_t id_; - std::optional bluePath_; - std::optional yellowPath_; + const uint32_t id_; + std::string bluePath_; + std::string blueMaxBrightness_; + std::string yellowPath_; + std::string yellowMaxBrightness_; }; } // namespace facebook::fboss diff --git a/fboss/lib/led/tests/LedTests.cpp b/fboss/lib/led/tests/LedTests.cpp index 1727ac2737f15..91930f6f4f15b 100644 --- a/fboss/lib/led/tests/LedTests.cpp +++ b/fboss/lib/led/tests/LedTests.cpp @@ -11,77 +11,30 @@ namespace facebook::fboss { class LedTests : public ::testing::Test { - public: - void testInvalidLedPath() { - LedMapping ledMapping; - ledMapping.id() = 0; - EXPECT_THROW( - std::unique_ptr led = std::make_unique(ledMapping), - LedIOError); - } - - void testFakeLed() { + protected: + void SetUp() override { mkdir(blueBasePath_.c_str(), 0777); blueFd_ = open(bluePath_.c_str(), O_RDWR | O_CREAT, 0777); - EXPECT_GE(blueFd_, 0); + CHECK(blueFd_); mkdir(yellowBasePath_.c_str(), 0777); yellowFd_ = open(yellowPath_.c_str(), O_RDWR | O_CREAT, 0777); - EXPECT_GE(yellowFd_, 0); - - LedMapping ledMapping; - ledMapping.id() = 0; - ledMapping.bluePath() = blueBasePath_; - ledMapping.yellowPath() = yellowBasePath_; - // Instantiating Led object will write 0 to both blue and yellow LED - // files and set current color to Off - led_ = std::make_unique(ledMapping); - - VerifyLedOff(); - - // Since current color is Off, setting it to Off again will be noop - led_->setLedState( - utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); - VerifyLedOff(); - - // Change current color from Off to Blue - led_->setLedState( - utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); - VerifyBlueOn(); - - // Since current color is Blue, setting it to Blue again will be noop - led_->setLedState( - utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); - VerifyBlueOn(); - - // Change current color from Blue to Off - led_->setLedState( - utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); - VerifyLedOff(); - - // Change current color from Off to Yellow - led_->setLedState( - utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); - VerifyYellowOn(); - - // Since current color is Yellow, setting it to Yellow again will be noop - led_->setLedState( - utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); - VerifyYellowOn(); - - close(blueFd_); - close(yellowFd_); - } + CHECK(yellowFd_); - protected: - void SetUp() override { - // Write 1 to both blue and yellow LED files initially const std::string content = "1"; + folly::writeFile(content, blueMaxBrightness_.c_str()); + folly::writeFile(content, yellowMaxBrightness_.c_str()); + // We turn the LEDs on. Expect that during initialization (after + // LedIO constructor is called) that the LEDs are turned off. folly::writeFile(content, bluePath_.c_str()); folly::writeFile(content, yellowPath_.c_str()); } - private: + void TearDown() override { + close(blueFd_); + close(yellowFd_); + } + char ReadLedFile(int fd) { constexpr auto len = 1; char readBuf; @@ -101,22 +54,52 @@ class LedTests : public ::testing::Test { EXPECT_EQ('0', ReadLedFile(blueFd_)); EXPECT_EQ('0', ReadLedFile(yellowFd_)); EXPECT_EQ(led::LedColor::OFF, led_->getLedState().get_ledColor()); + VerifyYellowBlink("0"); + VerifyBlueBlink("0"); } // Verify that the blue file contains a single 1, the yellow file // contains a single 0, and the current color is Blue - void VerifyBlueOn() { + void VerifyBlueOn(const std::string& blink) { EXPECT_EQ('1', ReadLedFile(blueFd_)); EXPECT_EQ('0', ReadLedFile(yellowFd_)); EXPECT_EQ(led::LedColor::BLUE, led_->getLedState().get_ledColor()); + VerifyYellowBlink("0"); + VerifyBlueBlink(blink); } // Verify that the yellow file contains a single 1, the blue file // contains a single 0, and the current color is Yellow - void VerifyYellowOn() { + void VerifyYellowOn(const std::string& blink) { EXPECT_EQ('0', ReadLedFile(blueFd_)); EXPECT_EQ('1', ReadLedFile(yellowFd_)); EXPECT_EQ(led::LedColor::YELLOW, led_->getLedState().get_ledColor()); + VerifyYellowBlink(blink); + VerifyBlueBlink("0"); + } + + void VerifyYellowBlink(const std::string& ledBlinkSpeed) { + std::string yellow; + folly::readFile(yellowDelayOn_.c_str(), yellow); + EXPECT_TRUE(ledBlinkSpeed == yellow); + folly::readFile(yellowTrigger_.c_str(), yellow); + if (ledBlinkSpeed == "0") { + EXPECT_TRUE(yellow.empty()); + } else { + EXPECT_TRUE("timer" == yellow); + } + } + + void VerifyBlueBlink(const std::string& ledBlinkSpeed) { + std::string blue; + folly::readFile(blueDelayOn_.c_str(), blue); + EXPECT_TRUE(ledBlinkSpeed == blue); + folly::readFile(blueTrigger_.c_str(), blue); + if (ledBlinkSpeed == "0") { + EXPECT_TRUE(blue.empty()); + } else { + EXPECT_TRUE("timer" == blue); + } } folly::test::TemporaryDirectory tmpDir_; @@ -124,17 +107,93 @@ class LedTests : public ::testing::Test { std::string yellowBasePath_ = tmpDir_.path().string() + "/invalidYellowLed"; std::string bluePath_ = blueBasePath_ + "/brightness"; std::string yellowPath_ = yellowBasePath_ + "/brightness"; + std::string blueMaxBrightness_ = blueBasePath_ + "/max_brightness"; + std::string yellowMaxBrightness_ = yellowBasePath_ + "/max_brightness"; + std::string blueDelayOn_ = blueBasePath_ + "/delay_on"; + std::string yellowDelayOn_ = yellowBasePath_ + "/delay_on"; + std::string blueDelayOff_ = blueBasePath_ + "/delay_off"; + std::string yellowDelayOff_ = yellowBasePath_ + "/delay_off"; + std::string blueTrigger_ = blueBasePath_ + "/trigger"; + std::string yellowTrigger_ = yellowBasePath_ + "/trigger"; int blueFd_; int yellowFd_; std::unique_ptr led_; }; TEST_F(LedTests, TestInvalidLedPath) { - testInvalidLedPath(); + LedMapping ledMapping; + ledMapping.id() = 0; + EXPECT_THROW( + std::unique_ptr led = std::make_unique(ledMapping), + LedIOError); } TEST_F(LedTests, testFakeLed) { - testFakeLed(); + LedMapping ledMapping; + ledMapping.id() = 0; + ledMapping.bluePath() = blueBasePath_; + ledMapping.yellowPath() = yellowBasePath_; + // Instantiating Led object will write 0 to both blue and yellow LED + // files and set current color to Off + led_ = std::make_unique(ledMapping); + + // Expect LEDs to be off after initialization + VerifyLedOff(); + + // Since current color is Off, setting it to Off again will be noop + led_->setLedState( + utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); + VerifyLedOff(); + + // Change current color from Off to Blue + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); + VerifyBlueOn("0"); + + // Since current color is Blue, setting it to Blue again will be noop + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::OFF)); + VerifyBlueOn("0"); + + // Change current color from Blue to Off + led_->setLedState( + utility::constructLedState(led::LedColor::OFF, led::Blink::OFF)); + VerifyLedOff(); + + // Change current color from Off to Yellow + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); + VerifyYellowOn("0"); + + // Since current color is Yellow, setting it to Yellow again will be noop + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::OFF)); + VerifyYellowOn("0"); +} + +TEST_F(LedTests, TestBlink) { + LedMapping ledMapping; + ledMapping.id() = 0; + ledMapping.bluePath() = blueBasePath_; + ledMapping.yellowPath() = yellowBasePath_; + // Instantiating Led object will write 0 to both blue and yellow LED + // files and set current color to Off + led_ = std::make_unique(ledMapping); + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::SLOW)); + VerifyYellowOn(kLedBlinkSlow); + + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::SLOW)); + VerifyBlueOn(kLedBlinkSlow); + + led_->setLedState( + utility::constructLedState(led::LedColor::YELLOW, led::Blink::FAST)); + VerifyYellowOn(kLedBlinkFast); + + led_->setLedState( + utility::constructLedState(led::LedColor::BLUE, led::Blink::FAST)); + VerifyBlueOn(kLedBlinkFast); } } // namespace facebook::fboss diff --git a/fboss/lib/phy/phy.thrift b/fboss/lib/phy/phy.thrift index 924374c3f5067..97d42f588b9ca 100644 --- a/fboss/lib/phy/phy.thrift +++ b/fboss/lib/phy/phy.thrift @@ -191,6 +191,11 @@ struct RxSettings { 33: optional i32 cdrTdetFineStepOvVal; 34: optional i32 ldoBypass; 35: optional i32 ffeLengthBitmap; + 36: optional i32 instgEnableScan; + 37: optional i32 dcwEn; + 38: optional i32 dcwStepCoarseOvVal; + 39: optional i32 dcwStepFineOvVal; + 40: optional i32 dcwOvEn; } struct LaneMap { diff --git a/fboss/lib/phy/sai_phy_management.bzl b/fboss/lib/phy/sai_phy_management.bzl deleted file mode 100644 index 3b75deb874204..0000000000000 --- a/fboss/lib/phy/sai_phy_management.bzl +++ /dev/null @@ -1,34 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "to_sdk_suffix", "to_versions") - -_CREDO_SRCS = [ - "facebook/credo/cloudripper/CloudRipperPhyManager.cpp", - "facebook/credo/elbert/ElbertPhyManager.cpp", -] - -_ALL_SRCS = _CREDO_SRCS - -def _get_srcs(): - # TODO: actually split up sources once we support doing so - return _ALL_SRCS - -def _sai_phy_management_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - return cpp_library( - name = "sai-phy-management{}".format(impl_suffix), - srcs = _get_srcs() + [ - "SaiPhyManager.cpp", - ], - headers = [ - "SaiPhyManager.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/lib/phy/facebook:sai_xphy{}".format(impl_suffix), - "//fboss/lib/phy/facebook/credo:recursive_glob_headers", # @manual - ], - ) - -def all_sai_phy_management_libs(): - for sai_impl in SAI_PHY_IMPLS: - _sai_phy_management_lib(sai_impl) diff --git a/fboss/lib/platforms/PlatformMode.h b/fboss/lib/platforms/PlatformMode.h index a7a29dd821aab..04923d10f44ab 100644 --- a/fboss/lib/platforms/PlatformMode.h +++ b/fboss/lib/platforms/PlatformMode.h @@ -76,6 +76,8 @@ inline std::string toString(PlatformType mode) { return "MONTBLANC"; case PlatformType::PLATFORM_MERU800BIA: return "MERU800BIA"; + case PlatformType::PLATFORM_MERU800BIAB: + return "MERU800BIAB"; case PlatformType::PLATFORM_MERU800BFA: return "MERU800BFA"; case PlatformType::PLATFORM_MERU800BFA_P1: @@ -88,6 +90,8 @@ inline std::string toString(PlatformType mode) { return "JANGA800BIC"; case PlatformType::PLATFORM_TAHAN800BC: return "TAHAN800BC"; + case PlatformType::PLATFORM_YANGRA: + return "YANGRA"; } throw std::runtime_error("Unknown mode"); return "Unknown"; diff --git a/fboss/lib/platforms/PlatformProductInfo.cpp b/fboss/lib/platforms/PlatformProductInfo.cpp index 1b6ce83753c36..c0af196a58d90 100644 --- a/fboss/lib/platforms/PlatformProductInfo.cpp +++ b/fboss/lib/platforms/PlatformProductInfo.cpp @@ -95,7 +95,8 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_GALAXY_FC; } else if ( modelName.find("Montblanc") == 0 || modelName.find("MONTBLANC") == 0 || - modelName.find("MINIPACK3_CHASSIS_BUNDLE") == 0) { + modelName.find("MINIPACK3_CHASSIS_BUNDLE") == 0 || + modelName.find("MINIPACK3") == 0) { type_ = PlatformType::PLATFORM_MONTBLANC; } else if ( modelName.find("MINIPACK") == 0 || modelName.find("MINIPHOTON") == 0) { @@ -111,6 +112,10 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_FAKE_WEDGE; } else if (modelName.find("CLOUDRIPPER") == 0) { type_ = PlatformType::PLATFORM_CLOUDRIPPER; + } else if ( + modelName.find("Yangra") == 0 || modelName.find("yangra") == 0 || + modelName.find("YANGRA") == 0) { + type_ = PlatformType::PLATFORM_YANGRA; } else if ( modelName.find("Meru400biu") == 0 || modelName.find("S9710-76D-BB12") == 0) { @@ -130,6 +135,14 @@ void PlatformProductInfo::initMode() { modelName.find("DCS-DL-7700R4C-38PE-AC-F") == 0 || modelName.find("DCS-DL-7700R4C-38PE-DC-F") == 0) { type_ = PlatformType::PLATFORM_MERU800BIA; + } else if ( + modelName.find("Meru800biab") == 0 || + modelName.find("MERU800BIAB") == 0 || + modelName.find("ASY-92459-109") == 0 || + modelName.find("ASY-08999-09") == 0 || + modelName.find("DCS-DL-7700R4C-38PE-B-AC-F") == 0 || + modelName.find("DCS-DL-7700R4C-38PE-B-DC-F") == 0) { + type_ = PlatformType::PLATFORM_MERU800BIAB; } else if ( modelName.find("Meru800bfa") == 0 || modelName.find("MERU800BFA") == 0 || @@ -140,6 +153,8 @@ void PlatformProductInfo::initMode() { modelName.find("MORGAN800CC") == 0 || modelName.find("8501-SYS-MT") == 0) { type_ = PlatformType::PLATFORM_MORGAN800CC; + } else if (modelName.find("YANGRA") == 0) { + type_ = PlatformType::PLATFORM_YANGRA; } else if (modelName.find("FAKE_SAI") == 0) { type_ = PlatformType::PLATFORM_FAKE_SAI; } else if ( @@ -181,6 +196,8 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_MERU400BIU; } else if (FLAGS_mode == "meru800bia") { type_ = PlatformType::PLATFORM_MERU800BIA; + } else if (FLAGS_mode == "meru800biab") { + type_ = PlatformType::PLATFORM_MERU800BIAB; } else if (FLAGS_mode == "meru800bfa") { type_ = PlatformType::PLATFORM_MERU800BFA; } else if (FLAGS_mode == "meru800bfa_p1") { @@ -209,6 +226,8 @@ void PlatformProductInfo::initMode() { type_ = PlatformType::PLATFORM_TAHAN800BC; } else if (FLAGS_mode == "morgan800cc") { type_ = PlatformType::PLATFORM_MORGAN800CC; + } else if (FLAGS_mode == "yangra") { + type_ = PlatformType::PLATFORM_YANGRA; } else { throw std::runtime_error("invalid mode " + FLAGS_mode); } diff --git a/fboss/lib/test/benchmarks/hw_benchmarks.bzl b/fboss/lib/test/benchmarks/hw_benchmarks.bzl deleted file mode 100644 index 6b4e03e9c5c54..0000000000000 --- a/fboss/lib/test/benchmarks/hw_benchmarks.bzl +++ /dev/null @@ -1,30 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -def hw_benchmark_lib(name, srcs, extra_deps = None): - extra_deps = extra_deps if extra_deps else [] - return cpp_library( - name = name, - srcs = srcs, - # Don't drop the benchmark functions they will be needed - # in the final benchmark run - link_whole = True, - # Ensemble will be linked in by particular HwSwitch - # implementations - undefined_symbols = True, - exported_deps = extra_deps + [ - "//fboss/lib/test/benchmarks:hw_benchmark_main", - "//folly:dynamic", - "//folly:json", - ], - ) - -def hw_benchmark_binary(name, srcs, extra_deps = None): - extra_deps = extra_deps if extra_deps else [] - return cpp_binary( - name = name, - srcs = srcs, - deps = extra_deps + [ - "//fboss/lib/test/benchmarks:hw_benchmark_main", - ], - ) diff --git a/fboss/lib/test/test_version.sh b/fboss/lib/test/test_version.sh index f9df7e04eaca7..4301c4b50ded2 100755 --- a/fboss/lib/test/test_version.sh +++ b/fboss/lib/test/test_version.sh @@ -1,3 +1,2 @@ #!/bin/bash - $1 --version | grep "Package Version" diff --git a/fboss/lib/thrift_service_client/BUCK b/fboss/lib/thrift_service_client/BUCK index 5611ee37d0db9..3f7fc2ba88dde 100644 --- a/fboss/lib/thrift_service_client/BUCK +++ b/fboss/lib/thrift_service_client/BUCK @@ -5,10 +5,13 @@ oncall("fboss_agent_push") cpp_library( name = "thrift-service-client", srcs = [ + "ConnectionOptions.cpp", "ThriftServiceClient.cpp", + "facebook/ConnectionOptions.cpp", "facebook/ThriftServiceClient.cpp", ], headers = [ + "ConnectionOptions.h", "ThriftServiceClient.h", ], exported_deps = [ @@ -17,13 +20,17 @@ cpp_library( "//common/services/cpp:tls_constants", "//configerator/structs/infrasec/if:acl-cpp2-types", "//fboss/agent/if:ctrl-cpp2-clients", + "//fboss/fsdb/common:flags", "//fboss/fsdb/if:fsdb-cpp2-services", "//fboss/qsfp_service/if:qsfp-cpp2-clients", "//folly:network_address", + "//folly/io:socket_option_map", "//folly/io/async:async_base", + "//folly/io/async:async_socket_transport", "//folly/io/async:async_ssl_socket", "//folly/io/async:ssl_context", "//infrasec/authorization:base_identity_util", + "//neteng/fboss/tools/build_info/server/if:fboss_build_info_if-cpp2-services", "//security/ca/lib:cert_path_picker", "//thrift/lib/cpp2/async:header_client_channel", "//thrift/lib/cpp2/async:rocket_client_channel", diff --git a/fboss/lib/thrift_service_client/ConnectionOptions.cpp b/fboss/lib/thrift_service_client/ConnectionOptions.cpp new file mode 100644 index 0000000000000..d2f129004e27e --- /dev/null +++ b/fboss/lib/thrift_service_client/ConnectionOptions.cpp @@ -0,0 +1,34 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" +#include "fboss/agent/if/gen-cpp2/ctrl_clients.h" +#include "fboss/fsdb/common/Flags.h" +#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" +#include "fboss/qsfp_service/if/gen-cpp2/qsfp_clients.h" + +namespace facebook::fboss::utils { + +template <> +ConnectionOptions ConnectionOptions::defaultOptions( + std::optional dstAddr) { + return ConnectionOptions(std::move(dstAddr).value_or( + folly::SocketAddress("::1", FLAGS_wedge_agent_port))); +} + +template <> +ConnectionOptions +ConnectionOptions::defaultOptions( + std::optional dstAddr) { + return ConnectionOptions(std::move(dstAddr).value_or( + folly::SocketAddress("::1", FLAGS_qsfp_service_port))); +} + +template <> +ConnectionOptions +ConnectionOptions::defaultOptions( + std::optional dstAddr) { + return ConnectionOptions( + std::move(dstAddr).value_or(folly::SocketAddress("::1", FLAGS_fsdbPort))); +} + +} // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/ConnectionOptions.h b/fboss/lib/thrift_service_client/ConnectionOptions.h new file mode 100644 index 0000000000000..f844963f790b5 --- /dev/null +++ b/fboss/lib/thrift_service_client/ConnectionOptions.h @@ -0,0 +1,136 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once + +#include +#include +#include +#include +#include + +DECLARE_string(wedge_agent_host); +DECLARE_int32(wedge_agent_port); +DECLARE_string(qsfp_service_host); +DECLARE_int32(qsfp_service_port); +DECLARE_int32(bgp_service_port); + +namespace facebook::fboss::utils { + +class ConnectionOptions { + public: + explicit ConnectionOptions(folly::SocketAddress dstAddr) + : dstAddr_(std::move(dstAddr)) {} + ConnectionOptions(std::string dstIp, uint16_t dstPort) + : ConnectionOptions(folly::SocketAddress(std::move(dstIp), dstPort)) {} + ConnectionOptions(folly::IPAddress dstIp, uint16_t dstPort) + : ConnectionOptions(folly::SocketAddress(std::move(dstIp), dstPort)) {} + + enum class TrafficClass : uint8_t { DEFAULT, NC }; + + folly::SocketAddress getDstAddr() const { + return dstAddr_; + } + + ConnectionOptions& setConnectionTimeout(std::chrono::milliseconds timeout) { + connTimeoutMs_ = timeout; + return *this; + } + + uint32_t getConnTimeoutMs() const { + return connTimeoutMs_.count(); + } + + ConnectionOptions& setSendTimeout(std::chrono::milliseconds timeout) { + sendTimeoutMs_ = timeout; + return *this; + } + + uint32_t getSendTimeoutMs() const { + return sendTimeoutMs_.count(); + } + + ConnectionOptions& setRecvTimeout(std::chrono::milliseconds timeout) { + recvTimeoutMs_ = timeout; + return *this; + } + + uint32_t getRecvTimeoutMs() const { + return recvTimeoutMs_.count(); + } + + ConnectionOptions& setSrcAddr(std::string srcIp, uint16_t srcPort = 0) { + srcAddr_ = folly::SocketAddress(std::move(srcIp), srcPort); + return *this; + } + + ConnectionOptions& setSrcAddr(std::optional srcAddr) { + srcAddr_ = std::move(srcAddr); + return *this; + } + + folly::SocketAddress getSrcAddr() const { + return srcAddr_ ? *srcAddr_ : folly::AsyncSocketTransport::anyAddress(); + } + + ConnectionOptions& setTrafficClass(TrafficClass tc) { + tc_ = tc; + return *this; + } + + ConnectionOptions& setHostname(std::string hostname) { + hostname_ = std::move(hostname); + return *this; + } + + std::string getHostname() const { + return hostname_.value_or(dstAddr_.getAddressStr()); + } + + ConnectionOptions& setPreferEncrypted(bool preferEncrypted) { + preferEncrypted_ = preferEncrypted; + return *this; + } + + bool getPreferEncrypted() const { + return preferEncrypted_; + } + + folly::SocketOptionMap getSocketOptionMap() const { + folly::SocketOptionMap sockOptsMap; + if (auto tos = getTos()) { + sockOptsMap.insert( + {folly::SocketOptionKey{IPPROTO_IPV6, IPV6_TCLASS}, *tos}); + } + return sockOptsMap; + } + + std::optional getTos() const { + if (tc_ == TrafficClass::NC) { + return kTosForClassOfServiceNC; + } + return std::nullopt; + } + + template + static ConnectionOptions defaultOptions( + std::optional dstAddr = std::nullopt); + + private: + // DSCP for Network Control is 48 + // 8-bit TOS = 6-bit DSCP followed by 2-bit ECN + static constexpr uint8_t kTosForClassOfServiceNC = 48 << 2; + static constexpr uint32_t kConnTimeout = 1000; + static constexpr uint32_t kSendTimeout = 5000; + static constexpr uint32_t kRecvTimeout = 45000; + + folly::SocketAddress dstAddr_; + std::chrono::milliseconds connTimeoutMs_{kConnTimeout}; + std::chrono::milliseconds sendTimeoutMs_{kSendTimeout}; + std::chrono::milliseconds recvTimeoutMs_{kRecvTimeout}; + std::optional srcAddr_; + std::optional tc_; + std::optional hostname_; + bool preferEncrypted_ = true; +}; + +} // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.cpp b/fboss/lib/thrift_service_client/ThriftServiceClient.cpp index 0a00c9374055f..675f8d5bdb79d 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.cpp +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.cpp @@ -23,10 +23,7 @@ createWedgeAgentClient( const std::optional& dstAddr, folly::EventBase* eb) { return tryCreateEncryptedClient( - dstAddr ? *dstAddr - : folly::SocketAddress( - FLAGS_wedge_agent_host, FLAGS_wedge_agent_port), - std::nullopt /* srcAddr */, + ConnectionOptions::defaultOptions(dstAddr), eb); } @@ -35,10 +32,16 @@ createQsfpServiceClient( const std::optional& dstAddr, folly::EventBase* eb) { return tryCreateEncryptedClient( - dstAddr ? *dstAddr - : folly::SocketAddress( - FLAGS_qsfp_service_host, FLAGS_qsfp_service_port), - std::nullopt /* srcAddr */, + ConnectionOptions::defaultOptions(dstAddr), eb); } + +std::unique_ptr> +createFsdbClient(ConnectionOptions options, folly::EventBase* eb) { + return options.getPreferEncrypted() + ? tryCreateEncryptedClient( + options, eb) + : createPlaintextClient(options, eb); +} + } // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/ThriftServiceClient.h b/fboss/lib/thrift_service_client/ThriftServiceClient.h index 2cdf336515f72..c7c95ab9f5701 100644 --- a/fboss/lib/thrift_service_client/ThriftServiceClient.h +++ b/fboss/lib/thrift_service_client/ThriftServiceClient.h @@ -10,6 +10,8 @@ #pragma once #include "fboss/agent/if/gen-cpp2/ctrl_clients.h" +#include "fboss/fsdb/if/gen-cpp2/FsdbService.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" #include "fboss/qsfp_service/if/gen-cpp2/qsfp_clients.h" #include @@ -25,52 +27,47 @@ DECLARE_int32(qsfp_service_port); DECLARE_int32(bgp_service_port); namespace facebook::fboss::utils { -auto constexpr kConnTimeout = 1000; -auto constexpr kRecvTimeout = 45000; -auto constexpr kSendTimeout = 5000; - -inline folly::SocketOptionMap getSocketOptionMap( - std::optional tos = std::nullopt) { - if (tos.has_value()) { - folly::SocketOptionKey v6Opts = {IPPROTO_IPV6, IPV6_TCLASS}; - folly::SocketOptionMap sockOptsMap; - sockOptsMap.insert({v6Opts, *tos}); - return sockOptsMap; - } else { - return folly::emptySocketOptionMap; - } -} - -template -std::unique_ptr> createPlaintextClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr = std::nullopt, - folly::EventBase* eb = nullptr, - std::optional tos = std::nullopt) { +template +std::unique_ptr> createPlaintextClient( + ConnectionOptions options, + folly::EventBase* eb = nullptr) { folly::EventBase* socketEb = eb ? eb : folly::EventBaseManager::get()->getEventBase(); auto socket = folly::AsyncSocket::UniquePtr(new folly::AsyncSocket(socketEb)); - socket->setSendTimeout(kSendTimeout); + socket->setSendTimeout(options.getSendTimeoutMs()); socket->connect( nullptr, - dstAddr, - kConnTimeout, - getSocketOptionMap(tos), - srcAddr ? *srcAddr : folly::AsyncSocketTransport::anyAddress()); + options.getDstAddr(), + options.getConnTimeoutMs(), + options.getSocketOptionMap(), + options.getSrcAddr()); auto channel = apache::thrift::RocketClientChannel::newChannel(std::move(socket)); - channel->setTimeout(kRecvTimeout); - return std::make_unique>(std::move(channel)); + channel->setTimeout(options.getRecvTimeoutMs()); + return std::make_unique>(std::move(channel)); +} + +// client with default dst and options +template +std::unique_ptr> createPlaintextClient( + folly::EventBase* eb = nullptr) { + return createPlaintextClient( + ConnectionOptions::defaultOptions(), eb); } // Prefers encrypted client, creates plaintext client if certs are unavailble -template -std::unique_ptr> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr = std::nullopt, - folly::EventBase* eb = nullptr, - std::optional tos = std::nullopt); +template +std::unique_ptr> tryCreateEncryptedClient( + const ConnectionOptions& options, + folly::EventBase* eb = nullptr); + +template +std::unique_ptr> tryCreateEncryptedClient( + folly::EventBase* eb = nullptr) { + return tryCreateEncryptedClient( + ConnectionOptions::defaultOptions(), eb); +} std::unique_ptr> createWedgeAgentClient( @@ -81,4 +78,10 @@ std::unique_ptr> createQsfpServiceClient( const std::optional& dstAddr = std::nullopt, folly::EventBase* eb = nullptr); + +std::unique_ptr> +createFsdbClient( + ConnectionOptions options = + ConnectionOptions::defaultOptions(), + folly::EventBase* eb = nullptr); } // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp b/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp index d414ee9b6c233..47abec06bad36 100644 --- a/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp +++ b/fboss/lib/thrift_service_client/oss/ThriftServiceClient.cpp @@ -15,31 +15,22 @@ namespace facebook::fboss::utils { template std::unique_ptr> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos) { - // default to plaintext in oss - return createPlaintextClient(dstAddr, srcAddr, eb); + const ConnectionOptions& options, + folly::EventBase* eb) { + return createPlaintextClient(std::move(options), eb); } template std::unique_ptr> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos); + const ConnectionOptions& options, + folly::EventBase* eb); template std::unique_ptr> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos); + const ConnectionOptions& options, + folly::EventBase* eb); template std::unique_ptr< apache::thrift::Client> tryCreateEncryptedClient( - const folly::SocketAddress& dstAddr, - const std::optional& srcAddr, - folly::EventBase* eb, - std::optional tos); + const ConnectionOptions& options, + folly::EventBase* eb); } // namespace facebook::fboss::utils diff --git a/fboss/lib/thrift_service_client/tests/BUCK b/fboss/lib/thrift_service_client/tests/BUCK new file mode 100644 index 0000000000000..c59b13e1d97eb --- /dev/null +++ b/fboss/lib/thrift_service_client/tests/BUCK @@ -0,0 +1,12 @@ +load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") + +oncall("fboss_agent_push") + +cpp_unittest( + name = "connection_options_test", + srcs = ["ConnectionOptionsTests.cpp"], + deps = [ + "//fboss/fsdb/if:fsdb-cpp2-clients", + "//fboss/lib/thrift_service_client:thrift-service-client", + ], +) diff --git a/fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp b/fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp new file mode 100644 index 0000000000000..6c86891104a45 --- /dev/null +++ b/fboss/lib/thrift_service_client/tests/ConnectionOptionsTests.cpp @@ -0,0 +1,24 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/fsdb/if/gen-cpp2/fsdb_clients.h" +#include "fboss/lib/thrift_service_client/ConnectionOptions.h" + +#include + +namespace facebook::fboss::utils::test { + +TEST(ConnectionOptionsTests, defaultOptions) { + auto options = + ConnectionOptions::defaultOptions(); + EXPECT_EQ(options.getDstAddr().getAddressStr(), "::1"); + EXPECT_EQ(options.getDstAddr().getPort(), 5908); +} + +TEST(ConnectionOptionsTests, tos) { + auto options = + ConnectionOptions::defaultOptions() + .setTrafficClass(ConnectionOptions::TrafficClass::NC); + EXPECT_EQ(options.getTos(), 48 << 2); +} + +} // namespace facebook::fboss::utils::test diff --git a/fboss/oss/docker/Dockerfile b/fboss/oss/docker/Dockerfile index 5eaa57d9c3d1c..4e541ac5d77a8 100644 --- a/fboss/oss/docker/Dockerfile +++ b/fboss/oss/docker/Dockerfile @@ -5,7 +5,8 @@ RUN dnf install git sudo lsof -y # Use /var/FBOSS as the set location to clone the git repository and store the outputs of the build. WORKDIR /var/FBOSS/ -RUN git clone https://github.com/facebook/fboss.git +RUN mkdir -p /var/FBOSS/fboss +COPY . fboss WORKDIR fboss RUN rm -rf build/deps/github_hashes/ @@ -14,7 +15,14 @@ RUN tar xvzf fboss/oss/stable_commits/latest_stable_hashes.tar.gz RUN dnf install -y 'dnf-command(config-manager)' RUN dnf config-manager --set-enabled crb RUN dnf install -y epel-release epel-next-release -RUN dnf install libcurl libcurl-devel -y --allowerasing +RUN sudo dnf install -y autoconf automake binutils binutils-devel bzip2 \ + bzip2-devel cmake double-conversion double-conversion-devel libcurl-devel \ + libcurl-minimal libdwarf libdwarf-devel libevent-devel libffi libffi-devel \ + libnghttp2 libnghttp2-devel libnl3 libnl3-devel libsodium-devel \ + libsodium-static libtool libunwind libunwind-devel libusb libusb-devel \ + libzstd libzstd-devel lz4-devel ncurses-devel ninja-build openssl \ + openssl-devel openssl-libs python3 python3-devel re2 re2-devel \ + snappy-devel xxhash-devel xz-devel zlib-devel zlib-static -y --allowerasing RUN ./build/fbcode_builder/getdeps.py install-system-deps --recursive fboss RUN dnf install bison flex -y RUN dnf group install "Development Tools" -y diff --git a/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON b/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON index 3d054570e5f6c..fa8965b1adc04 100644 --- a/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/meru800bia.agent.materialized_JSON @@ -206,6 +206,7 @@ "custom_feature_fabric_cgm_ddc_th_tune.BCM8889X": "1", "custom_feature_programmability_standard_image_name.BCM8889X": "AI23", "custom_feature_ser_event_generate": "1", + "custom_feature_shel_arm_enable": "1", "custom_feature_statdma_enable": "0", "custom_feature_use_new_access.BCM8889X": "1", "custom_feature_use_new_access.BCM8889X_ADAPTER": "1", @@ -1265,7 +1266,7 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", "soc_family.BCM8889X": "BCM8889X", diff --git a/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON b/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON index 199a65b038464..03a6457f376c3 100644 --- a/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/minipack.agent.materialized_JSON @@ -272,10 +272,12 @@ "dport_map_port_94": "113", "dport_map_port_95": "114", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON b/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON index 401dee6aef12a..7205a697ef9e2 100644 --- a/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON +++ b/fboss/oss/hw_bench_configs/wedge400.agent.materialized_JSON @@ -193,10 +193,12 @@ "dport_map_port_96": "9", "dport_map_port_97": "10", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON b/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON index 7320a941eadad..ca9d808d18b56 100644 --- a/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON +++ b/fboss/oss/hw_known_bad_tests/sai_agent_known_bad_tests.materialized_JSON @@ -52,6 +52,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -82,6 +85,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -148,6 +154,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -178,6 +187,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -214,6 +226,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4.ECMPShrinkExpandLoadBalanceFullHashCpuTraffic$" }, @@ -240,6 +276,9 @@ }, { "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk/mono": [ @@ -348,6 +387,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -378,6 +420,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -432,6 +477,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -462,6 +510,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -498,6 +549,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -522,6 +597,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -548,6 +626,9 @@ }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk/multi_switch": [ @@ -656,6 +737,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -686,6 +770,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -752,6 +839,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -782,6 +872,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -818,6 +911,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTest/1.ErspanPortMirror$" }, @@ -830,6 +947,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -859,6 +979,9 @@ }, { "test_name_regex": "AgentQueuePerHostTest/[0123].VerifyHostToQueueMappingClassIDsAfterResolve.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk3/mono": [ @@ -913,6 +1036,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -943,6 +1069,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -997,6 +1126,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1027,6 +1159,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -1063,6 +1198,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -1151,10 +1310,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1164,6 +1320,9 @@ }, { "test_name_regex": "AgentTrafficPfcWatchdogTest.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk3/multi_switch": [ @@ -1218,6 +1377,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1248,6 +1410,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -1314,6 +1479,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1344,6 +1512,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -1380,6 +1551,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -1456,10 +1651,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1469,6 +1661,9 @@ }, { "test_name_regex": "AgentTrafficPfcWatchdogTest.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk4/mono": [ @@ -1551,10 +1746,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1616,6 +1808,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1646,6 +1841,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -1700,6 +1898,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1730,6 +1931,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -1766,6 +1970,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -1798,6 +2026,9 @@ }, { "test_name_regex": "warm_boot.AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6FrontPanelTraffic$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk4/multi_switch": [ @@ -1880,10 +2111,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -1945,6 +2173,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -1975,6 +2206,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -2041,6 +2275,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2071,6 +2308,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -2107,11 +2347,38 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentAqmTest.verifyEcnWithoutWredConfig$" }, { "test_name_regex": "AgentDiagShellStressTest.*$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk5/mono": [ @@ -2220,6 +2487,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2250,6 +2520,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2304,6 +2577,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2334,6 +2610,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -2370,6 +2649,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2430,6 +2733,12 @@ { "test_name_regex": "AgentVoqSwitchLineRateTest.*$" }, + { + "test_name_regex": "AgentPfcTest.*$" + }, + { + "test_name_regex": "AgentTrafficPfc.*$" + }, { "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToDefaultUCQueue$" }, @@ -2441,17 +2750,113 @@ }, { "test_name_regex": "AgentMacLearningAndNeighborResolutionTest/2.learnMacProgramNeighborsAndMove$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" } ], - "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/mono": [ + "brcm/10.2.0.0_odp/10.2.0.0_odp/tomahawk5/multi_switch": [ { - "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + "test_name_regex": "AgentLoadBalancerTestV4InMplsSwap.*$" }, { - "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + "test_name_regex": "AgentLoadBalancerTestV4ToMpls.*$" + }, + { + "test_name_regex": "AgentLoadBalancerTestV6InMplsPhp.*$" + }, + { + "test_name_regex": "AgentLoadBalancerTestV6InMplsSwap.*$" + }, + { + "test_name_regex": "AgentLoadBalancerTestV6ToMpls.*$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsPhpFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsSwapFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsPhpFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsSwapFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsPhpFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsSwapFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsPhpFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsSwapFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsFrontPanelTraffic$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentSflowMirrorTestV4[46].VerifySampledPacketRate$" + }, + { + "test_name_regex": "AgentSflowMirrorTruncateTestV[46].VerifySampledPacketRate$" + }, + { + "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, + { + "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "AgentTrafficPfcTest.verifyIngressPriorityGroupWatermarks$" + }, + { + "test_name_regex": "AgentTrafficPfcWatchdogTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" }, { "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" @@ -2495,6 +2900,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2525,6 +2933,332 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" + }, + { + "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + }, + { + "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + }, + { + "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" + }, + { + "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" + }, + { + "test_name_regex": "AgentUdfAclCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowlet.*$" + }, + { + "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" + }, + { + "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" + }, + { + "test_name_regex": "AgentPacketFloodTest.*$" + }, + { + "test_name_regex": "AgentMacLearningMacMoveTest.*$" + }, + { + "test_name_regex": "AgentMacLearningBatchEntriesTest.*$" + }, + { + "test_name_regex": "AgentSflowMirrorTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForTrunk$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForTrunk$" + }, + { + "test_name_regex": "AgentIngressEgress.*$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentLoopBackTest.VerifyLoopBackSrcEqualDstMac$" + }, + { + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" + }, + { + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/2$" + }, + { + "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" + }, + { + "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + }, + { + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, + { + "test_name_regex": "AgentBthOpcodeAclCounterTest.VerifyCounterBumpOnBthOpcodeHitFrontPanel$" + }, + { + "test_name_regex": "AgentFabricSwitchSelfLoopTest.*$" + }, + { + "test_name_regex": "AgentFabricPrbsTest.*$" + }, + { + "test_name_regex": "AgentFabricSwitchTest.*$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowletResourceTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchWithFabricPortsStartDrained.*$" + }, + { + "test_name_regex": "AgentVoqSwitchWithFabricPortsTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchWithMultipleDsfNodesTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.*$" + }, + { + "test_name_regex": "AgentVoqSwitchLineRateTest.*$" + }, + { + "test_name_regex": "AgentPfcTest.*$" + }, + { + "test_name_regex": "AgentTrafficPfc.*$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToDefaultUCQueue$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToUCQueue$" + }, + { + "test_name_regex": "AgentMacLearningAndNeighborResolutionTest/0.learnMacProgramNeighborsAndMove$" + }, + { + "test_name_regex": "AgentMacLearningAndNeighborResolutionTest/2.learnMacProgramNeighborsAndMove$" + }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentMacOverFlowTest.*$" + } + ], + "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/mono": [ + { + "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" + }, + { + "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" + }, + { + "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" + }, + { + "test_name_regex": "AgentUdfAclCounterTest.*$" + }, + { + "test_name_regex": "AgentFlowlet.*$" + }, + { + "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" + }, + { + "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" + }, + { + "test_name_regex": "AgentPacketFloodTest.*$" + }, + { + "test_name_regex": "AgentMacLearningMacMoveTest.*$" + }, + { + "test_name_regex": "AgentMacLearningBatchEntriesTest.*$" + }, + { + "test_name_regex": "AgentSflowMirrorTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" + }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForTrunk$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForPort$" + }, + { + "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForTrunk$" + }, + { + "test_name_regex": "AgentIngressEgress.*$" + }, + { + "test_name_regex": "AgentIngressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentIngressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclSpanMirroringTest.*$" + }, + { + "test_name_regex": "AgentEgressAclErspanMirroringTest.*$" + }, + { + "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2579,6 +3313,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2609,6 +3346,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -2645,6 +3385,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -2750,6 +3514,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -2768,6 +3538,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -2795,9 +3586,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -2810,6 +3598,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -2823,10 +3620,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/jericho3/multi_switch": [ @@ -2881,6 +3678,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -2911,6 +3711,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -2977,6 +3780,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3007,6 +3813,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3017,31 +3826,55 @@ "test_name_regex": "AgentLoopBackTest.VerifyLoopBackSrcEqualDstMac$" }, { - "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" + }, + { + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/2$" + }, + { + "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" + }, + { + "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + }, + { + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, { - "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/2$" + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" }, { - "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" }, { - "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" }, { - "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" }, { - "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" @@ -3136,6 +3969,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -3154,6 +3993,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -3181,9 +4041,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -3196,6 +4053,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -3209,10 +4075,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/ramon3/mono": [ @@ -3267,6 +4133,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3297,6 +4166,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -3351,6 +4223,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3381,6 +4256,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3417,6 +4295,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -3485,6 +4387,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3515,6 +4420,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -3581,6 +4489,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3611,6 +4522,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3647,6 +4561,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentPrbsTest.*$" } @@ -3703,6 +4641,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3733,6 +4674,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -3787,6 +4731,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -3817,6 +4764,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -3853,6 +4803,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -4005,6 +4979,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4035,6 +5012,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -4101,6 +5081,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4131,6 +5114,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -4167,6 +5153,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -4307,6 +5317,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4337,6 +5350,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -4391,6 +5407,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4421,6 +5440,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -4457,6 +5479,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -4562,6 +5608,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -4580,6 +5632,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -4607,9 +5680,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -4622,6 +5692,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -4635,10 +5714,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/12.0_ea_dnx_odp/12.0_ea_dnx_odp/jericho3/multi_switch": [ @@ -4693,6 +5772,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4723,6 +5805,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -4789,6 +5874,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -4819,6 +5907,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -4855,6 +5946,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -4948,6 +6063,12 @@ { "test_name_regex": "AgentAclCounterTest/0.VerifyAclPriorityL4DstportHitFrontPanel$" }, + { + "test_name_regex": "AgentAclCounterTest.VerifyAclPriorityL4DstportHitFrontPanel$" + }, + { + "test_name_regex": "AgentAclCounterTest.VerifyCounterBumpOnL4DstportHitFrontPanel$" + }, { "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, @@ -4966,6 +6087,27 @@ { "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, + { + "test_name_regex": "AgentHwAclQualifierTest.*$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentEgressForwardingDiscardsCounterTest.outForwardingDiscards$" + }, + { + "test_name_regex": "AgentHwAclStatTest.AclStatChangeCounterType$" + }, + { + "test_name_regex": "AgentNeighborTest/[46].ResolvePendingEntryThenChangeLookupClassAgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "AgentVoqSwitchTest.trapPktsOnPort$" + }, { "test_name_regex": "AgentCoppTest/0.UnresolvedRoutesToLowPriQueue$" }, @@ -4993,9 +6135,6 @@ { "test_name_regex": "AgentVoqSwitchInterruptTest.*$" }, - { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.systemPortScaleTest$" - }, { "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteNeighborWithEcmpGroup$" }, @@ -5008,6 +6147,15 @@ { "test_name_regex": "warm_boot.AgentVoqSwitchLineRateTest.creditsDeleted$" }, + { + "test_name_regex": "warm_boot.AgentTrafficPfcTest.verifyBufferPoolWatermarks$" + }, + { + "test_name_regex": "warm_boot.AgentVoqSwitchWithFabricPortsTest.fdrCellDrops$" + }, + { + "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + }, { "test_name_regex": "Agent2QueueToOlympicQoSTest.verifyDscpToQueueMapping$" }, @@ -5021,10 +6169,10 @@ "test_name_regex": "AgentPortBandwidthPpsTest.VerifyPpsDynamicChanges$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.stressProgramEcmpRoutes$" + "test_name_regex": "AgentNeighborTest[46].ResolvePendingEntryThenChangeLookupClass$" }, { - "test_name_regex": "AgentVoqSwitchFullScaleDsfNodesTest.remoteAndLocalLoadBalance$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" } ], "brcm/12.0_ea_dnx_odp/12.0_ea_dnx_odp/ramon/mono": [ @@ -5079,6 +6227,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5109,6 +6260,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5163,6 +6317,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5193,6 +6350,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5229,6 +6389,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5297,6 +6481,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5327,6 +6514,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -5393,6 +6583,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5423,6 +6616,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5459,6 +6655,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentPrbsTest.*$" } @@ -5515,6 +6735,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5545,6 +6768,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5599,6 +6825,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5629,6 +6858,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5665,6 +6897,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -5733,6 +6989,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5763,6 +7022,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -5829,6 +7091,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -5859,6 +7124,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -5895,6 +7163,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentPrbsTest.*$" } @@ -6005,6 +7297,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6035,6 +7330,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6089,6 +7387,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6119,6 +7420,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -6155,6 +7459,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6179,6 +7507,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -6313,6 +7644,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6343,6 +7677,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -6409,6 +7746,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6439,6 +7779,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -6475,6 +7818,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTest/1.ErspanPortMirror$" }, @@ -6487,6 +7854,9 @@ { "test_name_regex": "AgentSflowMirrorTestV6.*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentIngressPortErspanMirroringTruncateTest/[01].TrucatePortErspanMirror$" }, @@ -6570,6 +7940,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6600,6 +7973,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6654,6 +8030,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6684,6 +8063,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -6720,6 +8102,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -6808,10 +8214,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -6875,6 +8278,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -6905,6 +8311,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -6971,6 +8380,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7001,6 +8413,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -7037,6 +8452,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentLoadBalancerTestV4InMplsPhp.*$" }, @@ -7113,10 +8552,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -7208,10 +8644,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -7273,6 +8706,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7303,6 +8739,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" }, @@ -7357,6 +8796,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7387,6 +8829,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -7406,22 +8851,46 @@ "test_name_regex": "AgentMacSwLearningModeTest.VerifyNbrMacInL2Table$" }, { - "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + "test_name_regex": "AgentMacLearningStaticEntriesTest.VerifyStaticDynamicTransformations$" + }, + { + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + }, + { + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" }, { - "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" }, { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" }, { - "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" @@ -7537,10 +9006,7 @@ "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" }, { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" - }, - { - "test_name_regex": "AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" }, { "test_name_regex": "AgentTrafficPfcTest.verifyBufferPoolWatermarks$" @@ -7602,6 +9068,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7632,6 +9101,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -7698,6 +9170,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -7728,6 +9203,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].VerifyCoppPpsLowPri$" }, @@ -7764,6 +9242,30 @@ { "test_name_regex": "AgentHwAclStatTest.StatNumberOfCounters$" }, + { + "test_name_regex": "AgentRouteTest/[01].StaticIp2MplsRoutes$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithZeroPgHeadRoomCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentWatermarkTest.VerifyDeviceWatermarkHigherThanQueueWatermark$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_0$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest.verifyPfcWithMapChanges_1$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithDefaultCfg$" + }, + { + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot_for_warm_boot.0.AgentEmptyTest.CheckInit.AgentTrafficPfcTest/AgentTrafficPfcGenTest.verifyPfc/WithScaleCfg$" + }, { "test_name_regex": "AgentAqmTest.verifyEcnWithoutWredConfig$" }, @@ -7886,6 +9388,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentDeepPacketInspectionTest.*$" }, @@ -7985,6 +9493,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8015,6 +9526,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } @@ -8135,267 +9649,58 @@ "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, { - "test_name_regex": "AgentDeepPacketInspectionTest.*$" - }, - { - "test_name_regex": "AgentRouteCounterOverflowTest.*$" - }, - { - "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" - }, - { - "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" - }, - { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].SpanAclMirror$" - }, - { - "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].ErspanAclMirror$" - }, - { - "test_name_regex": "AgentEgressPortSpanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressPortErspanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassIDBlock$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastToMidPriQ$" - }, - { - "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" - }, - { - "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" - }, - { - "test_name_regex": "AgentHwAclStatTest.*$" - }, - { - "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].L3MTUErrorToLowPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].DhcpPacketToMidPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/0.VerifyCoppPpsLowPri$" - }, - { - "test_name_regex": "AgentOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" - }, - { - "test_name_regex": "AgentOlympicV2SPToWRRQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" - }, - { - "test_name_regex": "AgentUdfAclCounterTest.*$" - }, - { - "test_name_regex": "AgentFlowlet.*$" - }, - { - "test_name_regex": "AgentCoppQosTest.HighVsLowerPriorityCpuQueueTrafficPrioritization$" - }, - { - "test_name_regex": "AgentCoppQueueStuckTest.CpuQueueHighRateTraffic$" - }, - { - "test_name_regex": "AgentPacketFloodTest.*$" - }, - { - "test_name_regex": "AgentMacLearningMacMoveTest.*$" - }, - { - "test_name_regex": "AgentMacLearningBatchEntriesTest.*$" - }, - { - "test_name_regex": "AgentSflowMirrorTestV[46].*$" - }, - { - "test_name_regex": "AgentSflowMirrorOnTrunkTestV[46].*$" - }, - { - "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForTrunk$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForPort$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwLearningForTrunk$" - }, - { - "test_name_regex": "AgentIngressEgress.*$" - }, - { - "test_name_regex": "AgentIngressAclSpanMirroringTest.*$" - }, - { - "test_name_regex": "AgentIngressAclErspanMirroringTest.*$" - }, - { - "test_name_regex": "AgentEgressAclSpanMirroringTest.*$" - }, - { - "test_name_regex": "AgentEgressAclErspanMirroringTest.*$" - }, - { - "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" - }, - { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" - }, - { - "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" - }, - { - "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" - } - ], - "leaba/1.65.1/1.65.1/gibraltar/mono": [ - { - "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitNeighbor$" - }, - { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" - }, - { - "test_name_regex": "AgentQueuePerHostTest.*$" - }, - { - "test_name_regex": "AgentQueuePerHostL2Test.VerifyHostToQueueMappingClassID$" - }, - { - "test_name_regex": "AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassID$" - }, - { - "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" - }, - { - "test_name_regex": "warm_boot.AgentMacLearningTest.VerifyHwAgingForTrunk$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifySwToHw.*$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyHwToSw.*$" - }, - { - "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" - }, - { - "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifySwAgingForPort$" - }, - { - "test_name_regex": "AgentMacLearningTest.VerifyMacLearningScale$" - }, - { - "test_name_regex": "AgentPacketSendTest.PortTxEnableTest$" + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" }, { - "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" - }, - { - "test_name_regex": "AgentCoppTest/[01].NdpAdvertisementToHighPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ttl1PacketToLowPriQ$" - }, - { - "test_name_regex": "AgentCoppTest/[01].JumboFramesToQueues$" - }, - { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRoutesToLowPriQueue$" - }, - { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastNetworkControlDscpToHighPriQ$" + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" }, { - "test_name_regex": "AgentDscpMarkingTest.VerifyDscpMarking$" + "test_name_regex": "AgentDeepPacketInspectionTest.*$" }, { - "test_name_regex": "AgentAclConflictAndDscpQueueMappingTest.VerifyAclAndQosMapConflict$" + "test_name_regex": "AgentRouteCounterOverflowTest.*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIcmp4Qualifiers$" + "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIcmp6Qualifiers$" + "test_name_regex": "roundtrip.*.AgentIngressPortSpanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIp4TcpQualifiers$" + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclIp6TcpQualifiers$" + "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].SpanAclMirror$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclModifyQualifier$" + "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].ErspanAclMirror$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclEmptyCodeIcmp$" + "test_name_regex": "AgentEgressPortSpanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" + "test_name_regex": "AgentEgressPortErspanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatCreateShared$" + "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatDeleteShared$" + "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatRenameShared$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.warm_boot.AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassIDBlock$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatCreateMultiple$" + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastToMidPriQ$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatShuffle$" + "test_name_regex": "roundtrip.*.AgentIngressPortErspanMirroringTruncateTest/[01].*$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" + "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" }, { - "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" + "test_name_regex": "AgentHwAclStatTest.*$" }, { "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" @@ -8448,6 +9753,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8479,10 +9787,25 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" + }, + { + "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + }, + { + "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + }, + { + "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" } ], - "leaba/1.65.1/1.65.1/gibraltar/multi_switch": [ + "leaba/1.65.1/1.65.1/gibraltar/mono": [ { "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, @@ -8597,6 +9920,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -8651,6 +9980,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8682,22 +10014,13 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" - }, - { - "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + "test_name_regex": "AgentPortBandwidthTest.*$" }, { - "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } ], - "leaba/24.4.90/24.4.90/gibraltar/mono": [ + "leaba/1.65.1/1.65.1/gibraltar/multi_switch": [ { "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, @@ -8812,6 +10135,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -8866,6 +10195,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -8897,10 +10229,25 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" + "test_name_regex": "AgentPortBandwidthTest.*$" + }, + { + "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" + }, + { + "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" + }, + { + "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + }, + { + "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + }, + { + "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" } ], - "leaba/24.4.90/24.4.90/gibraltar/multi_switch": [ + "leaba/24.4.90/24.4.90/gibraltar/mono": [ { "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, @@ -9015,6 +10362,12 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -9069,6 +10422,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9100,82 +10456,46 @@ "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, { - "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "AgentRouteOverflowTest.overflowRoutes$" - }, - { - "test_name_regex": "warm_boot.AgentInNullRouteDiscardsCounterTest.nullRouteHit$" - }, - { - "test_name_regex": "warm_boot.AgentRouteCounterOverflowTest.overflowRouteCounters$" + "test_name_regex": "AgentPortBandwidthTest.*$" }, { - "test_name_regex": "warm_boot.AgentMacLearningAndNeighborResolutionTest/[01].learnMacProgramNeighborsAndAgeMac$" + "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } ], - "leaba/24.6.1._yuba/24.6.1_yuba/graphene200/mono": [ - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsPhpFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV4MplsSwapFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsPhpFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X2WideTrunksV6MplsSwapFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsFrontPanelTraffic$" - }, - { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsPhpFrontPanelTraffic$" - }, + "leaba/24.4.90/24.4.90/gibraltar/multi_switch": [ { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV4MplsSwapFrontPanelTraffic$" + "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" }, { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsFrontPanelTraffic$" + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" }, { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsPhpFrontPanelTraffic$" + "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" }, { - "test_name_regex": "AgentTrunkLoadBalancerTest.ECMPFullTrunkHalf4X3WideTrunksV6MplsSwapFrontPanelTraffic$" + "test_name_regex": "AgentCoppTest/[01].NdpSolicitNeighbor$" }, { - "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" + "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" }, { - "test_name_regex": "AgentCoppTest/[01].EapolToHighPriQ$" + "test_name_regex": "AgentCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" }, { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" + "test_name_regex": "AgentQueuePerHostTest.*$" }, { - "test_name_regex": "AgentCoppTest/[01].NdpSolicitationToHighPriQ$" + "test_name_regex": "AgentQueuePerHostL2Test.VerifyHostToQueueMappingClassID$" }, { - "test_name_regex": "AgentCoppTest/1.UnresolvedRoutesToLowPriQueue$" + "test_name_regex": "AgentQueuePerHostRouteTest/[01].VerifyHostToQueueMappingClassID$" }, { - "test_name_regex": "AgentCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" + "test_name_regex": "AgentPortBandwidthTest/AgentPortBandwidthParamTest.VerifyPortRateTraffic/0$" }, { "test_name_regex": "warm_boot.AgentMacLearningTest.VerifyHwAgingForTrunk$" }, - { - "test_name_regex": "cold_boot.AgentMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" - }, { "test_name_regex": "AgentMacLearningTest.VerifySwToHw.*$" }, @@ -9183,7 +10503,7 @@ "test_name_regex": "AgentMacLearningTest.VerifyHwToSw.*$" }, { - "test_name_regex": "warm_boot.AgentMacLearningTest.VerifyHwAgingForTrunk$" + "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" }, { "test_name_regex": "warm_boot.AgentMacSwLearningModeTest.VerifySwAgingForPort$" @@ -9192,28 +10512,31 @@ "test_name_regex": "AgentMacLearningTest.VerifyMacLearningScale$" }, { - "test_name_regex": "AgentIngressAclSpanMirroringTest/[01].SpanAclMirror$" + "test_name_regex": "AgentPacketSendTest.PortTxEnableTest$" }, { - "test_name_regex": "AgentIngressAclErspanMirroringTest/[01].ErspanAclMirror$" + "test_name_regex": "AgentWatermarkTest.VerifyQueueWatermarkAccuracy$" }, { - "test_name_regex": "AgentEgressAclSpanMirroringTest/[01].*$" + "test_name_regex": "AgentCoppTest/[01].NdpAdvertisementToHighPriQ$" }, { - "test_name_regex": "AgentEgressAclErspanMirroringTest/[01].*$" + "test_name_regex": "AgentCoppTest/[01].Ttl1PacketToLowPriQ$" }, { - "test_name_regex": "AgentInNullRouteDiscardsCounterTest.nullRouteHit$" + "test_name_regex": "AgentCoppTest/[01].JumboFramesToQueues$" }, { - "test_name_regex": "warm_boot.AgentPacketSendTest.PortTxEnableTest$" + "test_name_regex": "AgentCoppTest/[01].UnresolvedRoutesToLowPriQueue$" }, { - "test_name_regex": "warm_boot.AgentPortBandwidthTest.VerifyQueueShaper$" + "test_name_regex": "AgentCoppTest/[01].Ipv6LinkLocalMcastNetworkControlDscpToHighPriQ$" }, { - "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + "test_name_regex": "AgentDscpMarkingTest.VerifyDscpMarking$" + }, + { + "test_name_regex": "AgentAclConflictAndDscpQueueMappingTest.VerifyAclAndQosMapConflict$" }, { "test_name_regex": "AgentHwAclQualifierTest.AclIcmp4Qualifiers$" @@ -9246,22 +10569,22 @@ "test_name_regex": "AgentHwAclStatTest.AclStatRenameShared$" }, { - "test_name_regex": "warm_boot.AgentHwAclStatTest.AclStatDelete$" + "test_name_regex": "AgentHwAclStatTest.AclStatCreateMultiple$" }, { - "test_name_regex": "warm_boot.AgentHwAclStatTest.AclStatRename$" + "test_name_regex": "AgentHwAclStatTest.AclStatShuffle$" }, { - "test_name_regex": "warm_boot.AgentHwAclStatTest.StatNumberOfCounters$" + "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatCreateMultiple$" + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatShuffle$" + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" }, { - "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" + "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, { "test_name_regex": "AgentCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" @@ -9314,6 +10637,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9344,6 +10670,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, @@ -9475,6 +10804,39 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, + { + "test_name_regex": "AgentAclAndDscpQueueMappingTest.VerifyAclAndQosMap$" + }, + { + "test_name_regex": "AgentCoppTest/1.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" + }, + { + "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHgridUuRouteScaleTest.hgridUuScaleTest$" + }, + { + "test_name_regex": "AgentHundredThousandRouteScaleTest.hundredThousandRouteScaleTest$" + }, + { + "test_name_regex": "AgentL4PortBlackHolingTest.*$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.VerifyKbps$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -9529,6 +10891,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9559,6 +10924,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.cold_boot.AgentPacketSendReceiveLagTest.LacpPacketReceiveSrcPort$" } @@ -9678,6 +11046,39 @@ { "test_name_regex": "AgentHwAclStatTest.AclStatDeleteSharedPostWarmBoot$" }, + { + "test_name_regex": "AgentSendPacketToQueueTest.SendPacketOutOfPortToMCQueue$" + }, + { + "test_name_regex": "AgentAqmWredDropTest.verifyWredDrop$" + }, + { + "test_name_regex": "AgentAclAndDscpQueueMappingTest.VerifyAclAndQosMap$" + }, + { + "test_name_regex": "AgentCoppTest/1.VerifyCoppPpsLowPri$" + }, + { + "test_name_regex": "AgentDeepPacketInspectionTest.l3ForwardedPkt$" + }, + { + "test_name_regex": "AgentDiagShellStressTest.stressDiagCmds$" + }, + { + "test_name_regex": "AgentEgressPortErspanMirroringTruncateTest/[01].*$" + }, + { + "test_name_regex": "AgentHgridUuRouteScaleTest.hgridUuScaleTest$" + }, + { + "test_name_regex": "AgentHundredThousandRouteScaleTest.hundredThousandRouteScaleTest$" + }, + { + "test_name_regex": "AgentL4PortBlackHolingTest.*$" + }, + { + "test_name_regex": "AgentPortBandwidthTest.VerifyKbps$" + }, { "test_name_regex": "AgentPortBandwidthTest.VerifyQueueShaper$" }, @@ -9732,6 +11133,9 @@ { "test_name_regex": "AgentSflowMirrorTruncateTestV[46].*$" }, + { + "test_name_regex": "AgentSflowMirrorWithLineRateTrafficTest.*$" + }, { "test_name_regex": "AgentMacLearningTest.VerifyHwAgingForPort$" }, @@ -9762,6 +11166,9 @@ { "test_name_regex": "AgentHwAclQualifierTest.AclVlanIDQualifier$" }, + { + "test_name_regex": "AgentPortBandwidthTest.*$" + }, { "test_name_regex": "AgentCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" }, diff --git a/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON b/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON index deb5981ef2174..b084155782959 100644 --- a/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON +++ b/fboss/oss/hw_known_bad_tests/sai_known_bad_tests.materialized_JSON @@ -286,6 +286,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -888,6 +891,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwFlexPortTest.FlexPortTWOX50G" }, @@ -2161,6 +2167,9 @@ { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwWideEcmpTest.WideUcmp.*" } @@ -2451,6 +2460,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -2987,6 +2999,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwFlexPortTest.FlexPortTWOX50G" }, @@ -3187,12 +3202,18 @@ { "test_name_regex": "HwTrafficPfcTest/HwTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "warm_boot.HwTrafficPfcTest.PfcWatchdog" }, { "test_name_regex": "warm_boot.HwVerifyPfcConfigInHwTest.PfcWatchdogProgrammingSequence" }, + { + "test_name_regex": "warm_boot.HwParityErrorTest.verifyParityError" + }, { "test_name_regex": "HwAqmTest.verifyEcnTrafficNoDrop" } @@ -3324,12 +3345,18 @@ { "test_name_regex": "HwTrafficPfcTest/HwTrafficPfcGenTest.verifyPfc/WithZeroGlobalHeadRoomCfg" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "warm_boot.HwTrafficPfcTest.PfcWatchdog" }, { "test_name_regex": "warm_boot.HwVerifyPfcConfigInHwTest.PfcWatchdogProgrammingSequence" }, + { + "test_name_regex": "warm_boot.HwParityErrorTest.verifyParityError" + }, { "test_name_regex": "HwAqmTest.verifyEcnTrafficNoDrop" } @@ -4943,6 +4970,9 @@ }, { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" + }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" } ], "brcm/8.2.0.0_odp/8.2.0.0_odp/tomahawk4": [ @@ -5231,6 +5261,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -6639,6 +6672,9 @@ { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwTrafficPfcTest.*" }, @@ -6950,6 +6986,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -7510,6 +7549,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -8960,6 +9002,9 @@ { "test_name_regex": "HwIngressBufferTest.validatePGQueueChanges" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "HwWideEcmpTest.WideUcmp.*" } @@ -9250,6 +9295,9 @@ { "test_name_regex": "HwIngressBufferTest.validateIngressPoolParamChange" }, + { + "test_name_regex": "HwIngressBufferTest.validatePGHeadroomLimitChange" + }, { "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.warm_boot_for_warm_boot.0.HwEmptyTest.CheckInit.SaiAclTableGroupTest.AddTablesThenEntries" }, @@ -12473,383 +12521,6 @@ "test_name_regex": "HwCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" } ], - "leaba/24.6.1_yuba/24.6.1_yuba/graphene200": [ - { - "test_name_regex": "HwProdInvariantsMmuLosslessTest.*" - }, - { - "test_name_regex": "HwCoppTest/[01].EapolToHighPriQ" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIcmp4Qualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIcmp6Qualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIp4TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclIp6TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclModifyQualifier$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclEmptyCodeIcmp$" - }, - { - "test_name_regex": "HwAclQualifierTest/[01].AclVlanIDQualifier$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatCreateShared$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatDeleteShared$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatRenameShared$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclIcmp6Qualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclIp4TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclIp6TcpQualifiers$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclModifyQualifier$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclEmptyCodeIcmp$" - }, - { - "test_name_regex": "HwAclQualifierTest.AclVlanIDQualifier$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatCreateShared$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatDeleteShared$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatRenameShared$" - }, - { - "test_name_regex": "SaiAclTableGroupTest.*$" - }, - { - "test_name_regex": "SaiAclTableGroupTrafficTest/[01].*$" - }, - { - "test_name_regex": "HwInDiscardsCounterTest.*$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/1.ExceedMaxLabels$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest.*TunnelRefTest$" - }, - { - "test_name_regex": "HwL2ClassIDTest.*$" - }, - { - "test_name_regex": "HwCoppTest/[01].Ipv6LinkLocalUcastIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].DstIpNetworkControlDscpToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].NdpAdvertisementToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].Ipv6LinkLocalUcastToMidPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].UnresolvedRoutesToLowPriQueue$" - }, - { - "test_name_regex": "HwCoppTest/[01].NdpSolicitationToHighPriQ$" - }, - { - "test_name_regex": "HwCoppTest/1.JumboFramesToQueues$" - }, - { - "test_name_regex": "HwCoppTest/1.L3MTUErrorToLowPriQ$" - }, - { - "test_name_regex": "HwDscpMarkingTest.*$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningTest.VerifyHwAgingForTrunk$" - }, - { - "test_name_regex": "HwMacLearningTest.VerifySwToHw.*$" - }, - { - "test_name_regex": "HwMacLearningTest.VerifyHwToSw.*$" - }, - { - "test_name_regex": "warm_boot.HwMacSwLearningModeTest.VerifyCallbacksOnMacEntryChange$" - }, - { - "test_name_regex": "HwMacLearningTest.VerifyMacLearningScale$" - }, - { - "test_name_regex": "HwMacLearningBatchEntriesTest.*$" - }, - { - "test_name_regex": "HwMacLearningMacMoveTest.VerifyMacMoveForPort$" - }, - { - "test_name_regex": "HwRouteScaleTest.turboFabricScaleTest$" - }, - { - "test_name_regex": "HwMmuTuningTest.*$" - }, - { - "test_name_regex": "HwCoppTest/0.JumboFramesToQueues$" - }, - { - "test_name_regex": "HwMirrorTest.*$" - }, - { - "test_name_regex": "HwPacketFloodTest.*$" - }, - { - "test_name_regex": "HwCoppQosTest.*$" - }, - { - "test_name_regex": "HwDataPlaneMirrorTest/[01].SpanAclMirror$" - }, - { - "test_name_regex": "HwDataPlaneMirrorTest/[01].ErspanAclMirror$" - }, - { - "test_name_regex": "warm_boot.HwTrunkTest.TrunkMemberPortDownMinLinksViolated$" - }, - { - "test_name_regex": "warm_boot.HwEcmpTrunkTest.TrunkL2ResolveNhopThenLinkDownThenUpThenStateUp$" - }, - { - "test_name_regex": "HwL3Test.*$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest/[01].AclStatDelete$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest/[01].AclStatRename$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest/[01].StatNumberOfCounters$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest.AclStatDelete$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest.AclStatRename$" - }, - { - "test_name_regex": "warm_boot.HwAclStatTest.StatNumberOfCounters$" - }, - { - "test_name_regex": "HwJumboFramesTest.SuperJumboFramesGetDropped$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/1.OneLabel$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/1.MaxLabels$" - }, - { - "test_name_regex": "HwMPLSTest/[0123].Pop2Cpu$" - }, - { - "test_name_regex": "HwMPLSTest/[0123].MplsMatchPktsNottrapped$" - }, - { - "test_name_regex": "HwMPLSTest/[0123].MplsNoMatchPktsToLowPriQ$" - }, - { - "test_name_regex": "HwLabelSwitchRouteTest/[01].EcmpModify$" - }, - { - "test_name_regex": "warm_boot.HwDataPlaneMirrorTest/[01].ErspanMirrorWithLagMember$" - }, - { - "test_name_regex": "HwDataPlaneMirrorTest/[01].TrucatePortErspanMirror$" - }, - { - "test_name_regex": "HwProdInvariantsFswTest.verifyInvariants$" - }, - { - "test_name_regex": "HwProdInvariantsRswMhnicTest.verifyInvariants$" - }, - { - "test_name_regex": "HwAclPriorityTest/[01].AclsChanged$" - }, - { - "test_name_regex": "HwHashPolarizationTest.*$" - }, - { - "test_name_regex": "HwHashTrunk[4|8]x[2|3]PolarizationTests.*$" - }, - { - "test_name_regex": "HwDiagShellStressTest.stressDiagCmds$" - }, - { - "test_name_regex": "HwCoppQueueStuckTest.CpuQueueHighRateTraffic$" - }, - { - "test_name_regex": "HwLabelSwitchRouteTest/[01].Swap2Php$" - }, - { - "test_name_regex": "HwSflowTest.SflowSamplingEnabled$" - }, - { - "test_name_regex": "warm_boot.HwSflowMirrorTest.VerifySampledPacketWithLagMemberAsEgressPort$" - }, - { - "test_name_regex": "HwMPLSTest/0.ExpiringTTL$" - }, - { - "test_name_regex": "HwMPLSTest/1.ExpiringTTL$" - }, - { - "test_name_regex": "HwMPLSTest/2.ExpiringTTL$" - }, - { - "test_name_regex": "HwMPLSTest/3.ExpiringTTL$" - }, - { - "test_name_regex": "HwCoppTest/[01].Ttl1PacketToLowPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].DhcpPacketToMidPriQ$" - }, - { - "test_name_regex": "HwCoppTest/[01].NdpSolicitNeighbor$" - }, - { - "test_name_regex": "HwWatermarkTest.VerifyDeviceWatermark$" - }, - { - "test_name_regex": "warm_boot.HwEcmpTrunkTest.TrunkL2ResolveNhopThenLinkAndLACPDownThenUpBeforeReinit$" - }, - { - "test_name_regex": "HwMPLSTest/[01].AclRedirectToNexthop.*$" - }, - { - "test_name_regex": "HwMPLSTest/[01].punt2Cpu$" - }, - { - "test_name_regex": "HwSflowMirrorTest.VerifySampledPacketCount$" - }, - { - "test_name_regex": "HwHashConsistencyTest.*$" - }, - { - "test_name_regex": "HwPortBandwidthTest/HwPortBandwidthParamTest.VerifyPortRateTraffic/0$" - }, - { - "test_name_regex": "HwNeighborTest/0.LinkDownAndUpOnResolvedEntry$" - }, - { - "test_name_regex": "HwNeighborTest/0.LinkDownOnResolvedEntry$" - }, - { - "test_name_regex": "HwNeighborTest/0.ResolvePendingEntry$" - }, - { - "test_name_regex": "HwNeighborTest/0.ResolvePendingEntryThenChangeLookupClass$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatCreateMultiple$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatShuffle$" - }, - { - "test_name_regex": "HwAclStatTest/[01].AclStatDeleteSharedPostWarmBoot$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatCreateMultiple$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatShuffle$" - }, - { - "test_name_regex": "HwAclStatTest.AclStatDeleteSharedPostWarmBoot$" - }, - { - "test_name_regex": "HwVoqSwitchWithFabricPortsTest.fabricIsolate$" - }, - { - "test_name_regex": "HwCoppAclTest.*$" - }, - { - "test_name_regex": "SaiRouteRollbackTest.*WithTrunk.*$" - }, - { - "test_name_regex": "HwPortLedTest.TestLedFromSwitchState$" - }, - { - "test_name_regex": "HwMacLearningAndNeighborResolutionTest/[0-7].flapMacAndNeighbors$" - }, - { - "test_name_regex": "HwCoppTest/[01].UnresolvedRouteNextHopToLowPriQueue$" - }, - { - "test_name_regex": "HwRouteTest/1.verifyCpuRouteChange$" - }, - { - "test_name_regex": "HwVoqSwitch*" - }, - { - "test_name_regex": "HwFabricSwitchTest.*" - }, - { - "test_name_regex": "HwUdfTest.*$" - }, - { - "test_name_regex": "HwIpInIpTunnelTest.*$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionHwMacLearning$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionSwMacLearning$" - }, - { - "test_name_regex": "HwPacketSendTest.PortTxEnableTest$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest.*$" - }, - { - "test_name_regex": "HwLabelSwitchRouteTest.*$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/0.ExceedMaxLabels$" - }, - { - "test_name_regex": "HwPortBandwidthTest.VerifyQueueShaper$" - }, - { - "test_name_regex": "SaiAclTableRecreateTests.AclEntryCount$" - }, - { - "test_name_regex": "HwCoppTest/[01].CpuPortIpv6LinkLocalUcastIp$" - } - ], "leaba/24.8.3001/24.8.3001/gibraltar": [ { "test_name_regex": "HwTrafficPfcTest.*" @@ -13215,46 +12886,10 @@ "test_name_regex": "HwFabricSwitchTest.*" }, { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionHwMacLearning$" - }, - { - "test_name_regex": "warm_boot.HwMacLearningAndMyStationInteractionTest.verifyInteractionSwMacLearning$" - }, - { - "test_name_regex": "HwWatermarkTest.VerifyQueueWatermarkAccuracy$" - }, - { - "test_name_regex": "HwAqmTest.verifyWredThreshold$" - }, - { - "test_name_regex": "HwPacketSendTest.PortTxEnableTest$" - }, - { - "test_name_regex": "HwAqmTest.verifyPerQueueWredDropStats$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyWRRForOlympicToOlympicV2$" - }, - { - "test_name_regex": "warm_boot.HwOlympicQosSchedulerTest.VerifyOlympicV2AllSPTrafficToWRR$" - }, - { - "test_name_regex": "HwLabelEdgeRouteTest/0.ExceedMaxLabels" - }, - { - "test_name_regex": "HwPortBandwidthTest.VerifyQueueShaper" - }, - { - "test_name_regex": "SaiAclTableRecreateTests.AclEntryCount" - }, - { - "test_name_regex": "HwCoppTest/[01].CpuPortIpv6LinkLocalUcastIp" - }, - { - "test_name_regex": "HwMacLearningTest.VerifyHwLearningForPort" + "test_name_regex": "HwResourceStatsTest.l3Stats$" }, { - "test_name_regex": "HwMacLearningTest.VerifyHwLearningForTrunk" + "test_name_regex": "SaiAclTableRecreateTests.AclEntryCount$" } ] } diff --git a/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON b/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON index 9273d65eb68ad..2c73d7de3af46 100644 --- a/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/darwin.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -176,10 +204,12 @@ "dport_map_port_9": "3", "dport_map_port_92": "20", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON b/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON index 7f772f2542efa..e6867e7dd3744 100644 --- a/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/elbert.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -137,7 +165,7 @@ "config": { }, - "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67231054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27143065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57213064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36740521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64130257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xFC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47301256\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74530261\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36241750\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03426715\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x03\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45132067\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x74\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23764501\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76123054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x90\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41023576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45012367\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123056\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02674153\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x65041273\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57123064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x51674320\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x71\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71305246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03216475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47250361\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23064571\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02136475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x31205746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45762301\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45672310\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x34017625\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64321075\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46572031\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75641302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x01\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10235467\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32015476\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67524310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67451320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x14720563\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x77\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10546723\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51763402\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75641302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47652031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x21\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67103245\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01765423\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x47\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53670421\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32765410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x84\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x33\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67541320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23675410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xEA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14276530\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21576430\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x73462105\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13647502\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30475612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x53746102\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC4\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xF0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21657403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x24351706\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x27064531\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 6\n :\n PC_PHYS_PORT_ID: 11\n ?\n PORT_ID: 7\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 8\n :\n PC_PHYS_PORT_ID: 15\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 21\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 27\n ?\n PORT_ID: 23\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 24\n :\n PC_PHYS_PORT_ID: 31\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 38\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 39\n :\n PC_PHYS_PORT_ID: 43\n ?\n PORT_ID: 40\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 47\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 56\n :\n PC_PHYS_PORT_ID: 59\n ?\n PORT_ID: 57\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 58\n :\n PC_PHYS_PORT_ID: 63\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 72\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 73\n :\n PC_PHYS_PORT_ID: 75\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 79\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 89\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 90\n :\n PC_PHYS_PORT_ID: 91\n ?\n PORT_ID: 91\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 95\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 106\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 107\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 109\n :\n PC_PHYS_PORT_ID: 111\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 123\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 124\n :\n PC_PHYS_PORT_ID: 123\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 126\n :\n PC_PHYS_PORT_ID: 127\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 138\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 139\n :\n PC_PHYS_PORT_ID: 135\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 153\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 147\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 170\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 171\n :\n PC_PHYS_PORT_ID: 163\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 188\n :\n PC_PHYS_PORT_ID: 179\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 204\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 205\n :\n PC_PHYS_PORT_ID: 195\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 221\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 222\n :\n PC_PHYS_PORT_ID: 211\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 238\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 227\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 255\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 256\n :\n PC_PHYS_PORT_ID: 243\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 35\n 2:\n dport_map_port: 36\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 5:\n dport_map_port: 57\n 6:\n dport_map_port: 58\n 7:\n dport_map_port: 27\n 8:\n dport_map_port: 28\n 17:\n dport_map_port: 33\n 18:\n dport_map_port: 34\n 19:\n dport_map_port: 3\n 20:\n dport_map_port: 4\n 21:\n dport_map_port: 59\n 22:\n dport_map_port: 60\n 23:\n dport_map_port: 25\n 24:\n dport_map_port: 26\n 34:\n dport_map_port: 39\n 35:\n dport_map_port: 40\n 36:\n dport_map_port: 5\n 37:\n dport_map_port: 6\n 38:\n dport_map_port: 61\n 39:\n dport_map_port: 62\n 40:\n dport_map_port: 31\n 41:\n dport_map_port: 32\n 51:\n dport_map_port: 37\n 52:\n dport_map_port: 38\n 53:\n dport_map_port: 7\n 54:\n dport_map_port: 8\n 55:\n dport_map_port: 63\n 56:\n dport_map_port: 64\n 57:\n dport_map_port: 29\n 58:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 72:\n dport_map_port: 49\n 73:\n dport_map_port: 50\n 74:\n dport_map_port: 43\n 75:\n dport_map_port: 44\n 85:\n dport_map_port: 17\n 86:\n dport_map_port: 18\n 87:\n dport_map_port: 11\n 88:\n dport_map_port: 12\n 89:\n dport_map_port: 41\n 90:\n dport_map_port: 42\n 91:\n dport_map_port: 51\n 92:\n dport_map_port: 52\n 102:\n dport_map_port: 23\n 103:\n dport_map_port: 24\n 104:\n dport_map_port: 47\n 105:\n dport_map_port: 48\n 106:\n dport_map_port: 53\n 107:\n dport_map_port: 54\n 108:\n dport_map_port: 13\n 109:\n dport_map_port: 14\n 119:\n dport_map_port: 21\n 120:\n dport_map_port: 22\n 121:\n dport_map_port: 45\n 122:\n dport_map_port: 46\n 123:\n dport_map_port: 55\n 124:\n dport_map_port: 56\n 125:\n dport_map_port: 15\n 126:\n dport_map_port: 16\n 136:\n dport_map_port: 71\n 137:\n dport_map_port: 72\n 138:\n dport_map_port: 127\n 139:\n dport_map_port: 128\n 140:\n dport_map_port: 93\n 141:\n dport_map_port: 94\n 142:\n dport_map_port: 101\n 143:\n dport_map_port: 102\n 153:\n dport_map_port: 125\n 154:\n dport_map_port: 126\n 155:\n dport_map_port: 69\n 156:\n dport_map_port: 70\n 157:\n dport_map_port: 95\n 158:\n dport_map_port: 96\n 159:\n dport_map_port: 103\n 160:\n dport_map_port: 104\n 170:\n dport_map_port: 67\n 171:\n dport_map_port: 68\n 172:\n dport_map_port: 89\n 173:\n dport_map_port: 90\n 174:\n dport_map_port: 123\n 175:\n dport_map_port: 124\n 176:\n dport_map_port: 97\n 177:\n dport_map_port: 98\n 187:\n dport_map_port: 91\n 188:\n dport_map_port: 92\n 189:\n dport_map_port: 65\n 190:\n dport_map_port: 66\n 191:\n dport_map_port: 99\n 192:\n dport_map_port: 100\n 193:\n dport_map_port: 121\n 194:\n dport_map_port: 122\n 204:\n dport_map_port: 109\n 205:\n dport_map_port: 110\n 206:\n dport_map_port: 79\n 207:\n dport_map_port: 80\n 208:\n dport_map_port: 119\n 209:\n dport_map_port: 120\n 210:\n dport_map_port: 85\n 211:\n dport_map_port: 86\n 221:\n dport_map_port: 111\n 222:\n dport_map_port: 112\n 223:\n dport_map_port: 77\n 224:\n dport_map_port: 78\n 225:\n dport_map_port: 117\n 226:\n dport_map_port: 118\n 227:\n dport_map_port: 87\n 228:\n dport_map_port: 88\n 238:\n dport_map_port: 105\n 239:\n dport_map_port: 106\n 240:\n dport_map_port: 75\n 241:\n dport_map_port: 76\n 242:\n dport_map_port: 115\n 243:\n dport_map_port: 116\n 244:\n dport_map_port: 81\n 245:\n dport_map_port: 82\n 255:\n dport_map_port: 107\n 256:\n dport_map_port: 108\n 257:\n dport_map_port: 73\n 258:\n dport_map_port: 74\n 259:\n dport_map_port: 113\n 260:\n dport_map_port: 114\n 261:\n dport_map_port: 83\n 262:\n dport_map_port: 84\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" + "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67231054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27143065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57213064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36740521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64130257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xFC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47301256\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74530261\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xEC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x36241750\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03426715\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x03\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45132067\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x74\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23764501\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76123054\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x90\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41023576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45012367\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32017645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123056\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02674153\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x65041273\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB4\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57123064\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21576403\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47123065\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x51674320\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x71\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71305246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x03216475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54671023\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54763210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xC1\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75023146\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x38\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21745603\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47250361\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23064571\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02136475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x31205746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45762301\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45672310\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x34017625\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x31027654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10236745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x43\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x01\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12653740\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64321075\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x20\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46572031\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75641302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x01\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10235467\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32015476\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x38\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67524310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67451320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x14720563\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x77\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45013276\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x10546723\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51763402\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x41763502\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x67512043\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x30\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x2B\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75641302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x47652031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x21\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x9F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01324576\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23014567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD3\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67103245\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01765423\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x47\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74210356\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x02754631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x3D\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53670421\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32765410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x84\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x33\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67541320\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67542310\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01457632\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23675410\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xEA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x34\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14276530\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21576430\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57210364\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x25\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x73462105\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13647502\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x4C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30475612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x53746102\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC4\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xF0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21657403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x24351706\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x71046523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x27064531\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 6\n :\n PC_PHYS_PORT_ID: 11\n ?\n PORT_ID: 7\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 8\n :\n PC_PHYS_PORT_ID: 15\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 21\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 27\n ?\n PORT_ID: 23\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 24\n :\n PC_PHYS_PORT_ID: 31\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 38\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 39\n :\n PC_PHYS_PORT_ID: 43\n ?\n PORT_ID: 40\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 47\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 56\n :\n PC_PHYS_PORT_ID: 59\n ?\n PORT_ID: 57\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 58\n :\n PC_PHYS_PORT_ID: 63\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 72\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 73\n :\n PC_PHYS_PORT_ID: 75\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 79\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 89\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 90\n :\n PC_PHYS_PORT_ID: 91\n ?\n PORT_ID: 91\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 95\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 106\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 107\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 109\n :\n PC_PHYS_PORT_ID: 111\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 123\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 124\n :\n PC_PHYS_PORT_ID: 123\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 126\n :\n PC_PHYS_PORT_ID: 127\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 138\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 139\n :\n PC_PHYS_PORT_ID: 135\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 153\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 147\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 170\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 171\n :\n PC_PHYS_PORT_ID: 163\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 188\n :\n PC_PHYS_PORT_ID: 179\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 204\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 205\n :\n PC_PHYS_PORT_ID: 195\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 221\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 222\n :\n PC_PHYS_PORT_ID: 211\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 238\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 227\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 255\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 256\n :\n PC_PHYS_PORT_ID: 243\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n l3_max_ecmp_mode: 1\n host_as_route_disable: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 35\n 2:\n dport_map_port: 36\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 5:\n dport_map_port: 57\n 6:\n dport_map_port: 58\n 7:\n dport_map_port: 27\n 8:\n dport_map_port: 28\n 17:\n dport_map_port: 33\n 18:\n dport_map_port: 34\n 19:\n dport_map_port: 3\n 20:\n dport_map_port: 4\n 21:\n dport_map_port: 59\n 22:\n dport_map_port: 60\n 23:\n dport_map_port: 25\n 24:\n dport_map_port: 26\n 34:\n dport_map_port: 39\n 35:\n dport_map_port: 40\n 36:\n dport_map_port: 5\n 37:\n dport_map_port: 6\n 38:\n dport_map_port: 61\n 39:\n dport_map_port: 62\n 40:\n dport_map_port: 31\n 41:\n dport_map_port: 32\n 51:\n dport_map_port: 37\n 52:\n dport_map_port: 38\n 53:\n dport_map_port: 7\n 54:\n dport_map_port: 8\n 55:\n dport_map_port: 63\n 56:\n dport_map_port: 64\n 57:\n dport_map_port: 29\n 58:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 72:\n dport_map_port: 49\n 73:\n dport_map_port: 50\n 74:\n dport_map_port: 43\n 75:\n dport_map_port: 44\n 85:\n dport_map_port: 17\n 86:\n dport_map_port: 18\n 87:\n dport_map_port: 11\n 88:\n dport_map_port: 12\n 89:\n dport_map_port: 41\n 90:\n dport_map_port: 42\n 91:\n dport_map_port: 51\n 92:\n dport_map_port: 52\n 102:\n dport_map_port: 23\n 103:\n dport_map_port: 24\n 104:\n dport_map_port: 47\n 105:\n dport_map_port: 48\n 106:\n dport_map_port: 53\n 107:\n dport_map_port: 54\n 108:\n dport_map_port: 13\n 109:\n dport_map_port: 14\n 119:\n dport_map_port: 21\n 120:\n dport_map_port: 22\n 121:\n dport_map_port: 45\n 122:\n dport_map_port: 46\n 123:\n dport_map_port: 55\n 124:\n dport_map_port: 56\n 125:\n dport_map_port: 15\n 126:\n dport_map_port: 16\n 136:\n dport_map_port: 71\n 137:\n dport_map_port: 72\n 138:\n dport_map_port: 127\n 139:\n dport_map_port: 128\n 140:\n dport_map_port: 93\n 141:\n dport_map_port: 94\n 142:\n dport_map_port: 101\n 143:\n dport_map_port: 102\n 153:\n dport_map_port: 125\n 154:\n dport_map_port: 126\n 155:\n dport_map_port: 69\n 156:\n dport_map_port: 70\n 157:\n dport_map_port: 95\n 158:\n dport_map_port: 96\n 159:\n dport_map_port: 103\n 160:\n dport_map_port: 104\n 170:\n dport_map_port: 67\n 171:\n dport_map_port: 68\n 172:\n dport_map_port: 89\n 173:\n dport_map_port: 90\n 174:\n dport_map_port: 123\n 175:\n dport_map_port: 124\n 176:\n dport_map_port: 97\n 177:\n dport_map_port: 98\n 187:\n dport_map_port: 91\n 188:\n dport_map_port: 92\n 189:\n dport_map_port: 65\n 190:\n dport_map_port: 66\n 191:\n dport_map_port: 99\n 192:\n dport_map_port: 100\n 193:\n dport_map_port: 121\n 194:\n dport_map_port: 122\n 204:\n dport_map_port: 109\n 205:\n dport_map_port: 110\n 206:\n dport_map_port: 79\n 207:\n dport_map_port: 80\n 208:\n dport_map_port: 119\n 209:\n dport_map_port: 120\n 210:\n dport_map_port: 85\n 211:\n dport_map_port: 86\n 221:\n dport_map_port: 111\n 222:\n dport_map_port: 112\n 223:\n dport_map_port: 77\n 224:\n dport_map_port: 78\n 225:\n dport_map_port: 117\n 226:\n dport_map_port: 118\n 227:\n dport_map_port: 87\n 228:\n dport_map_port: 88\n 238:\n dport_map_port: 105\n 239:\n dport_map_port: 106\n 240:\n dport_map_port: 75\n 241:\n dport_map_port: 76\n 242:\n dport_map_port: 115\n 243:\n dport_map_port: 116\n 244:\n dport_map_port: 81\n 245:\n dport_map_port: 82\n 255:\n dport_map_port: 107\n 256:\n dport_map_port: 108\n 257:\n dport_map_port: 73\n 258:\n dport_map_port: 74\n 259:\n dport_map_port: 113\n 260:\n dport_map_port: 114\n 261:\n dport_map_port: 83\n 262:\n dport_map_port: 84\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 8], [17, 24], [34, 41], [51, 58], [68, 75], [85, 92], [102,\n 109], [119, 126], [136, 143], [153, 160], [170, 177], [187, 194], [204, 211],\n [221, 228], [238, 245], [255, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" } } } diff --git a/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON b/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON index 1820b2c5819a7..807b72041ee14 100644 --- a/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/fuji.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -137,7 +165,7 @@ "config": { }, - "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20314657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57463021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305746\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20317654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74652130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47561203\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x07\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30217564\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03127465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650321\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30126574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65743021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75640312\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01234567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75643012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14036572\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74560312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13027546\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x70\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x50\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75642031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63751042\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56470312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x24\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 27\n 2:\n dport_map_port: 28\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 17:\n dport_map_port: 3\n 18:\n dport_map_port: 4\n 19:\n dport_map_port: 25\n 20:\n dport_map_port: 26\n 34:\n dport_map_port: 5\n 35:\n dport_map_port: 6\n 36:\n dport_map_port: 31\n 37:\n dport_map_port: 32\n 51:\n dport_map_port: 7\n 52:\n dport_map_port: 8\n 53:\n dport_map_port: 29\n 54:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 85:\n dport_map_port: 11\n 86:\n dport_map_port: 12\n 87:\n dport_map_port: 17\n 88:\n dport_map_port: 18\n 102:\n dport_map_port: 13\n 103:\n dport_map_port: 14\n 104:\n dport_map_port: 23\n 105:\n dport_map_port: 24\n 119:\n dport_map_port: 15\n 120:\n dport_map_port: 16\n 121:\n dport_map_port: 21\n 122:\n dport_map_port: 22\n 136:\n dport_map_port: 45\n 137:\n dport_map_port: 46\n 140:\n dport_map_port: 53\n 141:\n dport_map_port: 54\n 142:\n dport_map_port: 79\n 143:\n dport_map_port: 80\n 155:\n dport_map_port: 47\n 156:\n dport_map_port: 48\n 157:\n dport_map_port: 55\n 158:\n dport_map_port: 56\n 159:\n dport_map_port: 77\n 160:\n dport_map_port: 78\n 172:\n dport_map_port: 41\n 173:\n dport_map_port: 42\n 174:\n dport_map_port: 49\n 175:\n dport_map_port: 50\n 176:\n dport_map_port: 75\n 177:\n dport_map_port: 76\n 189:\n dport_map_port: 43\n 190:\n dport_map_port: 44\n 191:\n dport_map_port: 51\n 192:\n dport_map_port: 52\n 193:\n dport_map_port: 73\n 194:\n dport_map_port: 74\n 206:\n dport_map_port: 37\n 207:\n dport_map_port: 38\n 208:\n dport_map_port: 61\n 209:\n dport_map_port: 62\n 210:\n dport_map_port: 71\n 211:\n dport_map_port: 72\n 223:\n dport_map_port: 39\n 224:\n dport_map_port: 40\n 225:\n dport_map_port: 63\n 226:\n dport_map_port: 64\n 227:\n dport_map_port: 69\n 228:\n dport_map_port: 70\n 240:\n dport_map_port: 33\n 241:\n dport_map_port: 34\n 242:\n dport_map_port: 57\n 243:\n dport_map_port: 58\n 244:\n dport_map_port: 67\n 245:\n dport_map_port: 68\n 257:\n dport_map_port: 35\n 258:\n dport_map_port: 36\n 259:\n dport_map_port: 65\n 260:\n dport_map_port: 66\n 261:\n dport_map_port: 59\n 262:\n dport_map_port: 60\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" + "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12475630\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20314657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57463021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305746\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20317654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74652130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47561203\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x07\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30217564\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x1F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03127465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20315746\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650321\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x7F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30126574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12307465\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57462031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0E\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65743021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA8\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75640312\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5C\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01234567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75643012\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75643021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14036572\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74560312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x76540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x45673210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0E\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xE0\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x64751302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xDA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21305647\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13027546\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32104567\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540132\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x70\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x7A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01237654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x01237654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x27563041\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x46573021\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x50\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45673210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32104567\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x1F\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036574\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x75642031\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47563021\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x12036475\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12034657\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x5A\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x05\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63751042\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x57461302\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x5A\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56470312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA5\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74650312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20316475\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xA5\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x24\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67540123\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76540123\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xE0\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 2\n :\n PC_PHYS_PORT_ID: 3\n ?\n PORT_ID: 3\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 4\n :\n PC_PHYS_PORT_ID: 7\n ?\n PORT_ID: 17\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 18\n :\n PC_PHYS_PORT_ID: 19\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 23\n ?\n PORT_ID: 34\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 35\n :\n PC_PHYS_PORT_ID: 35\n ?\n PORT_ID: 36\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 39\n ?\n PORT_ID: 51\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 51\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 54\n :\n PC_PHYS_PORT_ID: 55\n ?\n PORT_ID: 68\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 69\n :\n PC_PHYS_PORT_ID: 67\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 71\n :\n PC_PHYS_PORT_ID: 71\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 83\n ?\n PORT_ID: 87\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 87\n ?\n PORT_ID: 102\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 99\n ?\n PORT_ID: 104\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 105\n :\n PC_PHYS_PORT_ID: 103\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 120\n :\n PC_PHYS_PORT_ID: 115\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 122\n :\n PC_PHYS_PORT_ID: 119\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 137\n :\n PC_PHYS_PORT_ID: 131\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 139\n ?\n PORT_ID: 142\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 143\n ?\n PORT_ID: 155\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 156\n :\n PC_PHYS_PORT_ID: 151\n ?\n PORT_ID: 157\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 155\n ?\n PORT_ID: 159\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 160\n :\n PC_PHYS_PORT_ID: 159\n ?\n PORT_ID: 172\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 167\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 175\n :\n PC_PHYS_PORT_ID: 171\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 177\n :\n PC_PHYS_PORT_ID: 175\n ?\n PORT_ID: 189\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 190\n :\n PC_PHYS_PORT_ID: 183\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 192\n :\n PC_PHYS_PORT_ID: 187\n ?\n PORT_ID: 193\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 194\n :\n PC_PHYS_PORT_ID: 191\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 199\n ?\n PORT_ID: 208\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 203\n ?\n PORT_ID: 210\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 211\n :\n PC_PHYS_PORT_ID: 207\n ?\n PORT_ID: 223\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 215\n ?\n PORT_ID: 225\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 226\n :\n PC_PHYS_PORT_ID: 219\n ?\n PORT_ID: 227\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 223\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 241\n :\n PC_PHYS_PORT_ID: 231\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 243\n :\n PC_PHYS_PORT_ID: 235\n ?\n PORT_ID: 244\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 245\n :\n PC_PHYS_PORT_ID: 239\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 258\n :\n PC_PHYS_PORT_ID: 247\n ?\n PORT_ID: 259\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 260\n :\n PC_PHYS_PORT_ID: 251\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 255\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n ENABLE: 0\n SPEED: 200000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n l3_max_ecmp_mode: 1\n host_as_route_disable: 1\n sai_uncached_port_stats: 0x1\n...\n---\nbcm_device:\n 0:\n port:\n 1:\n dport_map_port: 27\n 2:\n dport_map_port: 28\n 3:\n dport_map_port: 1\n 4:\n dport_map_port: 2\n 17:\n dport_map_port: 3\n 18:\n dport_map_port: 4\n 19:\n dport_map_port: 25\n 20:\n dport_map_port: 26\n 34:\n dport_map_port: 5\n 35:\n dport_map_port: 6\n 36:\n dport_map_port: 31\n 37:\n dport_map_port: 32\n 51:\n dport_map_port: 7\n 52:\n dport_map_port: 8\n 53:\n dport_map_port: 29\n 54:\n dport_map_port: 30\n 68:\n dport_map_port: 9\n 69:\n dport_map_port: 10\n 70:\n dport_map_port: 19\n 71:\n dport_map_port: 20\n 85:\n dport_map_port: 11\n 86:\n dport_map_port: 12\n 87:\n dport_map_port: 17\n 88:\n dport_map_port: 18\n 102:\n dport_map_port: 13\n 103:\n dport_map_port: 14\n 104:\n dport_map_port: 23\n 105:\n dport_map_port: 24\n 119:\n dport_map_port: 15\n 120:\n dport_map_port: 16\n 121:\n dport_map_port: 21\n 122:\n dport_map_port: 22\n 136:\n dport_map_port: 45\n 137:\n dport_map_port: 46\n 140:\n dport_map_port: 53\n 141:\n dport_map_port: 54\n 142:\n dport_map_port: 79\n 143:\n dport_map_port: 80\n 155:\n dport_map_port: 47\n 156:\n dport_map_port: 48\n 157:\n dport_map_port: 55\n 158:\n dport_map_port: 56\n 159:\n dport_map_port: 77\n 160:\n dport_map_port: 78\n 172:\n dport_map_port: 41\n 173:\n dport_map_port: 42\n 174:\n dport_map_port: 49\n 175:\n dport_map_port: 50\n 176:\n dport_map_port: 75\n 177:\n dport_map_port: 76\n 189:\n dport_map_port: 43\n 190:\n dport_map_port: 44\n 191:\n dport_map_port: 51\n 192:\n dport_map_port: 52\n 193:\n dport_map_port: 73\n 194:\n dport_map_port: 74\n 206:\n dport_map_port: 37\n 207:\n dport_map_port: 38\n 208:\n dport_map_port: 61\n 209:\n dport_map_port: 62\n 210:\n dport_map_port: 71\n 211:\n dport_map_port: 72\n 223:\n dport_map_port: 39\n 224:\n dport_map_port: 40\n 225:\n dport_map_port: 63\n 226:\n dport_map_port: 64\n 227:\n dport_map_port: 69\n 228:\n dport_map_port: 70\n 240:\n dport_map_port: 33\n 241:\n dport_map_port: 34\n 242:\n dport_map_port: 57\n 243:\n dport_map_port: 58\n 244:\n dport_map_port: 67\n 245:\n dport_map_port: 68\n 257:\n dport_map_port: 35\n 258:\n dport_map_port: 36\n 259:\n dport_map_port: 65\n 260:\n dport_map_port: 66\n 261:\n dport_map_port: 59\n 262:\n dport_map_port: 60\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 4], [17, 20], [34, 37], [51, 54], [68, 71], [85, 88], [102,\n 105], [119, 122], [136, 137], [140, 143], [155, 160], [172, 177], [189, 194],\n [206, 211], [223, 228], [240, 245], [257, 262]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" } } } diff --git a/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON b/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON index d5ce99b104e85..98c79b0b0d64e 100644 --- a/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/galaxy_fc.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -268,6 +296,7 @@ "dport_map_port_97": "50", "dport_map_port_98": "51", "dport_map_port_99": "52", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON b/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON index f8456f29bf48c..129243407c929 100644 --- a/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/galaxy_lc_left.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -268,6 +296,7 @@ "dport_map_port_97": "14", "dport_map_port_98": "15", "dport_map_port_99": "16", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON b/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON index eff31c3f66e5f..d3fdbec16ac25 100644 --- a/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/galaxy_lc_right.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -268,6 +296,7 @@ "dport_map_port_97": "14", "dport_map_port_98": "15", "dport_map_port_99": "16", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON index 54b5d47174c4f..c9751a5d4d91d 100644 --- a/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru400bfu.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "mode": "meru400bfu", "skip_transceiver_programming": "true" @@ -47,6 +48,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -103,7 +105,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -127,6 +129,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, diff --git a/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON index 5e47d7169ff6d..1469581dee81c 100644 --- a/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru400biu.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "intf_nbr_tables": "true", "log_variable_name": "true", "mode": "meru400biu", @@ -60,6 +61,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -116,7 +118,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -131,10 +133,21 @@ }, "systemPortRange": { "minimum": 10, - "maximum": 30 + "maximum": 29 }, "switchMac": "02:00:00:00:00:01", - "connectionHandle": "68:00" + "connectionHandle": "68:00", + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 29 + } + ] + }, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "inbandPortId": 1 } }, "vendorMacOuis": [ @@ -145,6 +158,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { "0": { "name": "intfNode0", @@ -155,11 +194,22 @@ ], "systemPortRange": { "minimum": 10, - "maximum": 30 + "maximum": 29 }, "nodeMac": "02:00:00:00:0F:0B", "asicType": 11, - "platformType": 18 + "platformType": 18, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 29 + } + ] + }, + "inbandPortId": 1 } }, "defaultVoqConfig": [ diff --git a/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON index f12801bfe3d0a..cda6eee853def 100644 --- a/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru800bfa.agent.materialized_JSON @@ -47,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -103,7 +104,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -137,6 +138,10 @@ ], "needL2EntryForNeighbor": true }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -202,36 +207,36 @@ "lane_to_serdes_map_fabric_lane0.BCM8892X": "rx4:tx5", "lane_to_serdes_map_fabric_lane1.BCM8892X": "rx5:tx4", "lane_to_serdes_map_fabric_lane10.BCM8892X": "rx18:tx18", - "lane_to_serdes_map_fabric_lane100.BCM8892X": "rx200:tx207", - "lane_to_serdes_map_fabric_lane101.BCM8892X": "rx201:tx204", + "lane_to_serdes_map_fabric_lane100.BCM8892X": "rx204:tx203", + "lane_to_serdes_map_fabric_lane101.BCM8892X": "rx205:tx200", "lane_to_serdes_map_fabric_lane102.BCM8892X": "rx202:tx205", "lane_to_serdes_map_fabric_lane103.BCM8892X": "rx203:tx206", - "lane_to_serdes_map_fabric_lane104.BCM8892X": "rx208:tx212", - "lane_to_serdes_map_fabric_lane105.BCM8892X": "rx209:tx213", + "lane_to_serdes_map_fabric_lane104.BCM8892X": "rx212:tx208", + "lane_to_serdes_map_fabric_lane105.BCM8892X": "rx213:tx209", "lane_to_serdes_map_fabric_lane106.BCM8892X": "rx210:tx214", "lane_to_serdes_map_fabric_lane107.BCM8892X": "rx211:tx215", - "lane_to_serdes_map_fabric_lane108.BCM8892X": "rx216:tx220", - "lane_to_serdes_map_fabric_lane109.BCM8892X": "rx217:tx221", + "lane_to_serdes_map_fabric_lane108.BCM8892X": "rx220:tx216", + "lane_to_serdes_map_fabric_lane109.BCM8892X": "rx221:tx217", "lane_to_serdes_map_fabric_lane11.BCM8892X": "rx19:tx19", "lane_to_serdes_map_fabric_lane110.BCM8892X": "rx218:tx222", "lane_to_serdes_map_fabric_lane111.BCM8892X": "rx219:tx223", - "lane_to_serdes_map_fabric_lane112.BCM8892X": "rx224:tx225", - "lane_to_serdes_map_fabric_lane113.BCM8892X": "rx225:tx224", - "lane_to_serdes_map_fabric_lane114.BCM8892X": "rx230:tx231", - "lane_to_serdes_map_fabric_lane115.BCM8892X": "rx231:tx230", - "lane_to_serdes_map_fabric_lane116.BCM8892X": "rx236:tx237", - "lane_to_serdes_map_fabric_lane117.BCM8892X": "rx237:tx236", - "lane_to_serdes_map_fabric_lane118.BCM8892X": "rx234:tx235", - "lane_to_serdes_map_fabric_lane119.BCM8892X": "rx235:tx234", + "lane_to_serdes_map_fabric_lane112.BCM8892X": "rx228:tx229", + "lane_to_serdes_map_fabric_lane113.BCM8892X": "rx229:tx228", + "lane_to_serdes_map_fabric_lane114.BCM8892X": "rx226:tx227", + "lane_to_serdes_map_fabric_lane115.BCM8892X": "rx227:tx226", + "lane_to_serdes_map_fabric_lane116.BCM8892X": "rx232:tx233", + "lane_to_serdes_map_fabric_lane117.BCM8892X": "rx233:tx232", + "lane_to_serdes_map_fabric_lane118.BCM8892X": "rx238:tx239", + "lane_to_serdes_map_fabric_lane119.BCM8892X": "rx239:tx238", "lane_to_serdes_map_fabric_lane12.BCM8892X": "rx24:tx24", - "lane_to_serdes_map_fabric_lane120.BCM8892X": "rx240:tx240", - "lane_to_serdes_map_fabric_lane121.BCM8892X": "rx241:tx241", - "lane_to_serdes_map_fabric_lane122.BCM8892X": "rx246:tx246", - "lane_to_serdes_map_fabric_lane123.BCM8892X": "rx247:tx247", - "lane_to_serdes_map_fabric_lane124.BCM8892X": "rx252:tx252", - "lane_to_serdes_map_fabric_lane125.BCM8892X": "rx253:tx253", - "lane_to_serdes_map_fabric_lane126.BCM8892X": "rx250:tx250", - "lane_to_serdes_map_fabric_lane127.BCM8892X": "rx251:tx251", + "lane_to_serdes_map_fabric_lane120.BCM8892X": "rx244:tx244", + "lane_to_serdes_map_fabric_lane121.BCM8892X": "rx245:tx245", + "lane_to_serdes_map_fabric_lane122.BCM8892X": "rx242:tx242", + "lane_to_serdes_map_fabric_lane123.BCM8892X": "rx243:tx243", + "lane_to_serdes_map_fabric_lane124.BCM8892X": "rx248:tx248", + "lane_to_serdes_map_fabric_lane125.BCM8892X": "rx249:tx249", + "lane_to_serdes_map_fabric_lane126.BCM8892X": "rx254:tx254", + "lane_to_serdes_map_fabric_lane127.BCM8892X": "rx255:tx255", "lane_to_serdes_map_fabric_lane128.BCM8892X": "rx256:tx257", "lane_to_serdes_map_fabric_lane129.BCM8892X": "rx257:tx256", "lane_to_serdes_map_fabric_lane13.BCM8892X": "rx25:tx25", @@ -252,133 +257,133 @@ "lane_to_serdes_map_fabric_lane143.BCM8892X": "rx283:tx283", "lane_to_serdes_map_fabric_lane144.BCM8892X": "rx288:tx295", "lane_to_serdes_map_fabric_lane145.BCM8892X": "rx289:tx292", - "lane_to_serdes_map_fabric_lane146.BCM8892X": "rx290:tx293", - "lane_to_serdes_map_fabric_lane147.BCM8892X": "rx291:tx294", + "lane_to_serdes_map_fabric_lane146.BCM8892X": "rx294:tx289", + "lane_to_serdes_map_fabric_lane147.BCM8892X": "rx295:tx290", "lane_to_serdes_map_fabric_lane148.BCM8892X": "rx296:tx303", "lane_to_serdes_map_fabric_lane149.BCM8892X": "rx297:tx300", "lane_to_serdes_map_fabric_lane15.BCM8892X": "rx31:tx31", - "lane_to_serdes_map_fabric_lane150.BCM8892X": "rx298:tx301", - "lane_to_serdes_map_fabric_lane151.BCM8892X": "rx299:tx302", + "lane_to_serdes_map_fabric_lane150.BCM8892X": "rx302:tx297", + "lane_to_serdes_map_fabric_lane151.BCM8892X": "rx303:tx298", "lane_to_serdes_map_fabric_lane152.BCM8892X": "rx304:tx308", "lane_to_serdes_map_fabric_lane153.BCM8892X": "rx305:tx309", - "lane_to_serdes_map_fabric_lane154.BCM8892X": "rx306:tx310", - "lane_to_serdes_map_fabric_lane155.BCM8892X": "rx307:tx311", + "lane_to_serdes_map_fabric_lane154.BCM8892X": "rx310:tx306", + "lane_to_serdes_map_fabric_lane155.BCM8892X": "rx311:tx307", "lane_to_serdes_map_fabric_lane156.BCM8892X": "rx312:tx316", "lane_to_serdes_map_fabric_lane157.BCM8892X": "rx313:tx317", - "lane_to_serdes_map_fabric_lane158.BCM8892X": "rx314:tx318", - "lane_to_serdes_map_fabric_lane159.BCM8892X": "rx315:tx319", + "lane_to_serdes_map_fabric_lane158.BCM8892X": "rx318:tx314", + "lane_to_serdes_map_fabric_lane159.BCM8892X": "rx319:tx315", "lane_to_serdes_map_fabric_lane16.BCM8892X": "rx36:tx39", "lane_to_serdes_map_fabric_lane160.BCM8892X": "rx320:tx327", "lane_to_serdes_map_fabric_lane161.BCM8892X": "rx321:tx324", - "lane_to_serdes_map_fabric_lane162.BCM8892X": "rx322:tx325", - "lane_to_serdes_map_fabric_lane163.BCM8892X": "rx323:tx326", + "lane_to_serdes_map_fabric_lane162.BCM8892X": "rx326:tx321", + "lane_to_serdes_map_fabric_lane163.BCM8892X": "rx327:tx322", "lane_to_serdes_map_fabric_lane164.BCM8892X": "rx328:tx335", "lane_to_serdes_map_fabric_lane165.BCM8892X": "rx329:tx332", - "lane_to_serdes_map_fabric_lane166.BCM8892X": "rx330:tx333", - "lane_to_serdes_map_fabric_lane167.BCM8892X": "rx331:tx334", + "lane_to_serdes_map_fabric_lane166.BCM8892X": "rx334:tx329", + "lane_to_serdes_map_fabric_lane167.BCM8892X": "rx335:tx330", "lane_to_serdes_map_fabric_lane168.BCM8892X": "rx336:tx340", "lane_to_serdes_map_fabric_lane169.BCM8892X": "rx337:tx341", "lane_to_serdes_map_fabric_lane17.BCM8892X": "rx37:tx36", - "lane_to_serdes_map_fabric_lane170.BCM8892X": "rx338:tx342", - "lane_to_serdes_map_fabric_lane171.BCM8892X": "rx339:tx343", + "lane_to_serdes_map_fabric_lane170.BCM8892X": "rx342:tx338", + "lane_to_serdes_map_fabric_lane171.BCM8892X": "rx343:tx339", "lane_to_serdes_map_fabric_lane172.BCM8892X": "rx344:tx348", "lane_to_serdes_map_fabric_lane173.BCM8892X": "rx345:tx349", - "lane_to_serdes_map_fabric_lane174.BCM8892X": "rx346:tx350", - "lane_to_serdes_map_fabric_lane175.BCM8892X": "rx347:tx351", + "lane_to_serdes_map_fabric_lane174.BCM8892X": "rx350:tx346", + "lane_to_serdes_map_fabric_lane175.BCM8892X": "rx351:tx347", "lane_to_serdes_map_fabric_lane176.BCM8892X": "rx352:tx359", "lane_to_serdes_map_fabric_lane177.BCM8892X": "rx353:tx356", - "lane_to_serdes_map_fabric_lane178.BCM8892X": "rx354:tx357", - "lane_to_serdes_map_fabric_lane179.BCM8892X": "rx355:tx358", - "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx38:tx37", + "lane_to_serdes_map_fabric_lane178.BCM8892X": "rx358:tx353", + "lane_to_serdes_map_fabric_lane179.BCM8892X": "rx359:tx354", + "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx34:tx33", "lane_to_serdes_map_fabric_lane180.BCM8892X": "rx360:tx367", "lane_to_serdes_map_fabric_lane181.BCM8892X": "rx361:tx364", - "lane_to_serdes_map_fabric_lane182.BCM8892X": "rx362:tx365", - "lane_to_serdes_map_fabric_lane183.BCM8892X": "rx363:tx366", + "lane_to_serdes_map_fabric_lane182.BCM8892X": "rx366:tx361", + "lane_to_serdes_map_fabric_lane183.BCM8892X": "rx367:tx362", "lane_to_serdes_map_fabric_lane184.BCM8892X": "rx368:tx372", "lane_to_serdes_map_fabric_lane185.BCM8892X": "rx369:tx373", - "lane_to_serdes_map_fabric_lane186.BCM8892X": "rx370:tx374", - "lane_to_serdes_map_fabric_lane187.BCM8892X": "rx371:tx375", + "lane_to_serdes_map_fabric_lane186.BCM8892X": "rx374:tx370", + "lane_to_serdes_map_fabric_lane187.BCM8892X": "rx375:tx371", "lane_to_serdes_map_fabric_lane188.BCM8892X": "rx376:tx380", "lane_to_serdes_map_fabric_lane189.BCM8892X": "rx377:tx381", - "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx39:tx38", - "lane_to_serdes_map_fabric_lane190.BCM8892X": "rx378:tx382", - "lane_to_serdes_map_fabric_lane191.BCM8892X": "rx379:tx383", - "lane_to_serdes_map_fabric_lane192.BCM8892X": "rx384:tx391", - "lane_to_serdes_map_fabric_lane193.BCM8892X": "rx385:tx388", + "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx35:tx34", + "lane_to_serdes_map_fabric_lane190.BCM8892X": "rx382:tx378", + "lane_to_serdes_map_fabric_lane191.BCM8892X": "rx383:tx379", + "lane_to_serdes_map_fabric_lane192.BCM8892X": "rx388:tx387", + "lane_to_serdes_map_fabric_lane193.BCM8892X": "rx389:tx384", "lane_to_serdes_map_fabric_lane194.BCM8892X": "rx386:tx389", "lane_to_serdes_map_fabric_lane195.BCM8892X": "rx387:tx390", - "lane_to_serdes_map_fabric_lane196.BCM8892X": "rx392:tx399", - "lane_to_serdes_map_fabric_lane197.BCM8892X": "rx393:tx396", + "lane_to_serdes_map_fabric_lane196.BCM8892X": "rx396:tx395", + "lane_to_serdes_map_fabric_lane197.BCM8892X": "rx397:tx392", "lane_to_serdes_map_fabric_lane198.BCM8892X": "rx394:tx397", "lane_to_serdes_map_fabric_lane199.BCM8892X": "rx395:tx398", "lane_to_serdes_map_fabric_lane2.BCM8892X": "rx2:tx3", "lane_to_serdes_map_fabric_lane20.BCM8892X": "rx40:tx47", - "lane_to_serdes_map_fabric_lane200.BCM8892X": "rx400:tx404", - "lane_to_serdes_map_fabric_lane201.BCM8892X": "rx401:tx405", + "lane_to_serdes_map_fabric_lane200.BCM8892X": "rx404:tx400", + "lane_to_serdes_map_fabric_lane201.BCM8892X": "rx405:tx401", "lane_to_serdes_map_fabric_lane202.BCM8892X": "rx402:tx406", "lane_to_serdes_map_fabric_lane203.BCM8892X": "rx403:tx407", - "lane_to_serdes_map_fabric_lane204.BCM8892X": "rx408:tx412", - "lane_to_serdes_map_fabric_lane205.BCM8892X": "rx409:tx413", + "lane_to_serdes_map_fabric_lane204.BCM8892X": "rx412:tx408", + "lane_to_serdes_map_fabric_lane205.BCM8892X": "rx413:tx409", "lane_to_serdes_map_fabric_lane206.BCM8892X": "rx410:tx414", "lane_to_serdes_map_fabric_lane207.BCM8892X": "rx411:tx415", - "lane_to_serdes_map_fabric_lane208.BCM8892X": "rx416:tx423", - "lane_to_serdes_map_fabric_lane209.BCM8892X": "rx417:tx420", + "lane_to_serdes_map_fabric_lane208.BCM8892X": "rx420:tx419", + "lane_to_serdes_map_fabric_lane209.BCM8892X": "rx421:tx416", "lane_to_serdes_map_fabric_lane21.BCM8892X": "rx41:tx44", "lane_to_serdes_map_fabric_lane210.BCM8892X": "rx418:tx421", "lane_to_serdes_map_fabric_lane211.BCM8892X": "rx419:tx422", - "lane_to_serdes_map_fabric_lane212.BCM8892X": "rx424:tx431", - "lane_to_serdes_map_fabric_lane213.BCM8892X": "rx425:tx428", + "lane_to_serdes_map_fabric_lane212.BCM8892X": "rx428:tx427", + "lane_to_serdes_map_fabric_lane213.BCM8892X": "rx429:tx424", "lane_to_serdes_map_fabric_lane214.BCM8892X": "rx426:tx429", "lane_to_serdes_map_fabric_lane215.BCM8892X": "rx427:tx430", - "lane_to_serdes_map_fabric_lane216.BCM8892X": "rx432:tx436", - "lane_to_serdes_map_fabric_lane217.BCM8892X": "rx433:tx437", + "lane_to_serdes_map_fabric_lane216.BCM8892X": "rx436:tx432", + "lane_to_serdes_map_fabric_lane217.BCM8892X": "rx437:tx433", "lane_to_serdes_map_fabric_lane218.BCM8892X": "rx434:tx438", "lane_to_serdes_map_fabric_lane219.BCM8892X": "rx435:tx439", - "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx42:tx45", - "lane_to_serdes_map_fabric_lane220.BCM8892X": "rx440:tx444", - "lane_to_serdes_map_fabric_lane221.BCM8892X": "rx441:tx445", + "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx46:tx41", + "lane_to_serdes_map_fabric_lane220.BCM8892X": "rx444:tx440", + "lane_to_serdes_map_fabric_lane221.BCM8892X": "rx445:tx441", "lane_to_serdes_map_fabric_lane222.BCM8892X": "rx442:tx446", "lane_to_serdes_map_fabric_lane223.BCM8892X": "rx443:tx447", - "lane_to_serdes_map_fabric_lane224.BCM8892X": "rx448:tx455", - "lane_to_serdes_map_fabric_lane225.BCM8892X": "rx449:tx452", + "lane_to_serdes_map_fabric_lane224.BCM8892X": "rx452:tx451", + "lane_to_serdes_map_fabric_lane225.BCM8892X": "rx453:tx448", "lane_to_serdes_map_fabric_lane226.BCM8892X": "rx450:tx453", "lane_to_serdes_map_fabric_lane227.BCM8892X": "rx451:tx454", - "lane_to_serdes_map_fabric_lane228.BCM8892X": "rx456:tx463", - "lane_to_serdes_map_fabric_lane229.BCM8892X": "rx457:tx460", - "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx43:tx46", + "lane_to_serdes_map_fabric_lane228.BCM8892X": "rx460:tx459", + "lane_to_serdes_map_fabric_lane229.BCM8892X": "rx461:tx456", + "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx47:tx42", "lane_to_serdes_map_fabric_lane230.BCM8892X": "rx458:tx461", "lane_to_serdes_map_fabric_lane231.BCM8892X": "rx459:tx462", "lane_to_serdes_map_fabric_lane232.BCM8892X": "rx468:tx464", "lane_to_serdes_map_fabric_lane233.BCM8892X": "rx469:tx465", - "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx470:tx466", - "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx471:tx467", + "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx466:tx470", + "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx467:tx471", "lane_to_serdes_map_fabric_lane236.BCM8892X": "rx472:tx472", "lane_to_serdes_map_fabric_lane237.BCM8892X": "rx473:tx473", - "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx474:tx474", - "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx478:tx478", + "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx479:tx479", "lane_to_serdes_map_fabric_lane24.BCM8892X": "rx48:tx52", - "lane_to_serdes_map_fabric_lane240.BCM8892X": "rx480:tx481", - "lane_to_serdes_map_fabric_lane241.BCM8892X": "rx481:tx480", - "lane_to_serdes_map_fabric_lane242.BCM8892X": "rx486:tx487", - "lane_to_serdes_map_fabric_lane243.BCM8892X": "rx487:tx486", - "lane_to_serdes_map_fabric_lane244.BCM8892X": "rx492:tx493", - "lane_to_serdes_map_fabric_lane245.BCM8892X": "rx493:tx492", - "lane_to_serdes_map_fabric_lane246.BCM8892X": "rx490:tx491", - "lane_to_serdes_map_fabric_lane247.BCM8892X": "rx491:tx490", - "lane_to_serdes_map_fabric_lane248.BCM8892X": "rx496:tx496", - "lane_to_serdes_map_fabric_lane249.BCM8892X": "rx497:tx497", + "lane_to_serdes_map_fabric_lane240.BCM8892X": "rx484:tx485", + "lane_to_serdes_map_fabric_lane241.BCM8892X": "rx485:tx484", + "lane_to_serdes_map_fabric_lane242.BCM8892X": "rx482:tx483", + "lane_to_serdes_map_fabric_lane243.BCM8892X": "rx483:tx482", + "lane_to_serdes_map_fabric_lane244.BCM8892X": "rx488:tx489", + "lane_to_serdes_map_fabric_lane245.BCM8892X": "rx489:tx488", + "lane_to_serdes_map_fabric_lane246.BCM8892X": "rx494:tx495", + "lane_to_serdes_map_fabric_lane247.BCM8892X": "rx495:tx494", + "lane_to_serdes_map_fabric_lane248.BCM8892X": "rx500:tx500", + "lane_to_serdes_map_fabric_lane249.BCM8892X": "rx501:tx501", "lane_to_serdes_map_fabric_lane25.BCM8892X": "rx49:tx53", - "lane_to_serdes_map_fabric_lane250.BCM8892X": "rx502:tx502", - "lane_to_serdes_map_fabric_lane251.BCM8892X": "rx503:tx503", - "lane_to_serdes_map_fabric_lane252.BCM8892X": "rx508:tx508", - "lane_to_serdes_map_fabric_lane253.BCM8892X": "rx509:tx509", - "lane_to_serdes_map_fabric_lane254.BCM8892X": "rx506:tx506", - "lane_to_serdes_map_fabric_lane255.BCM8892X": "rx507:tx507", + "lane_to_serdes_map_fabric_lane250.BCM8892X": "rx498:tx498", + "lane_to_serdes_map_fabric_lane251.BCM8892X": "rx499:tx499", + "lane_to_serdes_map_fabric_lane252.BCM8892X": "rx504:tx504", + "lane_to_serdes_map_fabric_lane253.BCM8892X": "rx505:tx505", + "lane_to_serdes_map_fabric_lane254.BCM8892X": "rx510:tx510", + "lane_to_serdes_map_fabric_lane255.BCM8892X": "rx511:tx511", "lane_to_serdes_map_fabric_lane256.BCM8892X": "rx0:tx1", "lane_to_serdes_map_fabric_lane257.BCM8892X": "rx1:tx0", "lane_to_serdes_map_fabric_lane258.BCM8892X": "rx6:tx7", "lane_to_serdes_map_fabric_lane259.BCM8892X": "rx7:tx6", - "lane_to_serdes_map_fabric_lane26.BCM8892X": "rx50:tx54", + "lane_to_serdes_map_fabric_lane26.BCM8892X": "rx54:tx50", "lane_to_serdes_map_fabric_lane260.BCM8892X": "rx12:tx13", "lane_to_serdes_map_fabric_lane261.BCM8892X": "rx13:tx12", "lane_to_serdes_map_fabric_lane262.BCM8892X": "rx10:tx11", @@ -389,140 +394,140 @@ "lane_to_serdes_map_fabric_lane267.BCM8892X": "rx23:tx23", "lane_to_serdes_map_fabric_lane268.BCM8892X": "rx28:tx28", "lane_to_serdes_map_fabric_lane269.BCM8892X": "rx29:tx29", - "lane_to_serdes_map_fabric_lane27.BCM8892X": "rx51:tx55", + "lane_to_serdes_map_fabric_lane27.BCM8892X": "rx55:tx51", "lane_to_serdes_map_fabric_lane270.BCM8892X": "rx26:tx26", "lane_to_serdes_map_fabric_lane271.BCM8892X": "rx27:tx27", "lane_to_serdes_map_fabric_lane272.BCM8892X": "rx32:tx35", "lane_to_serdes_map_fabric_lane273.BCM8892X": "rx33:tx32", - "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx34:tx33", - "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx35:tx34", + "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx38:tx37", + "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx39:tx38", "lane_to_serdes_map_fabric_lane276.BCM8892X": "rx44:tx43", "lane_to_serdes_map_fabric_lane277.BCM8892X": "rx45:tx40", - "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx46:tx41", - "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx47:tx42", + "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx42:tx45", + "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx43:tx46", "lane_to_serdes_map_fabric_lane28.BCM8892X": "rx56:tx60", "lane_to_serdes_map_fabric_lane280.BCM8892X": "rx52:tx48", "lane_to_serdes_map_fabric_lane281.BCM8892X": "rx53:tx49", - "lane_to_serdes_map_fabric_lane282.BCM8892X": "rx54:tx50", - "lane_to_serdes_map_fabric_lane283.BCM8892X": "rx55:tx51", + "lane_to_serdes_map_fabric_lane282.BCM8892X": "rx50:tx54", + "lane_to_serdes_map_fabric_lane283.BCM8892X": "rx51:tx55", "lane_to_serdes_map_fabric_lane284.BCM8892X": "rx60:tx56", "lane_to_serdes_map_fabric_lane285.BCM8892X": "rx61:tx57", - "lane_to_serdes_map_fabric_lane286.BCM8892X": "rx62:tx58", - "lane_to_serdes_map_fabric_lane287.BCM8892X": "rx63:tx59", + "lane_to_serdes_map_fabric_lane286.BCM8892X": "rx58:tx62", + "lane_to_serdes_map_fabric_lane287.BCM8892X": "rx59:tx63", "lane_to_serdes_map_fabric_lane288.BCM8892X": "rx68:tx67", "lane_to_serdes_map_fabric_lane289.BCM8892X": "rx69:tx64", "lane_to_serdes_map_fabric_lane29.BCM8892X": "rx57:tx61", - "lane_to_serdes_map_fabric_lane290.BCM8892X": "rx70:tx65", - "lane_to_serdes_map_fabric_lane291.BCM8892X": "rx71:tx66", + "lane_to_serdes_map_fabric_lane290.BCM8892X": "rx66:tx69", + "lane_to_serdes_map_fabric_lane291.BCM8892X": "rx67:tx70", "lane_to_serdes_map_fabric_lane292.BCM8892X": "rx76:tx75", "lane_to_serdes_map_fabric_lane293.BCM8892X": "rx77:tx72", - "lane_to_serdes_map_fabric_lane294.BCM8892X": "rx78:tx73", - "lane_to_serdes_map_fabric_lane295.BCM8892X": "rx79:tx74", + "lane_to_serdes_map_fabric_lane294.BCM8892X": "rx74:tx77", + "lane_to_serdes_map_fabric_lane295.BCM8892X": "rx75:tx78", "lane_to_serdes_map_fabric_lane296.BCM8892X": "rx84:tx80", "lane_to_serdes_map_fabric_lane297.BCM8892X": "rx85:tx81", - "lane_to_serdes_map_fabric_lane298.BCM8892X": "rx86:tx82", - "lane_to_serdes_map_fabric_lane299.BCM8892X": "rx87:tx83", + "lane_to_serdes_map_fabric_lane298.BCM8892X": "rx82:tx86", + "lane_to_serdes_map_fabric_lane299.BCM8892X": "rx83:tx87", "lane_to_serdes_map_fabric_lane3.BCM8892X": "rx3:tx2", - "lane_to_serdes_map_fabric_lane30.BCM8892X": "rx58:tx62", + "lane_to_serdes_map_fabric_lane30.BCM8892X": "rx62:tx58", "lane_to_serdes_map_fabric_lane300.BCM8892X": "rx92:tx88", "lane_to_serdes_map_fabric_lane301.BCM8892X": "rx93:tx89", - "lane_to_serdes_map_fabric_lane302.BCM8892X": "rx94:tx90", - "lane_to_serdes_map_fabric_lane303.BCM8892X": "rx95:tx91", + "lane_to_serdes_map_fabric_lane302.BCM8892X": "rx90:tx94", + "lane_to_serdes_map_fabric_lane303.BCM8892X": "rx91:tx95", "lane_to_serdes_map_fabric_lane304.BCM8892X": "rx100:tx99", "lane_to_serdes_map_fabric_lane305.BCM8892X": "rx101:tx96", - "lane_to_serdes_map_fabric_lane306.BCM8892X": "rx102:tx97", - "lane_to_serdes_map_fabric_lane307.BCM8892X": "rx103:tx98", + "lane_to_serdes_map_fabric_lane306.BCM8892X": "rx98:tx101", + "lane_to_serdes_map_fabric_lane307.BCM8892X": "rx99:tx102", "lane_to_serdes_map_fabric_lane308.BCM8892X": "rx108:tx107", "lane_to_serdes_map_fabric_lane309.BCM8892X": "rx109:tx104", - "lane_to_serdes_map_fabric_lane31.BCM8892X": "rx59:tx63", - "lane_to_serdes_map_fabric_lane310.BCM8892X": "rx110:tx105", - "lane_to_serdes_map_fabric_lane311.BCM8892X": "rx111:tx106", + "lane_to_serdes_map_fabric_lane31.BCM8892X": "rx63:tx59", + "lane_to_serdes_map_fabric_lane310.BCM8892X": "rx106:tx109", + "lane_to_serdes_map_fabric_lane311.BCM8892X": "rx107:tx110", "lane_to_serdes_map_fabric_lane312.BCM8892X": "rx116:tx112", "lane_to_serdes_map_fabric_lane313.BCM8892X": "rx117:tx113", - "lane_to_serdes_map_fabric_lane314.BCM8892X": "rx118:tx114", - "lane_to_serdes_map_fabric_lane315.BCM8892X": "rx119:tx115", + "lane_to_serdes_map_fabric_lane314.BCM8892X": "rx114:tx118", + "lane_to_serdes_map_fabric_lane315.BCM8892X": "rx115:tx119", "lane_to_serdes_map_fabric_lane316.BCM8892X": "rx124:tx120", "lane_to_serdes_map_fabric_lane317.BCM8892X": "rx125:tx121", - "lane_to_serdes_map_fabric_lane318.BCM8892X": "rx126:tx122", - "lane_to_serdes_map_fabric_lane319.BCM8892X": "rx127:tx123", + "lane_to_serdes_map_fabric_lane318.BCM8892X": "rx122:tx126", + "lane_to_serdes_map_fabric_lane319.BCM8892X": "rx123:tx127", "lane_to_serdes_map_fabric_lane32.BCM8892X": "rx64:tx71", - "lane_to_serdes_map_fabric_lane320.BCM8892X": "rx132:tx131", - "lane_to_serdes_map_fabric_lane321.BCM8892X": "rx133:tx128", + "lane_to_serdes_map_fabric_lane320.BCM8892X": "rx128:tx135", + "lane_to_serdes_map_fabric_lane321.BCM8892X": "rx129:tx132", "lane_to_serdes_map_fabric_lane322.BCM8892X": "rx134:tx129", "lane_to_serdes_map_fabric_lane323.BCM8892X": "rx135:tx130", - "lane_to_serdes_map_fabric_lane324.BCM8892X": "rx140:tx139", - "lane_to_serdes_map_fabric_lane325.BCM8892X": "rx141:tx136", + "lane_to_serdes_map_fabric_lane324.BCM8892X": "rx136:tx143", + "lane_to_serdes_map_fabric_lane325.BCM8892X": "rx137:tx140", "lane_to_serdes_map_fabric_lane326.BCM8892X": "rx142:tx137", "lane_to_serdes_map_fabric_lane327.BCM8892X": "rx143:tx138", - "lane_to_serdes_map_fabric_lane328.BCM8892X": "rx148:tx144", - "lane_to_serdes_map_fabric_lane329.BCM8892X": "rx149:tx145", + "lane_to_serdes_map_fabric_lane328.BCM8892X": "rx144:tx148", + "lane_to_serdes_map_fabric_lane329.BCM8892X": "rx145:tx149", "lane_to_serdes_map_fabric_lane33.BCM8892X": "rx65:tx68", "lane_to_serdes_map_fabric_lane330.BCM8892X": "rx150:tx146", "lane_to_serdes_map_fabric_lane331.BCM8892X": "rx151:tx147", - "lane_to_serdes_map_fabric_lane332.BCM8892X": "rx156:tx152", - "lane_to_serdes_map_fabric_lane333.BCM8892X": "rx157:tx153", + "lane_to_serdes_map_fabric_lane332.BCM8892X": "rx152:tx156", + "lane_to_serdes_map_fabric_lane333.BCM8892X": "rx153:tx157", "lane_to_serdes_map_fabric_lane334.BCM8892X": "rx158:tx154", "lane_to_serdes_map_fabric_lane335.BCM8892X": "rx159:tx155", - "lane_to_serdes_map_fabric_lane336.BCM8892X": "rx164:tx163", - "lane_to_serdes_map_fabric_lane337.BCM8892X": "rx165:tx160", + "lane_to_serdes_map_fabric_lane336.BCM8892X": "rx160:tx167", + "lane_to_serdes_map_fabric_lane337.BCM8892X": "rx161:tx164", "lane_to_serdes_map_fabric_lane338.BCM8892X": "rx166:tx161", "lane_to_serdes_map_fabric_lane339.BCM8892X": "rx167:tx162", - "lane_to_serdes_map_fabric_lane34.BCM8892X": "rx66:tx69", - "lane_to_serdes_map_fabric_lane340.BCM8892X": "rx172:tx171", - "lane_to_serdes_map_fabric_lane341.BCM8892X": "rx173:tx168", + "lane_to_serdes_map_fabric_lane34.BCM8892X": "rx70:tx65", + "lane_to_serdes_map_fabric_lane340.BCM8892X": "rx168:tx175", + "lane_to_serdes_map_fabric_lane341.BCM8892X": "rx169:tx172", "lane_to_serdes_map_fabric_lane342.BCM8892X": "rx174:tx169", "lane_to_serdes_map_fabric_lane343.BCM8892X": "rx175:tx170", - "lane_to_serdes_map_fabric_lane344.BCM8892X": "rx180:tx176", - "lane_to_serdes_map_fabric_lane345.BCM8892X": "rx181:tx177", + "lane_to_serdes_map_fabric_lane344.BCM8892X": "rx176:tx180", + "lane_to_serdes_map_fabric_lane345.BCM8892X": "rx177:tx181", "lane_to_serdes_map_fabric_lane346.BCM8892X": "rx182:tx178", "lane_to_serdes_map_fabric_lane347.BCM8892X": "rx183:tx179", - "lane_to_serdes_map_fabric_lane348.BCM8892X": "rx188:tx184", - "lane_to_serdes_map_fabric_lane349.BCM8892X": "rx189:tx185", - "lane_to_serdes_map_fabric_lane35.BCM8892X": "rx67:tx70", + "lane_to_serdes_map_fabric_lane348.BCM8892X": "rx184:tx188", + "lane_to_serdes_map_fabric_lane349.BCM8892X": "rx185:tx189", + "lane_to_serdes_map_fabric_lane35.BCM8892X": "rx71:tx66", "lane_to_serdes_map_fabric_lane350.BCM8892X": "rx190:tx186", "lane_to_serdes_map_fabric_lane351.BCM8892X": "rx191:tx187", - "lane_to_serdes_map_fabric_lane352.BCM8892X": "rx196:tx195", - "lane_to_serdes_map_fabric_lane353.BCM8892X": "rx197:tx192", + "lane_to_serdes_map_fabric_lane352.BCM8892X": "rx192:tx199", + "lane_to_serdes_map_fabric_lane353.BCM8892X": "rx193:tx196", "lane_to_serdes_map_fabric_lane354.BCM8892X": "rx198:tx193", "lane_to_serdes_map_fabric_lane355.BCM8892X": "rx199:tx194", - "lane_to_serdes_map_fabric_lane356.BCM8892X": "rx204:tx203", - "lane_to_serdes_map_fabric_lane357.BCM8892X": "rx205:tx200", + "lane_to_serdes_map_fabric_lane356.BCM8892X": "rx200:tx207", + "lane_to_serdes_map_fabric_lane357.BCM8892X": "rx201:tx204", "lane_to_serdes_map_fabric_lane358.BCM8892X": "rx206:tx201", "lane_to_serdes_map_fabric_lane359.BCM8892X": "rx207:tx202", "lane_to_serdes_map_fabric_lane36.BCM8892X": "rx72:tx79", - "lane_to_serdes_map_fabric_lane360.BCM8892X": "rx212:tx208", - "lane_to_serdes_map_fabric_lane361.BCM8892X": "rx213:tx209", + "lane_to_serdes_map_fabric_lane360.BCM8892X": "rx208:tx212", + "lane_to_serdes_map_fabric_lane361.BCM8892X": "rx209:tx213", "lane_to_serdes_map_fabric_lane362.BCM8892X": "rx214:tx210", "lane_to_serdes_map_fabric_lane363.BCM8892X": "rx215:tx211", - "lane_to_serdes_map_fabric_lane364.BCM8892X": "rx220:tx216", - "lane_to_serdes_map_fabric_lane365.BCM8892X": "rx221:tx217", + "lane_to_serdes_map_fabric_lane364.BCM8892X": "rx216:tx220", + "lane_to_serdes_map_fabric_lane365.BCM8892X": "rx217:tx221", "lane_to_serdes_map_fabric_lane366.BCM8892X": "rx222:tx218", "lane_to_serdes_map_fabric_lane367.BCM8892X": "rx223:tx219", - "lane_to_serdes_map_fabric_lane368.BCM8892X": "rx228:tx229", - "lane_to_serdes_map_fabric_lane369.BCM8892X": "rx229:tx228", + "lane_to_serdes_map_fabric_lane368.BCM8892X": "rx224:tx225", + "lane_to_serdes_map_fabric_lane369.BCM8892X": "rx225:tx224", "lane_to_serdes_map_fabric_lane37.BCM8892X": "rx73:tx76", - "lane_to_serdes_map_fabric_lane370.BCM8892X": "rx226:tx227", - "lane_to_serdes_map_fabric_lane371.BCM8892X": "rx227:tx226", - "lane_to_serdes_map_fabric_lane372.BCM8892X": "rx232:tx233", - "lane_to_serdes_map_fabric_lane373.BCM8892X": "rx233:tx232", - "lane_to_serdes_map_fabric_lane374.BCM8892X": "rx238:tx239", - "lane_to_serdes_map_fabric_lane375.BCM8892X": "rx239:tx238", - "lane_to_serdes_map_fabric_lane376.BCM8892X": "rx244:tx244", - "lane_to_serdes_map_fabric_lane377.BCM8892X": "rx245:tx245", - "lane_to_serdes_map_fabric_lane378.BCM8892X": "rx242:tx242", - "lane_to_serdes_map_fabric_lane379.BCM8892X": "rx243:tx243", - "lane_to_serdes_map_fabric_lane38.BCM8892X": "rx74:tx77", - "lane_to_serdes_map_fabric_lane380.BCM8892X": "rx248:tx248", - "lane_to_serdes_map_fabric_lane381.BCM8892X": "rx249:tx249", - "lane_to_serdes_map_fabric_lane382.BCM8892X": "rx254:tx254", - "lane_to_serdes_map_fabric_lane383.BCM8892X": "rx255:tx255", + "lane_to_serdes_map_fabric_lane370.BCM8892X": "rx230:tx231", + "lane_to_serdes_map_fabric_lane371.BCM8892X": "rx231:tx230", + "lane_to_serdes_map_fabric_lane372.BCM8892X": "rx236:tx237", + "lane_to_serdes_map_fabric_lane373.BCM8892X": "rx237:tx236", + "lane_to_serdes_map_fabric_lane374.BCM8892X": "rx234:tx235", + "lane_to_serdes_map_fabric_lane375.BCM8892X": "rx235:tx234", + "lane_to_serdes_map_fabric_lane376.BCM8892X": "rx240:tx240", + "lane_to_serdes_map_fabric_lane377.BCM8892X": "rx241:tx241", + "lane_to_serdes_map_fabric_lane378.BCM8892X": "rx246:tx246", + "lane_to_serdes_map_fabric_lane379.BCM8892X": "rx247:tx247", + "lane_to_serdes_map_fabric_lane38.BCM8892X": "rx78:tx73", + "lane_to_serdes_map_fabric_lane380.BCM8892X": "rx252:tx252", + "lane_to_serdes_map_fabric_lane381.BCM8892X": "rx253:tx253", + "lane_to_serdes_map_fabric_lane382.BCM8892X": "rx250:tx250", + "lane_to_serdes_map_fabric_lane383.BCM8892X": "rx251:tx251", "lane_to_serdes_map_fabric_lane384.BCM8892X": "rx260:tx261", "lane_to_serdes_map_fabric_lane385.BCM8892X": "rx261:tx260", "lane_to_serdes_map_fabric_lane386.BCM8892X": "rx258:tx259", "lane_to_serdes_map_fabric_lane387.BCM8892X": "rx259:tx258", "lane_to_serdes_map_fabric_lane388.BCM8892X": "rx264:tx265", "lane_to_serdes_map_fabric_lane389.BCM8892X": "rx265:tx264", - "lane_to_serdes_map_fabric_lane39.BCM8892X": "rx75:tx78", + "lane_to_serdes_map_fabric_lane39.BCM8892X": "rx79:tx74", "lane_to_serdes_map_fabric_lane390.BCM8892X": "rx270:tx271", "lane_to_serdes_map_fabric_lane391.BCM8892X": "rx271:tx270", "lane_to_serdes_map_fabric_lane392.BCM8892X": "rx276:tx276", @@ -537,193 +542,193 @@ "lane_to_serdes_map_fabric_lane40.BCM8892X": "rx80:tx84", "lane_to_serdes_map_fabric_lane400.BCM8892X": "rx292:tx291", "lane_to_serdes_map_fabric_lane401.BCM8892X": "rx293:tx288", - "lane_to_serdes_map_fabric_lane402.BCM8892X": "rx294:tx289", - "lane_to_serdes_map_fabric_lane403.BCM8892X": "rx295:tx290", + "lane_to_serdes_map_fabric_lane402.BCM8892X": "rx290:tx293", + "lane_to_serdes_map_fabric_lane403.BCM8892X": "rx291:tx294", "lane_to_serdes_map_fabric_lane404.BCM8892X": "rx300:tx299", "lane_to_serdes_map_fabric_lane405.BCM8892X": "rx301:tx296", - "lane_to_serdes_map_fabric_lane406.BCM8892X": "rx302:tx297", - "lane_to_serdes_map_fabric_lane407.BCM8892X": "rx303:tx298", + "lane_to_serdes_map_fabric_lane406.BCM8892X": "rx298:tx301", + "lane_to_serdes_map_fabric_lane407.BCM8892X": "rx299:tx302", "lane_to_serdes_map_fabric_lane408.BCM8892X": "rx308:tx304", "lane_to_serdes_map_fabric_lane409.BCM8892X": "rx309:tx305", "lane_to_serdes_map_fabric_lane41.BCM8892X": "rx81:tx85", - "lane_to_serdes_map_fabric_lane410.BCM8892X": "rx310:tx306", - "lane_to_serdes_map_fabric_lane411.BCM8892X": "rx311:tx307", + "lane_to_serdes_map_fabric_lane410.BCM8892X": "rx306:tx310", + "lane_to_serdes_map_fabric_lane411.BCM8892X": "rx307:tx311", "lane_to_serdes_map_fabric_lane412.BCM8892X": "rx316:tx312", "lane_to_serdes_map_fabric_lane413.BCM8892X": "rx317:tx313", - "lane_to_serdes_map_fabric_lane414.BCM8892X": "rx318:tx314", - "lane_to_serdes_map_fabric_lane415.BCM8892X": "rx319:tx315", + "lane_to_serdes_map_fabric_lane414.BCM8892X": "rx314:tx318", + "lane_to_serdes_map_fabric_lane415.BCM8892X": "rx315:tx319", "lane_to_serdes_map_fabric_lane416.BCM8892X": "rx324:tx323", "lane_to_serdes_map_fabric_lane417.BCM8892X": "rx325:tx320", - "lane_to_serdes_map_fabric_lane418.BCM8892X": "rx326:tx321", - "lane_to_serdes_map_fabric_lane419.BCM8892X": "rx327:tx322", - "lane_to_serdes_map_fabric_lane42.BCM8892X": "rx82:tx86", + "lane_to_serdes_map_fabric_lane418.BCM8892X": "rx322:tx325", + "lane_to_serdes_map_fabric_lane419.BCM8892X": "rx323:tx326", + "lane_to_serdes_map_fabric_lane42.BCM8892X": "rx86:tx82", "lane_to_serdes_map_fabric_lane420.BCM8892X": "rx332:tx331", "lane_to_serdes_map_fabric_lane421.BCM8892X": "rx333:tx328", - "lane_to_serdes_map_fabric_lane422.BCM8892X": "rx334:tx329", - "lane_to_serdes_map_fabric_lane423.BCM8892X": "rx335:tx330", + "lane_to_serdes_map_fabric_lane422.BCM8892X": "rx330:tx333", + "lane_to_serdes_map_fabric_lane423.BCM8892X": "rx331:tx334", "lane_to_serdes_map_fabric_lane424.BCM8892X": "rx340:tx336", "lane_to_serdes_map_fabric_lane425.BCM8892X": "rx341:tx337", - "lane_to_serdes_map_fabric_lane426.BCM8892X": "rx342:tx338", - "lane_to_serdes_map_fabric_lane427.BCM8892X": "rx343:tx339", + "lane_to_serdes_map_fabric_lane426.BCM8892X": "rx338:tx342", + "lane_to_serdes_map_fabric_lane427.BCM8892X": "rx339:tx343", "lane_to_serdes_map_fabric_lane428.BCM8892X": "rx348:tx344", "lane_to_serdes_map_fabric_lane429.BCM8892X": "rx349:tx345", - "lane_to_serdes_map_fabric_lane43.BCM8892X": "rx83:tx87", - "lane_to_serdes_map_fabric_lane430.BCM8892X": "rx350:tx346", - "lane_to_serdes_map_fabric_lane431.BCM8892X": "rx351:tx347", + "lane_to_serdes_map_fabric_lane43.BCM8892X": "rx87:tx83", + "lane_to_serdes_map_fabric_lane430.BCM8892X": "rx346:tx350", + "lane_to_serdes_map_fabric_lane431.BCM8892X": "rx347:tx351", "lane_to_serdes_map_fabric_lane432.BCM8892X": "rx356:tx355", "lane_to_serdes_map_fabric_lane433.BCM8892X": "rx357:tx352", - "lane_to_serdes_map_fabric_lane434.BCM8892X": "rx358:tx353", - "lane_to_serdes_map_fabric_lane435.BCM8892X": "rx359:tx354", + "lane_to_serdes_map_fabric_lane434.BCM8892X": "rx354:tx357", + "lane_to_serdes_map_fabric_lane435.BCM8892X": "rx355:tx358", "lane_to_serdes_map_fabric_lane436.BCM8892X": "rx364:tx363", "lane_to_serdes_map_fabric_lane437.BCM8892X": "rx365:tx360", - "lane_to_serdes_map_fabric_lane438.BCM8892X": "rx366:tx361", - "lane_to_serdes_map_fabric_lane439.BCM8892X": "rx367:tx362", + "lane_to_serdes_map_fabric_lane438.BCM8892X": "rx362:tx365", + "lane_to_serdes_map_fabric_lane439.BCM8892X": "rx363:tx366", "lane_to_serdes_map_fabric_lane44.BCM8892X": "rx88:tx92", "lane_to_serdes_map_fabric_lane440.BCM8892X": "rx372:tx368", "lane_to_serdes_map_fabric_lane441.BCM8892X": "rx373:tx369", - "lane_to_serdes_map_fabric_lane442.BCM8892X": "rx374:tx370", - "lane_to_serdes_map_fabric_lane443.BCM8892X": "rx375:tx371", + "lane_to_serdes_map_fabric_lane442.BCM8892X": "rx370:tx374", + "lane_to_serdes_map_fabric_lane443.BCM8892X": "rx371:tx375", "lane_to_serdes_map_fabric_lane444.BCM8892X": "rx380:tx376", "lane_to_serdes_map_fabric_lane445.BCM8892X": "rx381:tx377", - "lane_to_serdes_map_fabric_lane446.BCM8892X": "rx382:tx378", - "lane_to_serdes_map_fabric_lane447.BCM8892X": "rx383:tx379", - "lane_to_serdes_map_fabric_lane448.BCM8892X": "rx388:tx387", - "lane_to_serdes_map_fabric_lane449.BCM8892X": "rx389:tx384", + "lane_to_serdes_map_fabric_lane446.BCM8892X": "rx378:tx382", + "lane_to_serdes_map_fabric_lane447.BCM8892X": "rx379:tx383", + "lane_to_serdes_map_fabric_lane448.BCM8892X": "rx384:tx391", + "lane_to_serdes_map_fabric_lane449.BCM8892X": "rx385:tx388", "lane_to_serdes_map_fabric_lane45.BCM8892X": "rx89:tx93", "lane_to_serdes_map_fabric_lane450.BCM8892X": "rx390:tx385", "lane_to_serdes_map_fabric_lane451.BCM8892X": "rx391:tx386", - "lane_to_serdes_map_fabric_lane452.BCM8892X": "rx396:tx395", - "lane_to_serdes_map_fabric_lane453.BCM8892X": "rx397:tx392", + "lane_to_serdes_map_fabric_lane452.BCM8892X": "rx392:tx399", + "lane_to_serdes_map_fabric_lane453.BCM8892X": "rx393:tx396", "lane_to_serdes_map_fabric_lane454.BCM8892X": "rx398:tx393", "lane_to_serdes_map_fabric_lane455.BCM8892X": "rx399:tx394", - "lane_to_serdes_map_fabric_lane456.BCM8892X": "rx404:tx400", - "lane_to_serdes_map_fabric_lane457.BCM8892X": "rx405:tx401", + "lane_to_serdes_map_fabric_lane456.BCM8892X": "rx400:tx404", + "lane_to_serdes_map_fabric_lane457.BCM8892X": "rx401:tx405", "lane_to_serdes_map_fabric_lane458.BCM8892X": "rx406:tx402", "lane_to_serdes_map_fabric_lane459.BCM8892X": "rx407:tx403", - "lane_to_serdes_map_fabric_lane46.BCM8892X": "rx90:tx94", - "lane_to_serdes_map_fabric_lane460.BCM8892X": "rx412:tx408", - "lane_to_serdes_map_fabric_lane461.BCM8892X": "rx413:tx409", + "lane_to_serdes_map_fabric_lane46.BCM8892X": "rx94:tx90", + "lane_to_serdes_map_fabric_lane460.BCM8892X": "rx408:tx412", + "lane_to_serdes_map_fabric_lane461.BCM8892X": "rx409:tx413", "lane_to_serdes_map_fabric_lane462.BCM8892X": "rx414:tx410", "lane_to_serdes_map_fabric_lane463.BCM8892X": "rx415:tx411", - "lane_to_serdes_map_fabric_lane464.BCM8892X": "rx420:tx419", - "lane_to_serdes_map_fabric_lane465.BCM8892X": "rx421:tx416", + "lane_to_serdes_map_fabric_lane464.BCM8892X": "rx416:tx423", + "lane_to_serdes_map_fabric_lane465.BCM8892X": "rx417:tx420", "lane_to_serdes_map_fabric_lane466.BCM8892X": "rx422:tx417", "lane_to_serdes_map_fabric_lane467.BCM8892X": "rx423:tx418", - "lane_to_serdes_map_fabric_lane468.BCM8892X": "rx428:tx427", - "lane_to_serdes_map_fabric_lane469.BCM8892X": "rx429:tx424", - "lane_to_serdes_map_fabric_lane47.BCM8892X": "rx91:tx95", + "lane_to_serdes_map_fabric_lane468.BCM8892X": "rx424:tx431", + "lane_to_serdes_map_fabric_lane469.BCM8892X": "rx425:tx428", + "lane_to_serdes_map_fabric_lane47.BCM8892X": "rx95:tx91", "lane_to_serdes_map_fabric_lane470.BCM8892X": "rx430:tx425", "lane_to_serdes_map_fabric_lane471.BCM8892X": "rx431:tx426", - "lane_to_serdes_map_fabric_lane472.BCM8892X": "rx436:tx432", - "lane_to_serdes_map_fabric_lane473.BCM8892X": "rx437:tx433", + "lane_to_serdes_map_fabric_lane472.BCM8892X": "rx432:tx436", + "lane_to_serdes_map_fabric_lane473.BCM8892X": "rx433:tx437", "lane_to_serdes_map_fabric_lane474.BCM8892X": "rx438:tx434", "lane_to_serdes_map_fabric_lane475.BCM8892X": "rx439:tx435", - "lane_to_serdes_map_fabric_lane476.BCM8892X": "rx444:tx440", - "lane_to_serdes_map_fabric_lane477.BCM8892X": "rx445:tx441", + "lane_to_serdes_map_fabric_lane476.BCM8892X": "rx440:tx444", + "lane_to_serdes_map_fabric_lane477.BCM8892X": "rx441:tx445", "lane_to_serdes_map_fabric_lane478.BCM8892X": "rx446:tx442", "lane_to_serdes_map_fabric_lane479.BCM8892X": "rx447:tx443", "lane_to_serdes_map_fabric_lane48.BCM8892X": "rx96:tx103", - "lane_to_serdes_map_fabric_lane480.BCM8892X": "rx452:tx451", - "lane_to_serdes_map_fabric_lane481.BCM8892X": "rx453:tx448", + "lane_to_serdes_map_fabric_lane480.BCM8892X": "rx448:tx455", + "lane_to_serdes_map_fabric_lane481.BCM8892X": "rx449:tx452", "lane_to_serdes_map_fabric_lane482.BCM8892X": "rx454:tx449", "lane_to_serdes_map_fabric_lane483.BCM8892X": "rx455:tx450", - "lane_to_serdes_map_fabric_lane484.BCM8892X": "rx460:tx459", - "lane_to_serdes_map_fabric_lane485.BCM8892X": "rx461:tx456", + "lane_to_serdes_map_fabric_lane484.BCM8892X": "rx456:tx463", + "lane_to_serdes_map_fabric_lane485.BCM8892X": "rx457:tx460", "lane_to_serdes_map_fabric_lane486.BCM8892X": "rx462:tx457", "lane_to_serdes_map_fabric_lane487.BCM8892X": "rx463:tx458", "lane_to_serdes_map_fabric_lane488.BCM8892X": "rx464:tx468", "lane_to_serdes_map_fabric_lane489.BCM8892X": "rx465:tx469", "lane_to_serdes_map_fabric_lane49.BCM8892X": "rx97:tx100", - "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx466:tx470", - "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx467:tx471", + "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx470:tx466", + "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx471:tx467", "lane_to_serdes_map_fabric_lane492.BCM8892X": "rx476:tx476", "lane_to_serdes_map_fabric_lane493.BCM8892X": "rx477:tx477", - "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx478:tx478", - "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx479:tx479", - "lane_to_serdes_map_fabric_lane496.BCM8892X": "rx484:tx485", - "lane_to_serdes_map_fabric_lane497.BCM8892X": "rx485:tx484", - "lane_to_serdes_map_fabric_lane498.BCM8892X": "rx482:tx483", - "lane_to_serdes_map_fabric_lane499.BCM8892X": "rx483:tx482", + "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx474:tx474", + "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane496.BCM8892X": "rx480:tx481", + "lane_to_serdes_map_fabric_lane497.BCM8892X": "rx481:tx480", + "lane_to_serdes_map_fabric_lane498.BCM8892X": "rx486:tx487", + "lane_to_serdes_map_fabric_lane499.BCM8892X": "rx487:tx486", "lane_to_serdes_map_fabric_lane5.BCM8892X": "rx9:tx8", - "lane_to_serdes_map_fabric_lane50.BCM8892X": "rx98:tx101", - "lane_to_serdes_map_fabric_lane500.BCM8892X": "rx488:tx489", - "lane_to_serdes_map_fabric_lane501.BCM8892X": "rx489:tx488", - "lane_to_serdes_map_fabric_lane502.BCM8892X": "rx494:tx495", - "lane_to_serdes_map_fabric_lane503.BCM8892X": "rx495:tx494", - "lane_to_serdes_map_fabric_lane504.BCM8892X": "rx500:tx500", - "lane_to_serdes_map_fabric_lane505.BCM8892X": "rx501:tx501", - "lane_to_serdes_map_fabric_lane506.BCM8892X": "rx498:tx498", - "lane_to_serdes_map_fabric_lane507.BCM8892X": "rx499:tx499", - "lane_to_serdes_map_fabric_lane508.BCM8892X": "rx504:tx504", - "lane_to_serdes_map_fabric_lane509.BCM8892X": "rx505:tx505", - "lane_to_serdes_map_fabric_lane51.BCM8892X": "rx99:tx102", - "lane_to_serdes_map_fabric_lane510.BCM8892X": "rx510:tx510", - "lane_to_serdes_map_fabric_lane511.BCM8892X": "rx511:tx511", + "lane_to_serdes_map_fabric_lane50.BCM8892X": "rx102:tx97", + "lane_to_serdes_map_fabric_lane500.BCM8892X": "rx492:tx493", + "lane_to_serdes_map_fabric_lane501.BCM8892X": "rx493:tx492", + "lane_to_serdes_map_fabric_lane502.BCM8892X": "rx490:tx491", + "lane_to_serdes_map_fabric_lane503.BCM8892X": "rx491:tx490", + "lane_to_serdes_map_fabric_lane504.BCM8892X": "rx496:tx496", + "lane_to_serdes_map_fabric_lane505.BCM8892X": "rx497:tx497", + "lane_to_serdes_map_fabric_lane506.BCM8892X": "rx502:tx502", + "lane_to_serdes_map_fabric_lane507.BCM8892X": "rx503:tx503", + "lane_to_serdes_map_fabric_lane508.BCM8892X": "rx508:tx508", + "lane_to_serdes_map_fabric_lane509.BCM8892X": "rx509:tx509", + "lane_to_serdes_map_fabric_lane51.BCM8892X": "rx103:tx98", + "lane_to_serdes_map_fabric_lane510.BCM8892X": "rx506:tx506", + "lane_to_serdes_map_fabric_lane511.BCM8892X": "rx507:tx507", "lane_to_serdes_map_fabric_lane52.BCM8892X": "rx104:tx111", "lane_to_serdes_map_fabric_lane53.BCM8892X": "rx105:tx108", - "lane_to_serdes_map_fabric_lane54.BCM8892X": "rx106:tx109", - "lane_to_serdes_map_fabric_lane55.BCM8892X": "rx107:tx110", + "lane_to_serdes_map_fabric_lane54.BCM8892X": "rx110:tx105", + "lane_to_serdes_map_fabric_lane55.BCM8892X": "rx111:tx106", "lane_to_serdes_map_fabric_lane56.BCM8892X": "rx112:tx116", "lane_to_serdes_map_fabric_lane57.BCM8892X": "rx113:tx117", - "lane_to_serdes_map_fabric_lane58.BCM8892X": "rx114:tx118", - "lane_to_serdes_map_fabric_lane59.BCM8892X": "rx115:tx119", + "lane_to_serdes_map_fabric_lane58.BCM8892X": "rx118:tx114", + "lane_to_serdes_map_fabric_lane59.BCM8892X": "rx119:tx115", "lane_to_serdes_map_fabric_lane6.BCM8892X": "rx14:tx15", "lane_to_serdes_map_fabric_lane60.BCM8892X": "rx120:tx124", "lane_to_serdes_map_fabric_lane61.BCM8892X": "rx121:tx125", - "lane_to_serdes_map_fabric_lane62.BCM8892X": "rx122:tx126", - "lane_to_serdes_map_fabric_lane63.BCM8892X": "rx123:tx127", - "lane_to_serdes_map_fabric_lane64.BCM8892X": "rx128:tx135", - "lane_to_serdes_map_fabric_lane65.BCM8892X": "rx129:tx132", + "lane_to_serdes_map_fabric_lane62.BCM8892X": "rx126:tx122", + "lane_to_serdes_map_fabric_lane63.BCM8892X": "rx127:tx123", + "lane_to_serdes_map_fabric_lane64.BCM8892X": "rx132:tx131", + "lane_to_serdes_map_fabric_lane65.BCM8892X": "rx133:tx128", "lane_to_serdes_map_fabric_lane66.BCM8892X": "rx130:tx133", "lane_to_serdes_map_fabric_lane67.BCM8892X": "rx131:tx134", - "lane_to_serdes_map_fabric_lane68.BCM8892X": "rx136:tx143", - "lane_to_serdes_map_fabric_lane69.BCM8892X": "rx137:tx140", + "lane_to_serdes_map_fabric_lane68.BCM8892X": "rx140:tx139", + "lane_to_serdes_map_fabric_lane69.BCM8892X": "rx141:tx136", "lane_to_serdes_map_fabric_lane7.BCM8892X": "rx15:tx14", "lane_to_serdes_map_fabric_lane70.BCM8892X": "rx138:tx141", "lane_to_serdes_map_fabric_lane71.BCM8892X": "rx139:tx142", - "lane_to_serdes_map_fabric_lane72.BCM8892X": "rx144:tx148", - "lane_to_serdes_map_fabric_lane73.BCM8892X": "rx145:tx149", + "lane_to_serdes_map_fabric_lane72.BCM8892X": "rx148:tx144", + "lane_to_serdes_map_fabric_lane73.BCM8892X": "rx149:tx145", "lane_to_serdes_map_fabric_lane74.BCM8892X": "rx146:tx150", "lane_to_serdes_map_fabric_lane75.BCM8892X": "rx147:tx151", - "lane_to_serdes_map_fabric_lane76.BCM8892X": "rx152:tx156", - "lane_to_serdes_map_fabric_lane77.BCM8892X": "rx153:tx157", + "lane_to_serdes_map_fabric_lane76.BCM8892X": "rx156:tx152", + "lane_to_serdes_map_fabric_lane77.BCM8892X": "rx157:tx153", "lane_to_serdes_map_fabric_lane78.BCM8892X": "rx154:tx158", "lane_to_serdes_map_fabric_lane79.BCM8892X": "rx155:tx159", "lane_to_serdes_map_fabric_lane8.BCM8892X": "rx20:tx20", - "lane_to_serdes_map_fabric_lane80.BCM8892X": "rx160:tx167", - "lane_to_serdes_map_fabric_lane81.BCM8892X": "rx161:tx164", + "lane_to_serdes_map_fabric_lane80.BCM8892X": "rx164:tx163", + "lane_to_serdes_map_fabric_lane81.BCM8892X": "rx165:tx160", "lane_to_serdes_map_fabric_lane82.BCM8892X": "rx162:tx165", "lane_to_serdes_map_fabric_lane83.BCM8892X": "rx163:tx166", - "lane_to_serdes_map_fabric_lane84.BCM8892X": "rx168:tx175", - "lane_to_serdes_map_fabric_lane85.BCM8892X": "rx169:tx172", + "lane_to_serdes_map_fabric_lane84.BCM8892X": "rx172:tx171", + "lane_to_serdes_map_fabric_lane85.BCM8892X": "rx173:tx168", "lane_to_serdes_map_fabric_lane86.BCM8892X": "rx170:tx173", "lane_to_serdes_map_fabric_lane87.BCM8892X": "rx171:tx174", - "lane_to_serdes_map_fabric_lane88.BCM8892X": "rx176:tx180", - "lane_to_serdes_map_fabric_lane89.BCM8892X": "rx177:tx181", + "lane_to_serdes_map_fabric_lane88.BCM8892X": "rx180:tx176", + "lane_to_serdes_map_fabric_lane89.BCM8892X": "rx181:tx177", "lane_to_serdes_map_fabric_lane9.BCM8892X": "rx21:tx21", "lane_to_serdes_map_fabric_lane90.BCM8892X": "rx178:tx182", "lane_to_serdes_map_fabric_lane91.BCM8892X": "rx179:tx183", - "lane_to_serdes_map_fabric_lane92.BCM8892X": "rx184:tx188", - "lane_to_serdes_map_fabric_lane93.BCM8892X": "rx185:tx189", + "lane_to_serdes_map_fabric_lane92.BCM8892X": "rx188:tx184", + "lane_to_serdes_map_fabric_lane93.BCM8892X": "rx189:tx185", "lane_to_serdes_map_fabric_lane94.BCM8892X": "rx186:tx190", "lane_to_serdes_map_fabric_lane95.BCM8892X": "rx187:tx191", - "lane_to_serdes_map_fabric_lane96.BCM8892X": "rx192:tx199", - "lane_to_serdes_map_fabric_lane97.BCM8892X": "rx193:tx196", + "lane_to_serdes_map_fabric_lane96.BCM8892X": "rx196:tx195", + "lane_to_serdes_map_fabric_lane97.BCM8892X": "rx197:tx192", "lane_to_serdes_map_fabric_lane98.BCM8892X": "rx194:tx197", "lane_to_serdes_map_fabric_lane99.BCM8892X": "rx195:tx198", "phy_rx_polarity_flip_fabric0.BCM8892X": "1", "phy_rx_polarity_flip_fabric1.BCM8892X": "0", "phy_rx_polarity_flip_fabric10.BCM8892X": "1", "phy_rx_polarity_flip_fabric100.BCM8892X": "1", - "phy_rx_polarity_flip_fabric101.BCM8892X": "1", + "phy_rx_polarity_flip_fabric101.BCM8892X": "0", "phy_rx_polarity_flip_fabric102.BCM8892X": "1", "phy_rx_polarity_flip_fabric103.BCM8892X": "0", "phy_rx_polarity_flip_fabric104.BCM8892X": "1", - "phy_rx_polarity_flip_fabric105.BCM8892X": "1", + "phy_rx_polarity_flip_fabric105.BCM8892X": "0", "phy_rx_polarity_flip_fabric106.BCM8892X": "1", "phy_rx_polarity_flip_fabric107.BCM8892X": "0", - "phy_rx_polarity_flip_fabric108.BCM8892X": "1", - "phy_rx_polarity_flip_fabric109.BCM8892X": "1", + "phy_rx_polarity_flip_fabric108.BCM8892X": "0", + "phy_rx_polarity_flip_fabric109.BCM8892X": "0", "phy_rx_polarity_flip_fabric11.BCM8892X": "1", "phy_rx_polarity_flip_fabric110.BCM8892X": "0", "phy_rx_polarity_flip_fabric111.BCM8892X": "1", @@ -769,51 +774,51 @@ "phy_rx_polarity_flip_fabric148.BCM8892X": "0", "phy_rx_polarity_flip_fabric149.BCM8892X": "0", "phy_rx_polarity_flip_fabric15.BCM8892X": "1", - "phy_rx_polarity_flip_fabric150.BCM8892X": "0", + "phy_rx_polarity_flip_fabric150.BCM8892X": "1", "phy_rx_polarity_flip_fabric151.BCM8892X": "1", "phy_rx_polarity_flip_fabric152.BCM8892X": "0", "phy_rx_polarity_flip_fabric153.BCM8892X": "0", - "phy_rx_polarity_flip_fabric154.BCM8892X": "0", + "phy_rx_polarity_flip_fabric154.BCM8892X": "1", "phy_rx_polarity_flip_fabric155.BCM8892X": "1", "phy_rx_polarity_flip_fabric156.BCM8892X": "0", "phy_rx_polarity_flip_fabric157.BCM8892X": "0", - "phy_rx_polarity_flip_fabric158.BCM8892X": "0", + "phy_rx_polarity_flip_fabric158.BCM8892X": "1", "phy_rx_polarity_flip_fabric159.BCM8892X": "1", "phy_rx_polarity_flip_fabric16.BCM8892X": "1", "phy_rx_polarity_flip_fabric160.BCM8892X": "0", "phy_rx_polarity_flip_fabric161.BCM8892X": "0", - "phy_rx_polarity_flip_fabric162.BCM8892X": "0", + "phy_rx_polarity_flip_fabric162.BCM8892X": "1", "phy_rx_polarity_flip_fabric163.BCM8892X": "1", "phy_rx_polarity_flip_fabric164.BCM8892X": "0", "phy_rx_polarity_flip_fabric165.BCM8892X": "0", - "phy_rx_polarity_flip_fabric166.BCM8892X": "0", + "phy_rx_polarity_flip_fabric166.BCM8892X": "1", "phy_rx_polarity_flip_fabric167.BCM8892X": "1", "phy_rx_polarity_flip_fabric168.BCM8892X": "0", "phy_rx_polarity_flip_fabric169.BCM8892X": "0", "phy_rx_polarity_flip_fabric17.BCM8892X": "1", - "phy_rx_polarity_flip_fabric170.BCM8892X": "0", + "phy_rx_polarity_flip_fabric170.BCM8892X": "1", "phy_rx_polarity_flip_fabric171.BCM8892X": "1", "phy_rx_polarity_flip_fabric172.BCM8892X": "0", "phy_rx_polarity_flip_fabric173.BCM8892X": "0", - "phy_rx_polarity_flip_fabric174.BCM8892X": "0", + "phy_rx_polarity_flip_fabric174.BCM8892X": "1", "phy_rx_polarity_flip_fabric175.BCM8892X": "1", "phy_rx_polarity_flip_fabric176.BCM8892X": "0", "phy_rx_polarity_flip_fabric177.BCM8892X": "0", - "phy_rx_polarity_flip_fabric178.BCM8892X": "0", + "phy_rx_polarity_flip_fabric178.BCM8892X": "1", "phy_rx_polarity_flip_fabric179.BCM8892X": "1", "phy_rx_polarity_flip_fabric18.BCM8892X": "1", "phy_rx_polarity_flip_fabric180.BCM8892X": "0", "phy_rx_polarity_flip_fabric181.BCM8892X": "0", - "phy_rx_polarity_flip_fabric182.BCM8892X": "0", + "phy_rx_polarity_flip_fabric182.BCM8892X": "1", "phy_rx_polarity_flip_fabric183.BCM8892X": "1", "phy_rx_polarity_flip_fabric184.BCM8892X": "0", "phy_rx_polarity_flip_fabric185.BCM8892X": "0", - "phy_rx_polarity_flip_fabric186.BCM8892X": "0", + "phy_rx_polarity_flip_fabric186.BCM8892X": "1", "phy_rx_polarity_flip_fabric187.BCM8892X": "1", "phy_rx_polarity_flip_fabric188.BCM8892X": "0", "phy_rx_polarity_flip_fabric189.BCM8892X": "0", "phy_rx_polarity_flip_fabric19.BCM8892X": "0", - "phy_rx_polarity_flip_fabric190.BCM8892X": "0", + "phy_rx_polarity_flip_fabric190.BCM8892X": "1", "phy_rx_polarity_flip_fabric191.BCM8892X": "1", "phy_rx_polarity_flip_fabric192.BCM8892X": "0", "phy_rx_polarity_flip_fabric193.BCM8892X": "0", @@ -846,7 +851,7 @@ "phy_rx_polarity_flip_fabric217.BCM8892X": "0", "phy_rx_polarity_flip_fabric218.BCM8892X": "1", "phy_rx_polarity_flip_fabric219.BCM8892X": "1", - "phy_rx_polarity_flip_fabric22.BCM8892X": "0", + "phy_rx_polarity_flip_fabric22.BCM8892X": "1", "phy_rx_polarity_flip_fabric220.BCM8892X": "0", "phy_rx_polarity_flip_fabric221.BCM8892X": "0", "phy_rx_polarity_flip_fabric222.BCM8892X": "1", @@ -857,13 +862,13 @@ "phy_rx_polarity_flip_fabric227.BCM8892X": "1", "phy_rx_polarity_flip_fabric228.BCM8892X": "0", "phy_rx_polarity_flip_fabric229.BCM8892X": "0", - "phy_rx_polarity_flip_fabric23.BCM8892X": "0", + "phy_rx_polarity_flip_fabric23.BCM8892X": "1", "phy_rx_polarity_flip_fabric230.BCM8892X": "1", "phy_rx_polarity_flip_fabric231.BCM8892X": "1", "phy_rx_polarity_flip_fabric232.BCM8892X": "0", "phy_rx_polarity_flip_fabric233.BCM8892X": "0", - "phy_rx_polarity_flip_fabric234.BCM8892X": "0", - "phy_rx_polarity_flip_fabric235.BCM8892X": "0", + "phy_rx_polarity_flip_fabric234.BCM8892X": "1", + "phy_rx_polarity_flip_fabric235.BCM8892X": "1", "phy_rx_polarity_flip_fabric236.BCM8892X": "0", "phy_rx_polarity_flip_fabric237.BCM8892X": "1", "phy_rx_polarity_flip_fabric238.BCM8892X": "0", @@ -882,7 +887,7 @@ "phy_rx_polarity_flip_fabric25.BCM8892X": "1", "phy_rx_polarity_flip_fabric250.BCM8892X": "1", "phy_rx_polarity_flip_fabric251.BCM8892X": "0", - "phy_rx_polarity_flip_fabric252.BCM8892X": "0", + "phy_rx_polarity_flip_fabric252.BCM8892X": "1", "phy_rx_polarity_flip_fabric253.BCM8892X": "1", "phy_rx_polarity_flip_fabric254.BCM8892X": "0", "phy_rx_polarity_flip_fabric255.BCM8892X": "0", @@ -890,7 +895,7 @@ "phy_rx_polarity_flip_fabric257.BCM8892X": "0", "phy_rx_polarity_flip_fabric258.BCM8892X": "1", "phy_rx_polarity_flip_fabric259.BCM8892X": "1", - "phy_rx_polarity_flip_fabric26.BCM8892X": "0", + "phy_rx_polarity_flip_fabric26.BCM8892X": "1", "phy_rx_polarity_flip_fabric260.BCM8892X": "0", "phy_rx_polarity_flip_fabric261.BCM8892X": "1", "phy_rx_polarity_flip_fabric262.BCM8892X": "0", @@ -901,7 +906,7 @@ "phy_rx_polarity_flip_fabric267.BCM8892X": "1", "phy_rx_polarity_flip_fabric268.BCM8892X": "0", "phy_rx_polarity_flip_fabric269.BCM8892X": "1", - "phy_rx_polarity_flip_fabric27.BCM8892X": "0", + "phy_rx_polarity_flip_fabric27.BCM8892X": "1", "phy_rx_polarity_flip_fabric270.BCM8892X": "0", "phy_rx_polarity_flip_fabric271.BCM8892X": "1", "phy_rx_polarity_flip_fabric272.BCM8892X": "1", @@ -910,104 +915,104 @@ "phy_rx_polarity_flip_fabric275.BCM8892X": "0", "phy_rx_polarity_flip_fabric276.BCM8892X": "1", "phy_rx_polarity_flip_fabric277.BCM8892X": "1", - "phy_rx_polarity_flip_fabric278.BCM8892X": "1", - "phy_rx_polarity_flip_fabric279.BCM8892X": "1", + "phy_rx_polarity_flip_fabric278.BCM8892X": "0", + "phy_rx_polarity_flip_fabric279.BCM8892X": "0", "phy_rx_polarity_flip_fabric28.BCM8892X": "1", "phy_rx_polarity_flip_fabric280.BCM8892X": "1", "phy_rx_polarity_flip_fabric281.BCM8892X": "1", - "phy_rx_polarity_flip_fabric282.BCM8892X": "1", - "phy_rx_polarity_flip_fabric283.BCM8892X": "1", + "phy_rx_polarity_flip_fabric282.BCM8892X": "0", + "phy_rx_polarity_flip_fabric283.BCM8892X": "0", "phy_rx_polarity_flip_fabric284.BCM8892X": "1", "phy_rx_polarity_flip_fabric285.BCM8892X": "1", - "phy_rx_polarity_flip_fabric286.BCM8892X": "1", - "phy_rx_polarity_flip_fabric287.BCM8892X": "1", + "phy_rx_polarity_flip_fabric286.BCM8892X": "0", + "phy_rx_polarity_flip_fabric287.BCM8892X": "0", "phy_rx_polarity_flip_fabric288.BCM8892X": "1", "phy_rx_polarity_flip_fabric289.BCM8892X": "1", "phy_rx_polarity_flip_fabric29.BCM8892X": "1", - "phy_rx_polarity_flip_fabric290.BCM8892X": "1", - "phy_rx_polarity_flip_fabric291.BCM8892X": "1", + "phy_rx_polarity_flip_fabric290.BCM8892X": "0", + "phy_rx_polarity_flip_fabric291.BCM8892X": "0", "phy_rx_polarity_flip_fabric292.BCM8892X": "1", "phy_rx_polarity_flip_fabric293.BCM8892X": "1", - "phy_rx_polarity_flip_fabric294.BCM8892X": "1", - "phy_rx_polarity_flip_fabric295.BCM8892X": "1", + "phy_rx_polarity_flip_fabric294.BCM8892X": "0", + "phy_rx_polarity_flip_fabric295.BCM8892X": "0", "phy_rx_polarity_flip_fabric296.BCM8892X": "1", "phy_rx_polarity_flip_fabric297.BCM8892X": "1", - "phy_rx_polarity_flip_fabric298.BCM8892X": "1", - "phy_rx_polarity_flip_fabric299.BCM8892X": "1", + "phy_rx_polarity_flip_fabric298.BCM8892X": "0", + "phy_rx_polarity_flip_fabric299.BCM8892X": "0", "phy_rx_polarity_flip_fabric3.BCM8892X": "1", - "phy_rx_polarity_flip_fabric30.BCM8892X": "0", + "phy_rx_polarity_flip_fabric30.BCM8892X": "1", "phy_rx_polarity_flip_fabric300.BCM8892X": "1", "phy_rx_polarity_flip_fabric301.BCM8892X": "1", - "phy_rx_polarity_flip_fabric302.BCM8892X": "1", - "phy_rx_polarity_flip_fabric303.BCM8892X": "1", + "phy_rx_polarity_flip_fabric302.BCM8892X": "0", + "phy_rx_polarity_flip_fabric303.BCM8892X": "0", "phy_rx_polarity_flip_fabric304.BCM8892X": "1", "phy_rx_polarity_flip_fabric305.BCM8892X": "1", - "phy_rx_polarity_flip_fabric306.BCM8892X": "1", - "phy_rx_polarity_flip_fabric307.BCM8892X": "1", + "phy_rx_polarity_flip_fabric306.BCM8892X": "0", + "phy_rx_polarity_flip_fabric307.BCM8892X": "0", "phy_rx_polarity_flip_fabric308.BCM8892X": "1", "phy_rx_polarity_flip_fabric309.BCM8892X": "1", - "phy_rx_polarity_flip_fabric31.BCM8892X": "0", - "phy_rx_polarity_flip_fabric310.BCM8892X": "1", - "phy_rx_polarity_flip_fabric311.BCM8892X": "1", + "phy_rx_polarity_flip_fabric31.BCM8892X": "1", + "phy_rx_polarity_flip_fabric310.BCM8892X": "0", + "phy_rx_polarity_flip_fabric311.BCM8892X": "0", "phy_rx_polarity_flip_fabric312.BCM8892X": "1", "phy_rx_polarity_flip_fabric313.BCM8892X": "1", - "phy_rx_polarity_flip_fabric314.BCM8892X": "1", - "phy_rx_polarity_flip_fabric315.BCM8892X": "1", + "phy_rx_polarity_flip_fabric314.BCM8892X": "0", + "phy_rx_polarity_flip_fabric315.BCM8892X": "0", "phy_rx_polarity_flip_fabric316.BCM8892X": "1", "phy_rx_polarity_flip_fabric317.BCM8892X": "1", - "phy_rx_polarity_flip_fabric318.BCM8892X": "1", - "phy_rx_polarity_flip_fabric319.BCM8892X": "1", + "phy_rx_polarity_flip_fabric318.BCM8892X": "0", + "phy_rx_polarity_flip_fabric319.BCM8892X": "0", "phy_rx_polarity_flip_fabric32.BCM8892X": "1", "phy_rx_polarity_flip_fabric320.BCM8892X": "1", - "phy_rx_polarity_flip_fabric321.BCM8892X": "0", + "phy_rx_polarity_flip_fabric321.BCM8892X": "1", "phy_rx_polarity_flip_fabric322.BCM8892X": "0", "phy_rx_polarity_flip_fabric323.BCM8892X": "0", "phy_rx_polarity_flip_fabric324.BCM8892X": "1", - "phy_rx_polarity_flip_fabric325.BCM8892X": "0", + "phy_rx_polarity_flip_fabric325.BCM8892X": "1", "phy_rx_polarity_flip_fabric326.BCM8892X": "0", "phy_rx_polarity_flip_fabric327.BCM8892X": "0", "phy_rx_polarity_flip_fabric328.BCM8892X": "1", - "phy_rx_polarity_flip_fabric329.BCM8892X": "0", + "phy_rx_polarity_flip_fabric329.BCM8892X": "1", "phy_rx_polarity_flip_fabric33.BCM8892X": "1", "phy_rx_polarity_flip_fabric330.BCM8892X": "0", "phy_rx_polarity_flip_fabric331.BCM8892X": "0", "phy_rx_polarity_flip_fabric332.BCM8892X": "1", - "phy_rx_polarity_flip_fabric333.BCM8892X": "0", + "phy_rx_polarity_flip_fabric333.BCM8892X": "1", "phy_rx_polarity_flip_fabric334.BCM8892X": "0", "phy_rx_polarity_flip_fabric335.BCM8892X": "0", "phy_rx_polarity_flip_fabric336.BCM8892X": "1", - "phy_rx_polarity_flip_fabric337.BCM8892X": "0", + "phy_rx_polarity_flip_fabric337.BCM8892X": "1", "phy_rx_polarity_flip_fabric338.BCM8892X": "0", "phy_rx_polarity_flip_fabric339.BCM8892X": "0", - "phy_rx_polarity_flip_fabric34.BCM8892X": "0", + "phy_rx_polarity_flip_fabric34.BCM8892X": "1", "phy_rx_polarity_flip_fabric340.BCM8892X": "1", - "phy_rx_polarity_flip_fabric341.BCM8892X": "0", + "phy_rx_polarity_flip_fabric341.BCM8892X": "1", "phy_rx_polarity_flip_fabric342.BCM8892X": "0", "phy_rx_polarity_flip_fabric343.BCM8892X": "0", "phy_rx_polarity_flip_fabric344.BCM8892X": "1", - "phy_rx_polarity_flip_fabric345.BCM8892X": "0", + "phy_rx_polarity_flip_fabric345.BCM8892X": "1", "phy_rx_polarity_flip_fabric346.BCM8892X": "0", "phy_rx_polarity_flip_fabric347.BCM8892X": "0", "phy_rx_polarity_flip_fabric348.BCM8892X": "1", - "phy_rx_polarity_flip_fabric349.BCM8892X": "0", - "phy_rx_polarity_flip_fabric35.BCM8892X": "0", + "phy_rx_polarity_flip_fabric349.BCM8892X": "1", + "phy_rx_polarity_flip_fabric35.BCM8892X": "1", "phy_rx_polarity_flip_fabric350.BCM8892X": "0", "phy_rx_polarity_flip_fabric351.BCM8892X": "0", "phy_rx_polarity_flip_fabric352.BCM8892X": "1", - "phy_rx_polarity_flip_fabric353.BCM8892X": "0", + "phy_rx_polarity_flip_fabric353.BCM8892X": "1", "phy_rx_polarity_flip_fabric354.BCM8892X": "0", "phy_rx_polarity_flip_fabric355.BCM8892X": "0", "phy_rx_polarity_flip_fabric356.BCM8892X": "1", - "phy_rx_polarity_flip_fabric357.BCM8892X": "0", + "phy_rx_polarity_flip_fabric357.BCM8892X": "1", "phy_rx_polarity_flip_fabric358.BCM8892X": "0", "phy_rx_polarity_flip_fabric359.BCM8892X": "0", "phy_rx_polarity_flip_fabric36.BCM8892X": "1", "phy_rx_polarity_flip_fabric360.BCM8892X": "1", - "phy_rx_polarity_flip_fabric361.BCM8892X": "0", + "phy_rx_polarity_flip_fabric361.BCM8892X": "1", "phy_rx_polarity_flip_fabric362.BCM8892X": "0", "phy_rx_polarity_flip_fabric363.BCM8892X": "0", - "phy_rx_polarity_flip_fabric364.BCM8892X": "0", - "phy_rx_polarity_flip_fabric365.BCM8892X": "0", + "phy_rx_polarity_flip_fabric364.BCM8892X": "1", + "phy_rx_polarity_flip_fabric365.BCM8892X": "1", "phy_rx_polarity_flip_fabric366.BCM8892X": "0", "phy_rx_polarity_flip_fabric367.BCM8892X": "1", "phy_rx_polarity_flip_fabric368.BCM8892X": "0", @@ -1023,7 +1028,7 @@ "phy_rx_polarity_flip_fabric377.BCM8892X": "0", "phy_rx_polarity_flip_fabric378.BCM8892X": "0", "phy_rx_polarity_flip_fabric379.BCM8892X": "1", - "phy_rx_polarity_flip_fabric38.BCM8892X": "0", + "phy_rx_polarity_flip_fabric38.BCM8892X": "1", "phy_rx_polarity_flip_fabric380.BCM8892X": "0", "phy_rx_polarity_flip_fabric381.BCM8892X": "1", "phy_rx_polarity_flip_fabric382.BCM8892X": "1", @@ -1034,7 +1039,7 @@ "phy_rx_polarity_flip_fabric387.BCM8892X": "1", "phy_rx_polarity_flip_fabric388.BCM8892X": "1", "phy_rx_polarity_flip_fabric389.BCM8892X": "1", - "phy_rx_polarity_flip_fabric39.BCM8892X": "0", + "phy_rx_polarity_flip_fabric39.BCM8892X": "1", "phy_rx_polarity_flip_fabric390.BCM8892X": "1", "phy_rx_polarity_flip_fabric391.BCM8892X": "0", "phy_rx_polarity_flip_fabric392.BCM8892X": "1", @@ -1053,51 +1058,51 @@ "phy_rx_polarity_flip_fabric403.BCM8892X": "0", "phy_rx_polarity_flip_fabric404.BCM8892X": "0", "phy_rx_polarity_flip_fabric405.BCM8892X": "1", - "phy_rx_polarity_flip_fabric406.BCM8892X": "1", + "phy_rx_polarity_flip_fabric406.BCM8892X": "0", "phy_rx_polarity_flip_fabric407.BCM8892X": "1", "phy_rx_polarity_flip_fabric408.BCM8892X": "0", "phy_rx_polarity_flip_fabric409.BCM8892X": "1", "phy_rx_polarity_flip_fabric41.BCM8892X": "1", - "phy_rx_polarity_flip_fabric410.BCM8892X": "1", + "phy_rx_polarity_flip_fabric410.BCM8892X": "0", "phy_rx_polarity_flip_fabric411.BCM8892X": "1", "phy_rx_polarity_flip_fabric412.BCM8892X": "0", "phy_rx_polarity_flip_fabric413.BCM8892X": "1", - "phy_rx_polarity_flip_fabric414.BCM8892X": "1", + "phy_rx_polarity_flip_fabric414.BCM8892X": "0", "phy_rx_polarity_flip_fabric415.BCM8892X": "1", "phy_rx_polarity_flip_fabric416.BCM8892X": "0", "phy_rx_polarity_flip_fabric417.BCM8892X": "1", - "phy_rx_polarity_flip_fabric418.BCM8892X": "1", + "phy_rx_polarity_flip_fabric418.BCM8892X": "0", "phy_rx_polarity_flip_fabric419.BCM8892X": "1", - "phy_rx_polarity_flip_fabric42.BCM8892X": "0", + "phy_rx_polarity_flip_fabric42.BCM8892X": "1", "phy_rx_polarity_flip_fabric420.BCM8892X": "0", "phy_rx_polarity_flip_fabric421.BCM8892X": "1", - "phy_rx_polarity_flip_fabric422.BCM8892X": "1", + "phy_rx_polarity_flip_fabric422.BCM8892X": "0", "phy_rx_polarity_flip_fabric423.BCM8892X": "1", "phy_rx_polarity_flip_fabric424.BCM8892X": "0", "phy_rx_polarity_flip_fabric425.BCM8892X": "1", - "phy_rx_polarity_flip_fabric426.BCM8892X": "1", + "phy_rx_polarity_flip_fabric426.BCM8892X": "0", "phy_rx_polarity_flip_fabric427.BCM8892X": "1", "phy_rx_polarity_flip_fabric428.BCM8892X": "0", "phy_rx_polarity_flip_fabric429.BCM8892X": "1", - "phy_rx_polarity_flip_fabric43.BCM8892X": "0", - "phy_rx_polarity_flip_fabric430.BCM8892X": "1", + "phy_rx_polarity_flip_fabric43.BCM8892X": "1", + "phy_rx_polarity_flip_fabric430.BCM8892X": "0", "phy_rx_polarity_flip_fabric431.BCM8892X": "1", "phy_rx_polarity_flip_fabric432.BCM8892X": "0", "phy_rx_polarity_flip_fabric433.BCM8892X": "1", - "phy_rx_polarity_flip_fabric434.BCM8892X": "1", + "phy_rx_polarity_flip_fabric434.BCM8892X": "0", "phy_rx_polarity_flip_fabric435.BCM8892X": "1", "phy_rx_polarity_flip_fabric436.BCM8892X": "0", "phy_rx_polarity_flip_fabric437.BCM8892X": "1", - "phy_rx_polarity_flip_fabric438.BCM8892X": "1", + "phy_rx_polarity_flip_fabric438.BCM8892X": "0", "phy_rx_polarity_flip_fabric439.BCM8892X": "1", "phy_rx_polarity_flip_fabric44.BCM8892X": "1", "phy_rx_polarity_flip_fabric440.BCM8892X": "0", "phy_rx_polarity_flip_fabric441.BCM8892X": "1", - "phy_rx_polarity_flip_fabric442.BCM8892X": "1", + "phy_rx_polarity_flip_fabric442.BCM8892X": "0", "phy_rx_polarity_flip_fabric443.BCM8892X": "1", "phy_rx_polarity_flip_fabric444.BCM8892X": "0", "phy_rx_polarity_flip_fabric445.BCM8892X": "1", - "phy_rx_polarity_flip_fabric446.BCM8892X": "1", + "phy_rx_polarity_flip_fabric446.BCM8892X": "0", "phy_rx_polarity_flip_fabric447.BCM8892X": "1", "phy_rx_polarity_flip_fabric448.BCM8892X": "0", "phy_rx_polarity_flip_fabric449.BCM8892X": "0", @@ -1112,7 +1117,7 @@ "phy_rx_polarity_flip_fabric457.BCM8892X": "0", "phy_rx_polarity_flip_fabric458.BCM8892X": "0", "phy_rx_polarity_flip_fabric459.BCM8892X": "0", - "phy_rx_polarity_flip_fabric46.BCM8892X": "0", + "phy_rx_polarity_flip_fabric46.BCM8892X": "1", "phy_rx_polarity_flip_fabric460.BCM8892X": "0", "phy_rx_polarity_flip_fabric461.BCM8892X": "0", "phy_rx_polarity_flip_fabric462.BCM8892X": "0", @@ -1123,7 +1128,7 @@ "phy_rx_polarity_flip_fabric467.BCM8892X": "0", "phy_rx_polarity_flip_fabric468.BCM8892X": "0", "phy_rx_polarity_flip_fabric469.BCM8892X": "0", - "phy_rx_polarity_flip_fabric47.BCM8892X": "0", + "phy_rx_polarity_flip_fabric47.BCM8892X": "1", "phy_rx_polarity_flip_fabric470.BCM8892X": "0", "phy_rx_polarity_flip_fabric471.BCM8892X": "0", "phy_rx_polarity_flip_fabric472.BCM8892X": "0", @@ -1146,8 +1151,8 @@ "phy_rx_polarity_flip_fabric488.BCM8892X": "0", "phy_rx_polarity_flip_fabric489.BCM8892X": "0", "phy_rx_polarity_flip_fabric49.BCM8892X": "1", - "phy_rx_polarity_flip_fabric490.BCM8892X": "1", - "phy_rx_polarity_flip_fabric491.BCM8892X": "1", + "phy_rx_polarity_flip_fabric490.BCM8892X": "0", + "phy_rx_polarity_flip_fabric491.BCM8892X": "0", "phy_rx_polarity_flip_fabric492.BCM8892X": "0", "phy_rx_polarity_flip_fabric493.BCM8892X": "0", "phy_rx_polarity_flip_fabric494.BCM8892X": "0", @@ -1157,7 +1162,7 @@ "phy_rx_polarity_flip_fabric498.BCM8892X": "1", "phy_rx_polarity_flip_fabric499.BCM8892X": "0", "phy_rx_polarity_flip_fabric5.BCM8892X": "1", - "phy_rx_polarity_flip_fabric50.BCM8892X": "0", + "phy_rx_polarity_flip_fabric50.BCM8892X": "1", "phy_rx_polarity_flip_fabric500.BCM8892X": "1", "phy_rx_polarity_flip_fabric501.BCM8892X": "1", "phy_rx_polarity_flip_fabric502.BCM8892X": "0", @@ -1166,75 +1171,75 @@ "phy_rx_polarity_flip_fabric505.BCM8892X": "0", "phy_rx_polarity_flip_fabric506.BCM8892X": "1", "phy_rx_polarity_flip_fabric507.BCM8892X": "0", - "phy_rx_polarity_flip_fabric508.BCM8892X": "1", + "phy_rx_polarity_flip_fabric508.BCM8892X": "0", "phy_rx_polarity_flip_fabric509.BCM8892X": "1", - "phy_rx_polarity_flip_fabric51.BCM8892X": "0", + "phy_rx_polarity_flip_fabric51.BCM8892X": "1", "phy_rx_polarity_flip_fabric510.BCM8892X": "0", "phy_rx_polarity_flip_fabric511.BCM8892X": "0", "phy_rx_polarity_flip_fabric52.BCM8892X": "1", "phy_rx_polarity_flip_fabric53.BCM8892X": "1", - "phy_rx_polarity_flip_fabric54.BCM8892X": "0", - "phy_rx_polarity_flip_fabric55.BCM8892X": "0", + "phy_rx_polarity_flip_fabric54.BCM8892X": "1", + "phy_rx_polarity_flip_fabric55.BCM8892X": "1", "phy_rx_polarity_flip_fabric56.BCM8892X": "1", "phy_rx_polarity_flip_fabric57.BCM8892X": "1", - "phy_rx_polarity_flip_fabric58.BCM8892X": "0", - "phy_rx_polarity_flip_fabric59.BCM8892X": "0", + "phy_rx_polarity_flip_fabric58.BCM8892X": "1", + "phy_rx_polarity_flip_fabric59.BCM8892X": "1", "phy_rx_polarity_flip_fabric6.BCM8892X": "0", "phy_rx_polarity_flip_fabric60.BCM8892X": "1", "phy_rx_polarity_flip_fabric61.BCM8892X": "1", - "phy_rx_polarity_flip_fabric62.BCM8892X": "0", - "phy_rx_polarity_flip_fabric63.BCM8892X": "0", + "phy_rx_polarity_flip_fabric62.BCM8892X": "1", + "phy_rx_polarity_flip_fabric63.BCM8892X": "1", "phy_rx_polarity_flip_fabric64.BCM8892X": "1", - "phy_rx_polarity_flip_fabric65.BCM8892X": "1", + "phy_rx_polarity_flip_fabric65.BCM8892X": "0", "phy_rx_polarity_flip_fabric66.BCM8892X": "1", "phy_rx_polarity_flip_fabric67.BCM8892X": "0", "phy_rx_polarity_flip_fabric68.BCM8892X": "1", - "phy_rx_polarity_flip_fabric69.BCM8892X": "1", + "phy_rx_polarity_flip_fabric69.BCM8892X": "0", "phy_rx_polarity_flip_fabric7.BCM8892X": "1", "phy_rx_polarity_flip_fabric70.BCM8892X": "1", "phy_rx_polarity_flip_fabric71.BCM8892X": "0", "phy_rx_polarity_flip_fabric72.BCM8892X": "1", - "phy_rx_polarity_flip_fabric73.BCM8892X": "1", + "phy_rx_polarity_flip_fabric73.BCM8892X": "0", "phy_rx_polarity_flip_fabric74.BCM8892X": "1", "phy_rx_polarity_flip_fabric75.BCM8892X": "0", "phy_rx_polarity_flip_fabric76.BCM8892X": "1", - "phy_rx_polarity_flip_fabric77.BCM8892X": "1", + "phy_rx_polarity_flip_fabric77.BCM8892X": "0", "phy_rx_polarity_flip_fabric78.BCM8892X": "1", "phy_rx_polarity_flip_fabric79.BCM8892X": "0", "phy_rx_polarity_flip_fabric8.BCM8892X": "0", "phy_rx_polarity_flip_fabric80.BCM8892X": "1", - "phy_rx_polarity_flip_fabric81.BCM8892X": "1", + "phy_rx_polarity_flip_fabric81.BCM8892X": "0", "phy_rx_polarity_flip_fabric82.BCM8892X": "1", "phy_rx_polarity_flip_fabric83.BCM8892X": "0", "phy_rx_polarity_flip_fabric84.BCM8892X": "1", - "phy_rx_polarity_flip_fabric85.BCM8892X": "1", + "phy_rx_polarity_flip_fabric85.BCM8892X": "0", "phy_rx_polarity_flip_fabric86.BCM8892X": "1", "phy_rx_polarity_flip_fabric87.BCM8892X": "0", "phy_rx_polarity_flip_fabric88.BCM8892X": "1", - "phy_rx_polarity_flip_fabric89.BCM8892X": "1", + "phy_rx_polarity_flip_fabric89.BCM8892X": "0", "phy_rx_polarity_flip_fabric9.BCM8892X": "0", "phy_rx_polarity_flip_fabric90.BCM8892X": "1", "phy_rx_polarity_flip_fabric91.BCM8892X": "0", "phy_rx_polarity_flip_fabric92.BCM8892X": "1", - "phy_rx_polarity_flip_fabric93.BCM8892X": "1", + "phy_rx_polarity_flip_fabric93.BCM8892X": "0", "phy_rx_polarity_flip_fabric94.BCM8892X": "1", "phy_rx_polarity_flip_fabric95.BCM8892X": "0", "phy_rx_polarity_flip_fabric96.BCM8892X": "1", - "phy_rx_polarity_flip_fabric97.BCM8892X": "1", + "phy_rx_polarity_flip_fabric97.BCM8892X": "0", "phy_rx_polarity_flip_fabric98.BCM8892X": "1", "phy_rx_polarity_flip_fabric99.BCM8892X": "0", "phy_tx_polarity_flip_fabric0.BCM8892X": "0", "phy_tx_polarity_flip_fabric1.BCM8892X": "1", "phy_tx_polarity_flip_fabric10.BCM8892X": "1", - "phy_tx_polarity_flip_fabric100.BCM8892X": "1", - "phy_tx_polarity_flip_fabric101.BCM8892X": "1", + "phy_tx_polarity_flip_fabric100.BCM8892X": "0", + "phy_tx_polarity_flip_fabric101.BCM8892X": "0", "phy_tx_polarity_flip_fabric102.BCM8892X": "0", "phy_tx_polarity_flip_fabric103.BCM8892X": "0", "phy_tx_polarity_flip_fabric104.BCM8892X": "1", - "phy_tx_polarity_flip_fabric105.BCM8892X": "0", + "phy_tx_polarity_flip_fabric105.BCM8892X": "1", "phy_tx_polarity_flip_fabric106.BCM8892X": "0", "phy_tx_polarity_flip_fabric107.BCM8892X": "1", - "phy_tx_polarity_flip_fabric108.BCM8892X": "0", + "phy_tx_polarity_flip_fabric108.BCM8892X": "1", "phy_tx_polarity_flip_fabric109.BCM8892X": "0", "phy_tx_polarity_flip_fabric11.BCM8892X": "0", "phy_tx_polarity_flip_fabric110.BCM8892X": "1", @@ -1281,105 +1286,105 @@ "phy_tx_polarity_flip_fabric148.BCM8892X": "0", "phy_tx_polarity_flip_fabric149.BCM8892X": "0", "phy_tx_polarity_flip_fabric15.BCM8892X": "1", - "phy_tx_polarity_flip_fabric150.BCM8892X": "1", + "phy_tx_polarity_flip_fabric150.BCM8892X": "0", "phy_tx_polarity_flip_fabric151.BCM8892X": "1", "phy_tx_polarity_flip_fabric152.BCM8892X": "0", "phy_tx_polarity_flip_fabric153.BCM8892X": "1", "phy_tx_polarity_flip_fabric154.BCM8892X": "1", - "phy_tx_polarity_flip_fabric155.BCM8892X": "0", + "phy_tx_polarity_flip_fabric155.BCM8892X": "1", "phy_tx_polarity_flip_fabric156.BCM8892X": "0", "phy_tx_polarity_flip_fabric157.BCM8892X": "1", "phy_tx_polarity_flip_fabric158.BCM8892X": "1", - "phy_tx_polarity_flip_fabric159.BCM8892X": "0", + "phy_tx_polarity_flip_fabric159.BCM8892X": "1", "phy_tx_polarity_flip_fabric16.BCM8892X": "1", "phy_tx_polarity_flip_fabric160.BCM8892X": "0", "phy_tx_polarity_flip_fabric161.BCM8892X": "0", - "phy_tx_polarity_flip_fabric162.BCM8892X": "1", + "phy_tx_polarity_flip_fabric162.BCM8892X": "0", "phy_tx_polarity_flip_fabric163.BCM8892X": "1", "phy_tx_polarity_flip_fabric164.BCM8892X": "0", "phy_tx_polarity_flip_fabric165.BCM8892X": "0", - "phy_tx_polarity_flip_fabric166.BCM8892X": "1", + "phy_tx_polarity_flip_fabric166.BCM8892X": "0", "phy_tx_polarity_flip_fabric167.BCM8892X": "1", "phy_tx_polarity_flip_fabric168.BCM8892X": "0", "phy_tx_polarity_flip_fabric169.BCM8892X": "1", "phy_tx_polarity_flip_fabric17.BCM8892X": "1", "phy_tx_polarity_flip_fabric170.BCM8892X": "1", - "phy_tx_polarity_flip_fabric171.BCM8892X": "0", + "phy_tx_polarity_flip_fabric171.BCM8892X": "1", "phy_tx_polarity_flip_fabric172.BCM8892X": "0", "phy_tx_polarity_flip_fabric173.BCM8892X": "1", "phy_tx_polarity_flip_fabric174.BCM8892X": "1", - "phy_tx_polarity_flip_fabric175.BCM8892X": "0", + "phy_tx_polarity_flip_fabric175.BCM8892X": "1", "phy_tx_polarity_flip_fabric176.BCM8892X": "0", "phy_tx_polarity_flip_fabric177.BCM8892X": "0", - "phy_tx_polarity_flip_fabric178.BCM8892X": "1", + "phy_tx_polarity_flip_fabric178.BCM8892X": "0", "phy_tx_polarity_flip_fabric179.BCM8892X": "1", "phy_tx_polarity_flip_fabric18.BCM8892X": "1", "phy_tx_polarity_flip_fabric180.BCM8892X": "0", "phy_tx_polarity_flip_fabric181.BCM8892X": "0", - "phy_tx_polarity_flip_fabric182.BCM8892X": "1", + "phy_tx_polarity_flip_fabric182.BCM8892X": "0", "phy_tx_polarity_flip_fabric183.BCM8892X": "1", "phy_tx_polarity_flip_fabric184.BCM8892X": "0", "phy_tx_polarity_flip_fabric185.BCM8892X": "1", "phy_tx_polarity_flip_fabric186.BCM8892X": "1", - "phy_tx_polarity_flip_fabric187.BCM8892X": "0", + "phy_tx_polarity_flip_fabric187.BCM8892X": "1", "phy_tx_polarity_flip_fabric188.BCM8892X": "0", "phy_tx_polarity_flip_fabric189.BCM8892X": "1", "phy_tx_polarity_flip_fabric19.BCM8892X": "1", "phy_tx_polarity_flip_fabric190.BCM8892X": "1", - "phy_tx_polarity_flip_fabric191.BCM8892X": "0", - "phy_tx_polarity_flip_fabric192.BCM8892X": "0", - "phy_tx_polarity_flip_fabric193.BCM8892X": "1", + "phy_tx_polarity_flip_fabric191.BCM8892X": "1", + "phy_tx_polarity_flip_fabric192.BCM8892X": "1", + "phy_tx_polarity_flip_fabric193.BCM8892X": "0", "phy_tx_polarity_flip_fabric194.BCM8892X": "0", "phy_tx_polarity_flip_fabric195.BCM8892X": "1", - "phy_tx_polarity_flip_fabric196.BCM8892X": "0", - "phy_tx_polarity_flip_fabric197.BCM8892X": "1", + "phy_tx_polarity_flip_fabric196.BCM8892X": "1", + "phy_tx_polarity_flip_fabric197.BCM8892X": "0", "phy_tx_polarity_flip_fabric198.BCM8892X": "0", "phy_tx_polarity_flip_fabric199.BCM8892X": "1", "phy_tx_polarity_flip_fabric2.BCM8892X": "0", "phy_tx_polarity_flip_fabric20.BCM8892X": "1", - "phy_tx_polarity_flip_fabric200.BCM8892X": "1", - "phy_tx_polarity_flip_fabric201.BCM8892X": "0", + "phy_tx_polarity_flip_fabric200.BCM8892X": "0", + "phy_tx_polarity_flip_fabric201.BCM8892X": "1", "phy_tx_polarity_flip_fabric202.BCM8892X": "1", "phy_tx_polarity_flip_fabric203.BCM8892X": "0", - "phy_tx_polarity_flip_fabric204.BCM8892X": "1", - "phy_tx_polarity_flip_fabric205.BCM8892X": "0", + "phy_tx_polarity_flip_fabric204.BCM8892X": "0", + "phy_tx_polarity_flip_fabric205.BCM8892X": "1", "phy_tx_polarity_flip_fabric206.BCM8892X": "1", "phy_tx_polarity_flip_fabric207.BCM8892X": "0", - "phy_tx_polarity_flip_fabric208.BCM8892X": "0", - "phy_tx_polarity_flip_fabric209.BCM8892X": "1", + "phy_tx_polarity_flip_fabric208.BCM8892X": "1", + "phy_tx_polarity_flip_fabric209.BCM8892X": "0", "phy_tx_polarity_flip_fabric21.BCM8892X": "0", "phy_tx_polarity_flip_fabric210.BCM8892X": "0", "phy_tx_polarity_flip_fabric211.BCM8892X": "1", - "phy_tx_polarity_flip_fabric212.BCM8892X": "0", - "phy_tx_polarity_flip_fabric213.BCM8892X": "1", + "phy_tx_polarity_flip_fabric212.BCM8892X": "1", + "phy_tx_polarity_flip_fabric213.BCM8892X": "0", "phy_tx_polarity_flip_fabric214.BCM8892X": "0", "phy_tx_polarity_flip_fabric215.BCM8892X": "1", - "phy_tx_polarity_flip_fabric216.BCM8892X": "1", - "phy_tx_polarity_flip_fabric217.BCM8892X": "0", + "phy_tx_polarity_flip_fabric216.BCM8892X": "0", + "phy_tx_polarity_flip_fabric217.BCM8892X": "1", "phy_tx_polarity_flip_fabric218.BCM8892X": "1", "phy_tx_polarity_flip_fabric219.BCM8892X": "0", - "phy_tx_polarity_flip_fabric22.BCM8892X": "1", - "phy_tx_polarity_flip_fabric220.BCM8892X": "1", - "phy_tx_polarity_flip_fabric221.BCM8892X": "0", + "phy_tx_polarity_flip_fabric22.BCM8892X": "0", + "phy_tx_polarity_flip_fabric220.BCM8892X": "0", + "phy_tx_polarity_flip_fabric221.BCM8892X": "1", "phy_tx_polarity_flip_fabric222.BCM8892X": "1", "phy_tx_polarity_flip_fabric223.BCM8892X": "0", - "phy_tx_polarity_flip_fabric224.BCM8892X": "0", - "phy_tx_polarity_flip_fabric225.BCM8892X": "1", + "phy_tx_polarity_flip_fabric224.BCM8892X": "1", + "phy_tx_polarity_flip_fabric225.BCM8892X": "0", "phy_tx_polarity_flip_fabric226.BCM8892X": "0", "phy_tx_polarity_flip_fabric227.BCM8892X": "1", - "phy_tx_polarity_flip_fabric228.BCM8892X": "0", - "phy_tx_polarity_flip_fabric229.BCM8892X": "1", - "phy_tx_polarity_flip_fabric23.BCM8892X": "0", + "phy_tx_polarity_flip_fabric228.BCM8892X": "1", + "phy_tx_polarity_flip_fabric229.BCM8892X": "0", + "phy_tx_polarity_flip_fabric23.BCM8892X": "1", "phy_tx_polarity_flip_fabric230.BCM8892X": "0", "phy_tx_polarity_flip_fabric231.BCM8892X": "1", "phy_tx_polarity_flip_fabric232.BCM8892X": "1", "phy_tx_polarity_flip_fabric233.BCM8892X": "1", - "phy_tx_polarity_flip_fabric234.BCM8892X": "0", - "phy_tx_polarity_flip_fabric235.BCM8892X": "1", + "phy_tx_polarity_flip_fabric234.BCM8892X": "1", + "phy_tx_polarity_flip_fabric235.BCM8892X": "0", "phy_tx_polarity_flip_fabric236.BCM8892X": "1", "phy_tx_polarity_flip_fabric237.BCM8892X": "0", "phy_tx_polarity_flip_fabric238.BCM8892X": "0", - "phy_tx_polarity_flip_fabric239.BCM8892X": "1", + "phy_tx_polarity_flip_fabric239.BCM8892X": "0", "phy_tx_polarity_flip_fabric24.BCM8892X": "0", "phy_tx_polarity_flip_fabric240.BCM8892X": "1", "phy_tx_polarity_flip_fabric241.BCM8892X": "0", @@ -1402,7 +1407,7 @@ "phy_tx_polarity_flip_fabric257.BCM8892X": "1", "phy_tx_polarity_flip_fabric258.BCM8892X": "0", "phy_tx_polarity_flip_fabric259.BCM8892X": "1", - "phy_tx_polarity_flip_fabric26.BCM8892X": "0", + "phy_tx_polarity_flip_fabric26.BCM8892X": "1", "phy_tx_polarity_flip_fabric260.BCM8892X": "0", "phy_tx_polarity_flip_fabric261.BCM8892X": "1", "phy_tx_polarity_flip_fabric262.BCM8892X": "1", @@ -1413,7 +1418,7 @@ "phy_tx_polarity_flip_fabric267.BCM8892X": "0", "phy_tx_polarity_flip_fabric268.BCM8892X": "1", "phy_tx_polarity_flip_fabric269.BCM8892X": "0", - "phy_tx_polarity_flip_fabric27.BCM8892X": "1", + "phy_tx_polarity_flip_fabric27.BCM8892X": "0", "phy_tx_polarity_flip_fabric270.BCM8892X": "0", "phy_tx_polarity_flip_fabric271.BCM8892X": "1", "phy_tx_polarity_flip_fabric272.BCM8892X": "0", @@ -1422,103 +1427,103 @@ "phy_tx_polarity_flip_fabric275.BCM8892X": "1", "phy_tx_polarity_flip_fabric276.BCM8892X": "0", "phy_tx_polarity_flip_fabric277.BCM8892X": "0", - "phy_tx_polarity_flip_fabric278.BCM8892X": "0", - "phy_tx_polarity_flip_fabric279.BCM8892X": "1", + "phy_tx_polarity_flip_fabric278.BCM8892X": "1", + "phy_tx_polarity_flip_fabric279.BCM8892X": "0", "phy_tx_polarity_flip_fabric28.BCM8892X": "0", "phy_tx_polarity_flip_fabric280.BCM8892X": "1", "phy_tx_polarity_flip_fabric281.BCM8892X": "0", - "phy_tx_polarity_flip_fabric282.BCM8892X": "1", - "phy_tx_polarity_flip_fabric283.BCM8892X": "0", + "phy_tx_polarity_flip_fabric282.BCM8892X": "0", + "phy_tx_polarity_flip_fabric283.BCM8892X": "1", "phy_tx_polarity_flip_fabric284.BCM8892X": "1", "phy_tx_polarity_flip_fabric285.BCM8892X": "0", - "phy_tx_polarity_flip_fabric286.BCM8892X": "1", - "phy_tx_polarity_flip_fabric287.BCM8892X": "0", + "phy_tx_polarity_flip_fabric286.BCM8892X": "0", + "phy_tx_polarity_flip_fabric287.BCM8892X": "1", "phy_tx_polarity_flip_fabric288.BCM8892X": "0", "phy_tx_polarity_flip_fabric289.BCM8892X": "1", "phy_tx_polarity_flip_fabric29.BCM8892X": "1", - "phy_tx_polarity_flip_fabric290.BCM8892X": "0", - "phy_tx_polarity_flip_fabric291.BCM8892X": "1", + "phy_tx_polarity_flip_fabric290.BCM8892X": "1", + "phy_tx_polarity_flip_fabric291.BCM8892X": "0", "phy_tx_polarity_flip_fabric292.BCM8892X": "0", "phy_tx_polarity_flip_fabric293.BCM8892X": "1", - "phy_tx_polarity_flip_fabric294.BCM8892X": "0", - "phy_tx_polarity_flip_fabric295.BCM8892X": "1", + "phy_tx_polarity_flip_fabric294.BCM8892X": "1", + "phy_tx_polarity_flip_fabric295.BCM8892X": "0", "phy_tx_polarity_flip_fabric296.BCM8892X": "1", "phy_tx_polarity_flip_fabric297.BCM8892X": "0", - "phy_tx_polarity_flip_fabric298.BCM8892X": "1", - "phy_tx_polarity_flip_fabric299.BCM8892X": "0", + "phy_tx_polarity_flip_fabric298.BCM8892X": "0", + "phy_tx_polarity_flip_fabric299.BCM8892X": "1", "phy_tx_polarity_flip_fabric3.BCM8892X": "1", - "phy_tx_polarity_flip_fabric30.BCM8892X": "0", + "phy_tx_polarity_flip_fabric30.BCM8892X": "1", "phy_tx_polarity_flip_fabric300.BCM8892X": "1", "phy_tx_polarity_flip_fabric301.BCM8892X": "0", - "phy_tx_polarity_flip_fabric302.BCM8892X": "1", - "phy_tx_polarity_flip_fabric303.BCM8892X": "0", + "phy_tx_polarity_flip_fabric302.BCM8892X": "0", + "phy_tx_polarity_flip_fabric303.BCM8892X": "1", "phy_tx_polarity_flip_fabric304.BCM8892X": "0", "phy_tx_polarity_flip_fabric305.BCM8892X": "1", - "phy_tx_polarity_flip_fabric306.BCM8892X": "0", - "phy_tx_polarity_flip_fabric307.BCM8892X": "1", + "phy_tx_polarity_flip_fabric306.BCM8892X": "1", + "phy_tx_polarity_flip_fabric307.BCM8892X": "0", "phy_tx_polarity_flip_fabric308.BCM8892X": "0", "phy_tx_polarity_flip_fabric309.BCM8892X": "1", - "phy_tx_polarity_flip_fabric31.BCM8892X": "1", - "phy_tx_polarity_flip_fabric310.BCM8892X": "0", - "phy_tx_polarity_flip_fabric311.BCM8892X": "1", + "phy_tx_polarity_flip_fabric31.BCM8892X": "0", + "phy_tx_polarity_flip_fabric310.BCM8892X": "1", + "phy_tx_polarity_flip_fabric311.BCM8892X": "0", "phy_tx_polarity_flip_fabric312.BCM8892X": "1", "phy_tx_polarity_flip_fabric313.BCM8892X": "0", - "phy_tx_polarity_flip_fabric314.BCM8892X": "1", - "phy_tx_polarity_flip_fabric315.BCM8892X": "0", + "phy_tx_polarity_flip_fabric314.BCM8892X": "0", + "phy_tx_polarity_flip_fabric315.BCM8892X": "1", "phy_tx_polarity_flip_fabric316.BCM8892X": "1", "phy_tx_polarity_flip_fabric317.BCM8892X": "0", - "phy_tx_polarity_flip_fabric318.BCM8892X": "1", - "phy_tx_polarity_flip_fabric319.BCM8892X": "0", + "phy_tx_polarity_flip_fabric318.BCM8892X": "0", + "phy_tx_polarity_flip_fabric319.BCM8892X": "1", "phy_tx_polarity_flip_fabric32.BCM8892X": "1", - "phy_tx_polarity_flip_fabric320.BCM8892X": "0", - "phy_tx_polarity_flip_fabric321.BCM8892X": "0", + "phy_tx_polarity_flip_fabric320.BCM8892X": "1", + "phy_tx_polarity_flip_fabric321.BCM8892X": "1", "phy_tx_polarity_flip_fabric322.BCM8892X": "1", "phy_tx_polarity_flip_fabric323.BCM8892X": "0", - "phy_tx_polarity_flip_fabric324.BCM8892X": "0", - "phy_tx_polarity_flip_fabric325.BCM8892X": "0", + "phy_tx_polarity_flip_fabric324.BCM8892X": "1", + "phy_tx_polarity_flip_fabric325.BCM8892X": "1", "phy_tx_polarity_flip_fabric326.BCM8892X": "1", "phy_tx_polarity_flip_fabric327.BCM8892X": "0", - "phy_tx_polarity_flip_fabric328.BCM8892X": "0", - "phy_tx_polarity_flip_fabric329.BCM8892X": "1", + "phy_tx_polarity_flip_fabric328.BCM8892X": "1", + "phy_tx_polarity_flip_fabric329.BCM8892X": "0", "phy_tx_polarity_flip_fabric33.BCM8892X": "0", "phy_tx_polarity_flip_fabric330.BCM8892X": "0", "phy_tx_polarity_flip_fabric331.BCM8892X": "0", - "phy_tx_polarity_flip_fabric332.BCM8892X": "0", - "phy_tx_polarity_flip_fabric333.BCM8892X": "1", + "phy_tx_polarity_flip_fabric332.BCM8892X": "1", + "phy_tx_polarity_flip_fabric333.BCM8892X": "0", "phy_tx_polarity_flip_fabric334.BCM8892X": "0", "phy_tx_polarity_flip_fabric335.BCM8892X": "0", - "phy_tx_polarity_flip_fabric336.BCM8892X": "0", - "phy_tx_polarity_flip_fabric337.BCM8892X": "0", + "phy_tx_polarity_flip_fabric336.BCM8892X": "1", + "phy_tx_polarity_flip_fabric337.BCM8892X": "1", "phy_tx_polarity_flip_fabric338.BCM8892X": "1", "phy_tx_polarity_flip_fabric339.BCM8892X": "0", - "phy_tx_polarity_flip_fabric34.BCM8892X": "1", - "phy_tx_polarity_flip_fabric340.BCM8892X": "0", - "phy_tx_polarity_flip_fabric341.BCM8892X": "0", + "phy_tx_polarity_flip_fabric34.BCM8892X": "0", + "phy_tx_polarity_flip_fabric340.BCM8892X": "1", + "phy_tx_polarity_flip_fabric341.BCM8892X": "1", "phy_tx_polarity_flip_fabric342.BCM8892X": "1", "phy_tx_polarity_flip_fabric343.BCM8892X": "0", - "phy_tx_polarity_flip_fabric344.BCM8892X": "0", - "phy_tx_polarity_flip_fabric345.BCM8892X": "1", + "phy_tx_polarity_flip_fabric344.BCM8892X": "1", + "phy_tx_polarity_flip_fabric345.BCM8892X": "0", "phy_tx_polarity_flip_fabric346.BCM8892X": "0", "phy_tx_polarity_flip_fabric347.BCM8892X": "0", - "phy_tx_polarity_flip_fabric348.BCM8892X": "0", - "phy_tx_polarity_flip_fabric349.BCM8892X": "1", - "phy_tx_polarity_flip_fabric35.BCM8892X": "0", + "phy_tx_polarity_flip_fabric348.BCM8892X": "1", + "phy_tx_polarity_flip_fabric349.BCM8892X": "0", + "phy_tx_polarity_flip_fabric35.BCM8892X": "1", "phy_tx_polarity_flip_fabric350.BCM8892X": "0", "phy_tx_polarity_flip_fabric351.BCM8892X": "0", - "phy_tx_polarity_flip_fabric352.BCM8892X": "0", - "phy_tx_polarity_flip_fabric353.BCM8892X": "0", + "phy_tx_polarity_flip_fabric352.BCM8892X": "1", + "phy_tx_polarity_flip_fabric353.BCM8892X": "1", "phy_tx_polarity_flip_fabric354.BCM8892X": "1", "phy_tx_polarity_flip_fabric355.BCM8892X": "0", - "phy_tx_polarity_flip_fabric356.BCM8892X": "0", - "phy_tx_polarity_flip_fabric357.BCM8892X": "0", + "phy_tx_polarity_flip_fabric356.BCM8892X": "1", + "phy_tx_polarity_flip_fabric357.BCM8892X": "1", "phy_tx_polarity_flip_fabric358.BCM8892X": "1", "phy_tx_polarity_flip_fabric359.BCM8892X": "0", "phy_tx_polarity_flip_fabric36.BCM8892X": "1", "phy_tx_polarity_flip_fabric360.BCM8892X": "1", - "phy_tx_polarity_flip_fabric361.BCM8892X": "1", + "phy_tx_polarity_flip_fabric361.BCM8892X": "0", "phy_tx_polarity_flip_fabric362.BCM8892X": "0", "phy_tx_polarity_flip_fabric363.BCM8892X": "0", - "phy_tx_polarity_flip_fabric364.BCM8892X": "1", + "phy_tx_polarity_flip_fabric364.BCM8892X": "0", "phy_tx_polarity_flip_fabric365.BCM8892X": "0", "phy_tx_polarity_flip_fabric366.BCM8892X": "1", "phy_tx_polarity_flip_fabric367.BCM8892X": "1", @@ -1535,7 +1540,7 @@ "phy_tx_polarity_flip_fabric377.BCM8892X": "1", "phy_tx_polarity_flip_fabric378.BCM8892X": "1", "phy_tx_polarity_flip_fabric379.BCM8892X": "0", - "phy_tx_polarity_flip_fabric38.BCM8892X": "1", + "phy_tx_polarity_flip_fabric38.BCM8892X": "0", "phy_tx_polarity_flip_fabric380.BCM8892X": "0", "phy_tx_polarity_flip_fabric381.BCM8892X": "0", "phy_tx_polarity_flip_fabric382.BCM8892X": "0", @@ -1546,7 +1551,7 @@ "phy_tx_polarity_flip_fabric387.BCM8892X": "1", "phy_tx_polarity_flip_fabric388.BCM8892X": "0", "phy_tx_polarity_flip_fabric389.BCM8892X": "1", - "phy_tx_polarity_flip_fabric39.BCM8892X": "0", + "phy_tx_polarity_flip_fabric39.BCM8892X": "1", "phy_tx_polarity_flip_fabric390.BCM8892X": "1", "phy_tx_polarity_flip_fabric391.BCM8892X": "0", "phy_tx_polarity_flip_fabric392.BCM8892X": "1", @@ -1565,111 +1570,111 @@ "phy_tx_polarity_flip_fabric403.BCM8892X": "0", "phy_tx_polarity_flip_fabric404.BCM8892X": "1", "phy_tx_polarity_flip_fabric405.BCM8892X": "0", - "phy_tx_polarity_flip_fabric406.BCM8892X": "0", + "phy_tx_polarity_flip_fabric406.BCM8892X": "1", "phy_tx_polarity_flip_fabric407.BCM8892X": "1", "phy_tx_polarity_flip_fabric408.BCM8892X": "1", "phy_tx_polarity_flip_fabric409.BCM8892X": "0", "phy_tx_polarity_flip_fabric41.BCM8892X": "1", "phy_tx_polarity_flip_fabric410.BCM8892X": "1", - "phy_tx_polarity_flip_fabric411.BCM8892X": "1", + "phy_tx_polarity_flip_fabric411.BCM8892X": "0", "phy_tx_polarity_flip_fabric412.BCM8892X": "1", "phy_tx_polarity_flip_fabric413.BCM8892X": "0", "phy_tx_polarity_flip_fabric414.BCM8892X": "1", - "phy_tx_polarity_flip_fabric415.BCM8892X": "1", + "phy_tx_polarity_flip_fabric415.BCM8892X": "0", "phy_tx_polarity_flip_fabric416.BCM8892X": "1", "phy_tx_polarity_flip_fabric417.BCM8892X": "1", - "phy_tx_polarity_flip_fabric418.BCM8892X": "0", + "phy_tx_polarity_flip_fabric418.BCM8892X": "1", "phy_tx_polarity_flip_fabric419.BCM8892X": "1", - "phy_tx_polarity_flip_fabric42.BCM8892X": "0", + "phy_tx_polarity_flip_fabric42.BCM8892X": "1", "phy_tx_polarity_flip_fabric420.BCM8892X": "1", "phy_tx_polarity_flip_fabric421.BCM8892X": "1", - "phy_tx_polarity_flip_fabric422.BCM8892X": "0", + "phy_tx_polarity_flip_fabric422.BCM8892X": "1", "phy_tx_polarity_flip_fabric423.BCM8892X": "1", "phy_tx_polarity_flip_fabric424.BCM8892X": "1", "phy_tx_polarity_flip_fabric425.BCM8892X": "0", "phy_tx_polarity_flip_fabric426.BCM8892X": "1", - "phy_tx_polarity_flip_fabric427.BCM8892X": "1", + "phy_tx_polarity_flip_fabric427.BCM8892X": "0", "phy_tx_polarity_flip_fabric428.BCM8892X": "1", "phy_tx_polarity_flip_fabric429.BCM8892X": "0", - "phy_tx_polarity_flip_fabric43.BCM8892X": "1", + "phy_tx_polarity_flip_fabric43.BCM8892X": "0", "phy_tx_polarity_flip_fabric430.BCM8892X": "1", - "phy_tx_polarity_flip_fabric431.BCM8892X": "1", + "phy_tx_polarity_flip_fabric431.BCM8892X": "0", "phy_tx_polarity_flip_fabric432.BCM8892X": "1", "phy_tx_polarity_flip_fabric433.BCM8892X": "1", - "phy_tx_polarity_flip_fabric434.BCM8892X": "0", + "phy_tx_polarity_flip_fabric434.BCM8892X": "1", "phy_tx_polarity_flip_fabric435.BCM8892X": "1", "phy_tx_polarity_flip_fabric436.BCM8892X": "1", "phy_tx_polarity_flip_fabric437.BCM8892X": "1", - "phy_tx_polarity_flip_fabric438.BCM8892X": "0", + "phy_tx_polarity_flip_fabric438.BCM8892X": "1", "phy_tx_polarity_flip_fabric439.BCM8892X": "1", "phy_tx_polarity_flip_fabric44.BCM8892X": "0", "phy_tx_polarity_flip_fabric440.BCM8892X": "1", "phy_tx_polarity_flip_fabric441.BCM8892X": "0", "phy_tx_polarity_flip_fabric442.BCM8892X": "1", - "phy_tx_polarity_flip_fabric443.BCM8892X": "1", + "phy_tx_polarity_flip_fabric443.BCM8892X": "0", "phy_tx_polarity_flip_fabric444.BCM8892X": "1", "phy_tx_polarity_flip_fabric445.BCM8892X": "0", "phy_tx_polarity_flip_fabric446.BCM8892X": "1", - "phy_tx_polarity_flip_fabric447.BCM8892X": "1", - "phy_tx_polarity_flip_fabric448.BCM8892X": "1", - "phy_tx_polarity_flip_fabric449.BCM8892X": "0", + "phy_tx_polarity_flip_fabric447.BCM8892X": "0", + "phy_tx_polarity_flip_fabric448.BCM8892X": "0", + "phy_tx_polarity_flip_fabric449.BCM8892X": "1", "phy_tx_polarity_flip_fabric45.BCM8892X": "1", "phy_tx_polarity_flip_fabric450.BCM8892X": "1", "phy_tx_polarity_flip_fabric451.BCM8892X": "0", - "phy_tx_polarity_flip_fabric452.BCM8892X": "1", - "phy_tx_polarity_flip_fabric453.BCM8892X": "0", + "phy_tx_polarity_flip_fabric452.BCM8892X": "0", + "phy_tx_polarity_flip_fabric453.BCM8892X": "1", "phy_tx_polarity_flip_fabric454.BCM8892X": "1", "phy_tx_polarity_flip_fabric455.BCM8892X": "0", - "phy_tx_polarity_flip_fabric456.BCM8892X": "0", - "phy_tx_polarity_flip_fabric457.BCM8892X": "1", + "phy_tx_polarity_flip_fabric456.BCM8892X": "1", + "phy_tx_polarity_flip_fabric457.BCM8892X": "0", "phy_tx_polarity_flip_fabric458.BCM8892X": "0", "phy_tx_polarity_flip_fabric459.BCM8892X": "1", - "phy_tx_polarity_flip_fabric46.BCM8892X": "0", - "phy_tx_polarity_flip_fabric460.BCM8892X": "0", - "phy_tx_polarity_flip_fabric461.BCM8892X": "1", + "phy_tx_polarity_flip_fabric46.BCM8892X": "1", + "phy_tx_polarity_flip_fabric460.BCM8892X": "1", + "phy_tx_polarity_flip_fabric461.BCM8892X": "0", "phy_tx_polarity_flip_fabric462.BCM8892X": "0", "phy_tx_polarity_flip_fabric463.BCM8892X": "1", - "phy_tx_polarity_flip_fabric464.BCM8892X": "1", - "phy_tx_polarity_flip_fabric465.BCM8892X": "0", + "phy_tx_polarity_flip_fabric464.BCM8892X": "0", + "phy_tx_polarity_flip_fabric465.BCM8892X": "1", "phy_tx_polarity_flip_fabric466.BCM8892X": "1", "phy_tx_polarity_flip_fabric467.BCM8892X": "0", - "phy_tx_polarity_flip_fabric468.BCM8892X": "1", - "phy_tx_polarity_flip_fabric469.BCM8892X": "0", - "phy_tx_polarity_flip_fabric47.BCM8892X": "1", + "phy_tx_polarity_flip_fabric468.BCM8892X": "0", + "phy_tx_polarity_flip_fabric469.BCM8892X": "1", + "phy_tx_polarity_flip_fabric47.BCM8892X": "0", "phy_tx_polarity_flip_fabric470.BCM8892X": "1", "phy_tx_polarity_flip_fabric471.BCM8892X": "0", - "phy_tx_polarity_flip_fabric472.BCM8892X": "0", - "phy_tx_polarity_flip_fabric473.BCM8892X": "1", + "phy_tx_polarity_flip_fabric472.BCM8892X": "1", + "phy_tx_polarity_flip_fabric473.BCM8892X": "0", "phy_tx_polarity_flip_fabric474.BCM8892X": "0", "phy_tx_polarity_flip_fabric475.BCM8892X": "1", - "phy_tx_polarity_flip_fabric476.BCM8892X": "0", - "phy_tx_polarity_flip_fabric477.BCM8892X": "1", + "phy_tx_polarity_flip_fabric476.BCM8892X": "1", + "phy_tx_polarity_flip_fabric477.BCM8892X": "0", "phy_tx_polarity_flip_fabric478.BCM8892X": "0", "phy_tx_polarity_flip_fabric479.BCM8892X": "1", "phy_tx_polarity_flip_fabric48.BCM8892X": "1", - "phy_tx_polarity_flip_fabric480.BCM8892X": "1", - "phy_tx_polarity_flip_fabric481.BCM8892X": "0", + "phy_tx_polarity_flip_fabric480.BCM8892X": "0", + "phy_tx_polarity_flip_fabric481.BCM8892X": "1", "phy_tx_polarity_flip_fabric482.BCM8892X": "1", "phy_tx_polarity_flip_fabric483.BCM8892X": "0", - "phy_tx_polarity_flip_fabric484.BCM8892X": "1", - "phy_tx_polarity_flip_fabric485.BCM8892X": "0", + "phy_tx_polarity_flip_fabric484.BCM8892X": "0", + "phy_tx_polarity_flip_fabric485.BCM8892X": "1", "phy_tx_polarity_flip_fabric486.BCM8892X": "1", "phy_tx_polarity_flip_fabric487.BCM8892X": "0", "phy_tx_polarity_flip_fabric488.BCM8892X": "1", "phy_tx_polarity_flip_fabric489.BCM8892X": "0", "phy_tx_polarity_flip_fabric49.BCM8892X": "0", - "phy_tx_polarity_flip_fabric490.BCM8892X": "1", - "phy_tx_polarity_flip_fabric491.BCM8892X": "0", + "phy_tx_polarity_flip_fabric490.BCM8892X": "0", + "phy_tx_polarity_flip_fabric491.BCM8892X": "1", "phy_tx_polarity_flip_fabric492.BCM8892X": "0", "phy_tx_polarity_flip_fabric493.BCM8892X": "0", "phy_tx_polarity_flip_fabric494.BCM8892X": "0", - "phy_tx_polarity_flip_fabric495.BCM8892X": "0", + "phy_tx_polarity_flip_fabric495.BCM8892X": "1", "phy_tx_polarity_flip_fabric496.BCM8892X": "1", "phy_tx_polarity_flip_fabric497.BCM8892X": "0", "phy_tx_polarity_flip_fabric498.BCM8892X": "0", "phy_tx_polarity_flip_fabric499.BCM8892X": "1", "phy_tx_polarity_flip_fabric5.BCM8892X": "1", - "phy_tx_polarity_flip_fabric50.BCM8892X": "1", + "phy_tx_polarity_flip_fabric50.BCM8892X": "0", "phy_tx_polarity_flip_fabric500.BCM8892X": "1", "phy_tx_polarity_flip_fabric501.BCM8892X": "0", "phy_tx_polarity_flip_fabric502.BCM8892X": "1", @@ -1680,81 +1685,81 @@ "phy_tx_polarity_flip_fabric507.BCM8892X": "0", "phy_tx_polarity_flip_fabric508.BCM8892X": "0", "phy_tx_polarity_flip_fabric509.BCM8892X": "1", - "phy_tx_polarity_flip_fabric51.BCM8892X": "0", + "phy_tx_polarity_flip_fabric51.BCM8892X": "1", "phy_tx_polarity_flip_fabric510.BCM8892X": "0", "phy_tx_polarity_flip_fabric511.BCM8892X": "1", "phy_tx_polarity_flip_fabric52.BCM8892X": "1", "phy_tx_polarity_flip_fabric53.BCM8892X": "0", - "phy_tx_polarity_flip_fabric54.BCM8892X": "1", - "phy_tx_polarity_flip_fabric55.BCM8892X": "0", + "phy_tx_polarity_flip_fabric54.BCM8892X": "0", + "phy_tx_polarity_flip_fabric55.BCM8892X": "1", "phy_tx_polarity_flip_fabric56.BCM8892X": "0", "phy_tx_polarity_flip_fabric57.BCM8892X": "1", - "phy_tx_polarity_flip_fabric58.BCM8892X": "0", - "phy_tx_polarity_flip_fabric59.BCM8892X": "1", + "phy_tx_polarity_flip_fabric58.BCM8892X": "1", + "phy_tx_polarity_flip_fabric59.BCM8892X": "0", "phy_tx_polarity_flip_fabric6.BCM8892X": "1", "phy_tx_polarity_flip_fabric60.BCM8892X": "0", "phy_tx_polarity_flip_fabric61.BCM8892X": "1", - "phy_tx_polarity_flip_fabric62.BCM8892X": "0", - "phy_tx_polarity_flip_fabric63.BCM8892X": "1", - "phy_tx_polarity_flip_fabric64.BCM8892X": "1", - "phy_tx_polarity_flip_fabric65.BCM8892X": "1", + "phy_tx_polarity_flip_fabric62.BCM8892X": "1", + "phy_tx_polarity_flip_fabric63.BCM8892X": "0", + "phy_tx_polarity_flip_fabric64.BCM8892X": "0", + "phy_tx_polarity_flip_fabric65.BCM8892X": "0", "phy_tx_polarity_flip_fabric66.BCM8892X": "0", "phy_tx_polarity_flip_fabric67.BCM8892X": "0", - "phy_tx_polarity_flip_fabric68.BCM8892X": "1", - "phy_tx_polarity_flip_fabric69.BCM8892X": "1", + "phy_tx_polarity_flip_fabric68.BCM8892X": "0", + "phy_tx_polarity_flip_fabric69.BCM8892X": "0", "phy_tx_polarity_flip_fabric7.BCM8892X": "0", "phy_tx_polarity_flip_fabric70.BCM8892X": "0", "phy_tx_polarity_flip_fabric71.BCM8892X": "0", - "phy_tx_polarity_flip_fabric72.BCM8892X": "1", - "phy_tx_polarity_flip_fabric73.BCM8892X": "0", + "phy_tx_polarity_flip_fabric72.BCM8892X": "0", + "phy_tx_polarity_flip_fabric73.BCM8892X": "1", "phy_tx_polarity_flip_fabric74.BCM8892X": "0", "phy_tx_polarity_flip_fabric75.BCM8892X": "1", - "phy_tx_polarity_flip_fabric76.BCM8892X": "1", - "phy_tx_polarity_flip_fabric77.BCM8892X": "0", + "phy_tx_polarity_flip_fabric76.BCM8892X": "0", + "phy_tx_polarity_flip_fabric77.BCM8892X": "1", "phy_tx_polarity_flip_fabric78.BCM8892X": "0", "phy_tx_polarity_flip_fabric79.BCM8892X": "1", "phy_tx_polarity_flip_fabric8.BCM8892X": "1", - "phy_tx_polarity_flip_fabric80.BCM8892X": "1", - "phy_tx_polarity_flip_fabric81.BCM8892X": "1", + "phy_tx_polarity_flip_fabric80.BCM8892X": "0", + "phy_tx_polarity_flip_fabric81.BCM8892X": "0", "phy_tx_polarity_flip_fabric82.BCM8892X": "0", "phy_tx_polarity_flip_fabric83.BCM8892X": "0", - "phy_tx_polarity_flip_fabric84.BCM8892X": "1", - "phy_tx_polarity_flip_fabric85.BCM8892X": "1", + "phy_tx_polarity_flip_fabric84.BCM8892X": "0", + "phy_tx_polarity_flip_fabric85.BCM8892X": "0", "phy_tx_polarity_flip_fabric86.BCM8892X": "0", "phy_tx_polarity_flip_fabric87.BCM8892X": "0", - "phy_tx_polarity_flip_fabric88.BCM8892X": "1", - "phy_tx_polarity_flip_fabric89.BCM8892X": "0", + "phy_tx_polarity_flip_fabric88.BCM8892X": "0", + "phy_tx_polarity_flip_fabric89.BCM8892X": "1", "phy_tx_polarity_flip_fabric9.BCM8892X": "0", "phy_tx_polarity_flip_fabric90.BCM8892X": "0", "phy_tx_polarity_flip_fabric91.BCM8892X": "1", - "phy_tx_polarity_flip_fabric92.BCM8892X": "1", - "phy_tx_polarity_flip_fabric93.BCM8892X": "0", + "phy_tx_polarity_flip_fabric92.BCM8892X": "0", + "phy_tx_polarity_flip_fabric93.BCM8892X": "1", "phy_tx_polarity_flip_fabric94.BCM8892X": "0", "phy_tx_polarity_flip_fabric95.BCM8892X": "1", - "phy_tx_polarity_flip_fabric96.BCM8892X": "1", - "phy_tx_polarity_flip_fabric97.BCM8892X": "1", + "phy_tx_polarity_flip_fabric96.BCM8892X": "0", + "phy_tx_polarity_flip_fabric97.BCM8892X": "0", "phy_tx_polarity_flip_fabric98.BCM8892X": "0", "phy_tx_polarity_flip_fabric99.BCM8892X": "0" } }, "1": { "config": { - "lane_to_serdes_map_fabric_lane0.BCM8892X": "rx4:tx5", - "lane_to_serdes_map_fabric_lane1.BCM8892X": "rx5:tx4", - "lane_to_serdes_map_fabric_lane10.BCM8892X": "rx18:tx18", + "lane_to_serdes_map_fabric_lane0.BCM8892X": "rx0:tx1", + "lane_to_serdes_map_fabric_lane1.BCM8892X": "rx1:tx0", + "lane_to_serdes_map_fabric_lane10.BCM8892X": "rx22:tx22", "lane_to_serdes_map_fabric_lane100.BCM8892X": "rx200:tx205", "lane_to_serdes_map_fabric_lane101.BCM8892X": "rx201:tx206", - "lane_to_serdes_map_fabric_lane102.BCM8892X": "rx202:tx207", - "lane_to_serdes_map_fabric_lane103.BCM8892X": "rx203:tx204", + "lane_to_serdes_map_fabric_lane102.BCM8892X": "rx206:tx203", + "lane_to_serdes_map_fabric_lane103.BCM8892X": "rx207:tx200", "lane_to_serdes_map_fabric_lane104.BCM8892X": "rx208:tx212", "lane_to_serdes_map_fabric_lane105.BCM8892X": "rx209:tx213", - "lane_to_serdes_map_fabric_lane106.BCM8892X": "rx210:tx214", - "lane_to_serdes_map_fabric_lane107.BCM8892X": "rx211:tx215", + "lane_to_serdes_map_fabric_lane106.BCM8892X": "rx214:tx210", + "lane_to_serdes_map_fabric_lane107.BCM8892X": "rx215:tx211", "lane_to_serdes_map_fabric_lane108.BCM8892X": "rx216:tx220", "lane_to_serdes_map_fabric_lane109.BCM8892X": "rx217:tx221", - "lane_to_serdes_map_fabric_lane11.BCM8892X": "rx19:tx19", - "lane_to_serdes_map_fabric_lane110.BCM8892X": "rx218:tx222", - "lane_to_serdes_map_fabric_lane111.BCM8892X": "rx219:tx223", + "lane_to_serdes_map_fabric_lane11.BCM8892X": "rx23:tx23", + "lane_to_serdes_map_fabric_lane110.BCM8892X": "rx222:tx218", + "lane_to_serdes_map_fabric_lane111.BCM8892X": "rx223:tx219", "lane_to_serdes_map_fabric_lane112.BCM8892X": "rx228:tx229", "lane_to_serdes_map_fabric_lane113.BCM8892X": "rx229:tx228", "lane_to_serdes_map_fabric_lane114.BCM8892X": "rx226:tx227", @@ -1763,7 +1768,7 @@ "lane_to_serdes_map_fabric_lane117.BCM8892X": "rx233:tx232", "lane_to_serdes_map_fabric_lane118.BCM8892X": "rx238:tx239", "lane_to_serdes_map_fabric_lane119.BCM8892X": "rx239:tx238", - "lane_to_serdes_map_fabric_lane12.BCM8892X": "rx24:tx24", + "lane_to_serdes_map_fabric_lane12.BCM8892X": "rx28:tx28", "lane_to_serdes_map_fabric_lane120.BCM8892X": "rx244:tx244", "lane_to_serdes_map_fabric_lane121.BCM8892X": "rx245:tx245", "lane_to_serdes_map_fabric_lane122.BCM8892X": "rx242:tx242", @@ -1772,131 +1777,131 @@ "lane_to_serdes_map_fabric_lane125.BCM8892X": "rx249:tx249", "lane_to_serdes_map_fabric_lane126.BCM8892X": "rx254:tx254", "lane_to_serdes_map_fabric_lane127.BCM8892X": "rx255:tx255", - "lane_to_serdes_map_fabric_lane128.BCM8892X": "rx260:tx261", - "lane_to_serdes_map_fabric_lane129.BCM8892X": "rx261:tx260", - "lane_to_serdes_map_fabric_lane13.BCM8892X": "rx25:tx25", - "lane_to_serdes_map_fabric_lane130.BCM8892X": "rx258:tx259", - "lane_to_serdes_map_fabric_lane131.BCM8892X": "rx259:tx258", - "lane_to_serdes_map_fabric_lane132.BCM8892X": "rx264:tx265", - "lane_to_serdes_map_fabric_lane133.BCM8892X": "rx265:tx264", - "lane_to_serdes_map_fabric_lane134.BCM8892X": "rx270:tx271", - "lane_to_serdes_map_fabric_lane135.BCM8892X": "rx271:tx270", - "lane_to_serdes_map_fabric_lane136.BCM8892X": "rx276:tx276", - "lane_to_serdes_map_fabric_lane137.BCM8892X": "rx277:tx277", - "lane_to_serdes_map_fabric_lane138.BCM8892X": "rx274:tx274", - "lane_to_serdes_map_fabric_lane139.BCM8892X": "rx275:tx275", - "lane_to_serdes_map_fabric_lane14.BCM8892X": "rx30:tx30", - "lane_to_serdes_map_fabric_lane140.BCM8892X": "rx280:tx280", - "lane_to_serdes_map_fabric_lane141.BCM8892X": "rx281:tx281", - "lane_to_serdes_map_fabric_lane142.BCM8892X": "rx286:tx286", - "lane_to_serdes_map_fabric_lane143.BCM8892X": "rx287:tx287", - "lane_to_serdes_map_fabric_lane144.BCM8892X": "rx288:tx293", - "lane_to_serdes_map_fabric_lane145.BCM8892X": "rx289:tx294", + "lane_to_serdes_map_fabric_lane128.BCM8892X": "rx256:tx257", + "lane_to_serdes_map_fabric_lane129.BCM8892X": "rx257:tx256", + "lane_to_serdes_map_fabric_lane13.BCM8892X": "rx29:tx29", + "lane_to_serdes_map_fabric_lane130.BCM8892X": "rx262:tx263", + "lane_to_serdes_map_fabric_lane131.BCM8892X": "rx263:tx262", + "lane_to_serdes_map_fabric_lane132.BCM8892X": "rx268:tx269", + "lane_to_serdes_map_fabric_lane133.BCM8892X": "rx269:tx268", + "lane_to_serdes_map_fabric_lane134.BCM8892X": "rx266:tx267", + "lane_to_serdes_map_fabric_lane135.BCM8892X": "rx267:tx266", + "lane_to_serdes_map_fabric_lane136.BCM8892X": "rx272:tx272", + "lane_to_serdes_map_fabric_lane137.BCM8892X": "rx273:tx273", + "lane_to_serdes_map_fabric_lane138.BCM8892X": "rx278:tx278", + "lane_to_serdes_map_fabric_lane139.BCM8892X": "rx279:tx279", + "lane_to_serdes_map_fabric_lane14.BCM8892X": "rx26:tx26", + "lane_to_serdes_map_fabric_lane140.BCM8892X": "rx284:tx284", + "lane_to_serdes_map_fabric_lane141.BCM8892X": "rx285:tx285", + "lane_to_serdes_map_fabric_lane142.BCM8892X": "rx282:tx282", + "lane_to_serdes_map_fabric_lane143.BCM8892X": "rx283:tx283", + "lane_to_serdes_map_fabric_lane144.BCM8892X": "rx292:tx289", + "lane_to_serdes_map_fabric_lane145.BCM8892X": "rx293:tx290", "lane_to_serdes_map_fabric_lane146.BCM8892X": "rx290:tx295", "lane_to_serdes_map_fabric_lane147.BCM8892X": "rx291:tx292", - "lane_to_serdes_map_fabric_lane148.BCM8892X": "rx296:tx301", - "lane_to_serdes_map_fabric_lane149.BCM8892X": "rx297:tx302", - "lane_to_serdes_map_fabric_lane15.BCM8892X": "rx31:tx31", + "lane_to_serdes_map_fabric_lane148.BCM8892X": "rx300:tx297", + "lane_to_serdes_map_fabric_lane149.BCM8892X": "rx301:tx298", + "lane_to_serdes_map_fabric_lane15.BCM8892X": "rx27:tx27", "lane_to_serdes_map_fabric_lane150.BCM8892X": "rx298:tx303", "lane_to_serdes_map_fabric_lane151.BCM8892X": "rx299:tx300", - "lane_to_serdes_map_fabric_lane152.BCM8892X": "rx304:tx308", - "lane_to_serdes_map_fabric_lane153.BCM8892X": "rx305:tx309", + "lane_to_serdes_map_fabric_lane152.BCM8892X": "rx308:tx304", + "lane_to_serdes_map_fabric_lane153.BCM8892X": "rx309:tx305", "lane_to_serdes_map_fabric_lane154.BCM8892X": "rx306:tx310", "lane_to_serdes_map_fabric_lane155.BCM8892X": "rx307:tx311", - "lane_to_serdes_map_fabric_lane156.BCM8892X": "rx312:tx316", - "lane_to_serdes_map_fabric_lane157.BCM8892X": "rx313:tx317", + "lane_to_serdes_map_fabric_lane156.BCM8892X": "rx316:tx312", + "lane_to_serdes_map_fabric_lane157.BCM8892X": "rx317:tx313", "lane_to_serdes_map_fabric_lane158.BCM8892X": "rx314:tx318", "lane_to_serdes_map_fabric_lane159.BCM8892X": "rx315:tx319", "lane_to_serdes_map_fabric_lane16.BCM8892X": "rx32:tx33", - "lane_to_serdes_map_fabric_lane160.BCM8892X": "rx320:tx325", - "lane_to_serdes_map_fabric_lane161.BCM8892X": "rx321:tx326", + "lane_to_serdes_map_fabric_lane160.BCM8892X": "rx324:tx321", + "lane_to_serdes_map_fabric_lane161.BCM8892X": "rx325:tx322", "lane_to_serdes_map_fabric_lane162.BCM8892X": "rx322:tx327", "lane_to_serdes_map_fabric_lane163.BCM8892X": "rx323:tx324", - "lane_to_serdes_map_fabric_lane164.BCM8892X": "rx328:tx333", - "lane_to_serdes_map_fabric_lane165.BCM8892X": "rx329:tx334", + "lane_to_serdes_map_fabric_lane164.BCM8892X": "rx332:tx329", + "lane_to_serdes_map_fabric_lane165.BCM8892X": "rx333:tx330", "lane_to_serdes_map_fabric_lane166.BCM8892X": "rx330:tx335", "lane_to_serdes_map_fabric_lane167.BCM8892X": "rx331:tx332", - "lane_to_serdes_map_fabric_lane168.BCM8892X": "rx336:tx340", - "lane_to_serdes_map_fabric_lane169.BCM8892X": "rx337:tx341", + "lane_to_serdes_map_fabric_lane168.BCM8892X": "rx340:tx336", + "lane_to_serdes_map_fabric_lane169.BCM8892X": "rx341:tx337", "lane_to_serdes_map_fabric_lane17.BCM8892X": "rx33:tx34", "lane_to_serdes_map_fabric_lane170.BCM8892X": "rx338:tx342", "lane_to_serdes_map_fabric_lane171.BCM8892X": "rx339:tx343", - "lane_to_serdes_map_fabric_lane172.BCM8892X": "rx344:tx348", - "lane_to_serdes_map_fabric_lane173.BCM8892X": "rx345:tx349", + "lane_to_serdes_map_fabric_lane172.BCM8892X": "rx348:tx344", + "lane_to_serdes_map_fabric_lane173.BCM8892X": "rx349:tx345", "lane_to_serdes_map_fabric_lane174.BCM8892X": "rx346:tx350", "lane_to_serdes_map_fabric_lane175.BCM8892X": "rx347:tx351", - "lane_to_serdes_map_fabric_lane176.BCM8892X": "rx352:tx357", - "lane_to_serdes_map_fabric_lane177.BCM8892X": "rx353:tx358", + "lane_to_serdes_map_fabric_lane176.BCM8892X": "rx356:tx353", + "lane_to_serdes_map_fabric_lane177.BCM8892X": "rx357:tx354", "lane_to_serdes_map_fabric_lane178.BCM8892X": "rx354:tx359", "lane_to_serdes_map_fabric_lane179.BCM8892X": "rx355:tx356", - "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx34:tx35", - "lane_to_serdes_map_fabric_lane180.BCM8892X": "rx360:tx365", - "lane_to_serdes_map_fabric_lane181.BCM8892X": "rx361:tx366", + "lane_to_serdes_map_fabric_lane18.BCM8892X": "rx38:tx39", + "lane_to_serdes_map_fabric_lane180.BCM8892X": "rx364:tx361", + "lane_to_serdes_map_fabric_lane181.BCM8892X": "rx365:tx362", "lane_to_serdes_map_fabric_lane182.BCM8892X": "rx362:tx367", "lane_to_serdes_map_fabric_lane183.BCM8892X": "rx363:tx364", - "lane_to_serdes_map_fabric_lane184.BCM8892X": "rx368:tx372", - "lane_to_serdes_map_fabric_lane185.BCM8892X": "rx369:tx373", + "lane_to_serdes_map_fabric_lane184.BCM8892X": "rx372:tx368", + "lane_to_serdes_map_fabric_lane185.BCM8892X": "rx373:tx369", "lane_to_serdes_map_fabric_lane186.BCM8892X": "rx370:tx374", "lane_to_serdes_map_fabric_lane187.BCM8892X": "rx371:tx375", - "lane_to_serdes_map_fabric_lane188.BCM8892X": "rx376:tx380", - "lane_to_serdes_map_fabric_lane189.BCM8892X": "rx377:tx381", - "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx35:tx32", + "lane_to_serdes_map_fabric_lane188.BCM8892X": "rx380:tx376", + "lane_to_serdes_map_fabric_lane189.BCM8892X": "rx381:tx377", + "lane_to_serdes_map_fabric_lane19.BCM8892X": "rx39:tx36", "lane_to_serdes_map_fabric_lane190.BCM8892X": "rx378:tx382", "lane_to_serdes_map_fabric_lane191.BCM8892X": "rx379:tx383", "lane_to_serdes_map_fabric_lane192.BCM8892X": "rx384:tx389", "lane_to_serdes_map_fabric_lane193.BCM8892X": "rx385:tx390", - "lane_to_serdes_map_fabric_lane194.BCM8892X": "rx386:tx391", - "lane_to_serdes_map_fabric_lane195.BCM8892X": "rx387:tx388", + "lane_to_serdes_map_fabric_lane194.BCM8892X": "rx390:tx387", + "lane_to_serdes_map_fabric_lane195.BCM8892X": "rx391:tx384", "lane_to_serdes_map_fabric_lane196.BCM8892X": "rx392:tx397", "lane_to_serdes_map_fabric_lane197.BCM8892X": "rx393:tx398", - "lane_to_serdes_map_fabric_lane198.BCM8892X": "rx394:tx399", - "lane_to_serdes_map_fabric_lane199.BCM8892X": "rx395:tx396", - "lane_to_serdes_map_fabric_lane2.BCM8892X": "rx2:tx3", + "lane_to_serdes_map_fabric_lane198.BCM8892X": "rx398:tx395", + "lane_to_serdes_map_fabric_lane199.BCM8892X": "rx399:tx392", + "lane_to_serdes_map_fabric_lane2.BCM8892X": "rx6:tx7", "lane_to_serdes_map_fabric_lane20.BCM8892X": "rx44:tx41", "lane_to_serdes_map_fabric_lane200.BCM8892X": "rx400:tx404", "lane_to_serdes_map_fabric_lane201.BCM8892X": "rx401:tx405", - "lane_to_serdes_map_fabric_lane202.BCM8892X": "rx402:tx406", - "lane_to_serdes_map_fabric_lane203.BCM8892X": "rx403:tx407", + "lane_to_serdes_map_fabric_lane202.BCM8892X": "rx406:tx402", + "lane_to_serdes_map_fabric_lane203.BCM8892X": "rx407:tx403", "lane_to_serdes_map_fabric_lane204.BCM8892X": "rx408:tx412", "lane_to_serdes_map_fabric_lane205.BCM8892X": "rx409:tx413", - "lane_to_serdes_map_fabric_lane206.BCM8892X": "rx410:tx414", - "lane_to_serdes_map_fabric_lane207.BCM8892X": "rx411:tx415", + "lane_to_serdes_map_fabric_lane206.BCM8892X": "rx414:tx410", + "lane_to_serdes_map_fabric_lane207.BCM8892X": "rx415:tx411", "lane_to_serdes_map_fabric_lane208.BCM8892X": "rx416:tx421", "lane_to_serdes_map_fabric_lane209.BCM8892X": "rx417:tx422", "lane_to_serdes_map_fabric_lane21.BCM8892X": "rx45:tx42", - "lane_to_serdes_map_fabric_lane210.BCM8892X": "rx418:tx423", - "lane_to_serdes_map_fabric_lane211.BCM8892X": "rx419:tx420", + "lane_to_serdes_map_fabric_lane210.BCM8892X": "rx422:tx419", + "lane_to_serdes_map_fabric_lane211.BCM8892X": "rx423:tx416", "lane_to_serdes_map_fabric_lane212.BCM8892X": "rx424:tx429", "lane_to_serdes_map_fabric_lane213.BCM8892X": "rx425:tx430", - "lane_to_serdes_map_fabric_lane214.BCM8892X": "rx426:tx431", - "lane_to_serdes_map_fabric_lane215.BCM8892X": "rx427:tx428", + "lane_to_serdes_map_fabric_lane214.BCM8892X": "rx430:tx427", + "lane_to_serdes_map_fabric_lane215.BCM8892X": "rx431:tx424", "lane_to_serdes_map_fabric_lane216.BCM8892X": "rx432:tx436", "lane_to_serdes_map_fabric_lane217.BCM8892X": "rx433:tx437", - "lane_to_serdes_map_fabric_lane218.BCM8892X": "rx434:tx438", - "lane_to_serdes_map_fabric_lane219.BCM8892X": "rx435:tx439", - "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx46:tx43", + "lane_to_serdes_map_fabric_lane218.BCM8892X": "rx438:tx434", + "lane_to_serdes_map_fabric_lane219.BCM8892X": "rx439:tx435", + "lane_to_serdes_map_fabric_lane22.BCM8892X": "rx42:tx47", "lane_to_serdes_map_fabric_lane220.BCM8892X": "rx440:tx444", "lane_to_serdes_map_fabric_lane221.BCM8892X": "rx441:tx445", - "lane_to_serdes_map_fabric_lane222.BCM8892X": "rx442:tx446", - "lane_to_serdes_map_fabric_lane223.BCM8892X": "rx443:tx447", + "lane_to_serdes_map_fabric_lane222.BCM8892X": "rx446:tx442", + "lane_to_serdes_map_fabric_lane223.BCM8892X": "rx447:tx443", "lane_to_serdes_map_fabric_lane224.BCM8892X": "rx448:tx453", "lane_to_serdes_map_fabric_lane225.BCM8892X": "rx449:tx454", - "lane_to_serdes_map_fabric_lane226.BCM8892X": "rx450:tx455", - "lane_to_serdes_map_fabric_lane227.BCM8892X": "rx451:tx452", + "lane_to_serdes_map_fabric_lane226.BCM8892X": "rx454:tx451", + "lane_to_serdes_map_fabric_lane227.BCM8892X": "rx455:tx448", "lane_to_serdes_map_fabric_lane228.BCM8892X": "rx456:tx461", "lane_to_serdes_map_fabric_lane229.BCM8892X": "rx457:tx462", - "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx47:tx40", - "lane_to_serdes_map_fabric_lane230.BCM8892X": "rx458:tx463", - "lane_to_serdes_map_fabric_lane231.BCM8892X": "rx459:tx460", + "lane_to_serdes_map_fabric_lane23.BCM8892X": "rx43:tx44", + "lane_to_serdes_map_fabric_lane230.BCM8892X": "rx462:tx459", + "lane_to_serdes_map_fabric_lane231.BCM8892X": "rx463:tx456", "lane_to_serdes_map_fabric_lane232.BCM8892X": "rx464:tx468", "lane_to_serdes_map_fabric_lane233.BCM8892X": "rx465:tx469", - "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx466:tx470", - "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx467:tx471", + "lane_to_serdes_map_fabric_lane234.BCM8892X": "rx470:tx466", + "lane_to_serdes_map_fabric_lane235.BCM8892X": "rx471:tx467", "lane_to_serdes_map_fabric_lane236.BCM8892X": "rx476:tx476", "lane_to_serdes_map_fabric_lane237.BCM8892X": "rx477:tx477", - "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx478:tx478", - "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx479:tx479", - "lane_to_serdes_map_fabric_lane24.BCM8892X": "rx48:tx52", + "lane_to_serdes_map_fabric_lane238.BCM8892X": "rx474:tx474", + "lane_to_serdes_map_fabric_lane239.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane24.BCM8892X": "rx52:tx48", "lane_to_serdes_map_fabric_lane240.BCM8892X": "rx480:tx481", "lane_to_serdes_map_fabric_lane241.BCM8892X": "rx481:tx480", "lane_to_serdes_map_fabric_lane242.BCM8892X": "rx486:tx487", @@ -1907,140 +1912,140 @@ "lane_to_serdes_map_fabric_lane247.BCM8892X": "rx491:tx490", "lane_to_serdes_map_fabric_lane248.BCM8892X": "rx496:tx496", "lane_to_serdes_map_fabric_lane249.BCM8892X": "rx497:tx497", - "lane_to_serdes_map_fabric_lane25.BCM8892X": "rx49:tx53", + "lane_to_serdes_map_fabric_lane25.BCM8892X": "rx53:tx49", "lane_to_serdes_map_fabric_lane250.BCM8892X": "rx502:tx502", "lane_to_serdes_map_fabric_lane251.BCM8892X": "rx503:tx503", "lane_to_serdes_map_fabric_lane252.BCM8892X": "rx508:tx508", "lane_to_serdes_map_fabric_lane253.BCM8892X": "rx509:tx509", "lane_to_serdes_map_fabric_lane254.BCM8892X": "rx506:tx506", "lane_to_serdes_map_fabric_lane255.BCM8892X": "rx507:tx507", - "lane_to_serdes_map_fabric_lane256.BCM8892X": "rx0:tx1", - "lane_to_serdes_map_fabric_lane257.BCM8892X": "rx1:tx0", - "lane_to_serdes_map_fabric_lane258.BCM8892X": "rx6:tx7", - "lane_to_serdes_map_fabric_lane259.BCM8892X": "rx7:tx6", + "lane_to_serdes_map_fabric_lane256.BCM8892X": "rx4:tx5", + "lane_to_serdes_map_fabric_lane257.BCM8892X": "rx5:tx4", + "lane_to_serdes_map_fabric_lane258.BCM8892X": "rx2:tx3", + "lane_to_serdes_map_fabric_lane259.BCM8892X": "rx3:tx2", "lane_to_serdes_map_fabric_lane26.BCM8892X": "rx50:tx54", - "lane_to_serdes_map_fabric_lane260.BCM8892X": "rx12:tx13", - "lane_to_serdes_map_fabric_lane261.BCM8892X": "rx13:tx12", - "lane_to_serdes_map_fabric_lane262.BCM8892X": "rx10:tx11", - "lane_to_serdes_map_fabric_lane263.BCM8892X": "rx11:tx10", - "lane_to_serdes_map_fabric_lane264.BCM8892X": "rx16:tx16", - "lane_to_serdes_map_fabric_lane265.BCM8892X": "rx17:tx17", - "lane_to_serdes_map_fabric_lane266.BCM8892X": "rx22:tx22", - "lane_to_serdes_map_fabric_lane267.BCM8892X": "rx23:tx23", - "lane_to_serdes_map_fabric_lane268.BCM8892X": "rx28:tx28", - "lane_to_serdes_map_fabric_lane269.BCM8892X": "rx29:tx29", + "lane_to_serdes_map_fabric_lane260.BCM8892X": "rx8:tx9", + "lane_to_serdes_map_fabric_lane261.BCM8892X": "rx9:tx8", + "lane_to_serdes_map_fabric_lane262.BCM8892X": "rx14:tx15", + "lane_to_serdes_map_fabric_lane263.BCM8892X": "rx15:tx14", + "lane_to_serdes_map_fabric_lane264.BCM8892X": "rx20:tx20", + "lane_to_serdes_map_fabric_lane265.BCM8892X": "rx21:tx21", + "lane_to_serdes_map_fabric_lane266.BCM8892X": "rx18:tx18", + "lane_to_serdes_map_fabric_lane267.BCM8892X": "rx19:tx19", + "lane_to_serdes_map_fabric_lane268.BCM8892X": "rx24:tx24", + "lane_to_serdes_map_fabric_lane269.BCM8892X": "rx25:tx25", "lane_to_serdes_map_fabric_lane27.BCM8892X": "rx51:tx55", - "lane_to_serdes_map_fabric_lane270.BCM8892X": "rx26:tx26", - "lane_to_serdes_map_fabric_lane271.BCM8892X": "rx27:tx27", + "lane_to_serdes_map_fabric_lane270.BCM8892X": "rx30:tx30", + "lane_to_serdes_map_fabric_lane271.BCM8892X": "rx31:tx31", "lane_to_serdes_map_fabric_lane272.BCM8892X": "rx36:tx37", "lane_to_serdes_map_fabric_lane273.BCM8892X": "rx37:tx38", - "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx38:tx39", - "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx39:tx36", + "lane_to_serdes_map_fabric_lane274.BCM8892X": "rx34:tx35", + "lane_to_serdes_map_fabric_lane275.BCM8892X": "rx35:tx32", "lane_to_serdes_map_fabric_lane276.BCM8892X": "rx40:tx45", "lane_to_serdes_map_fabric_lane277.BCM8892X": "rx41:tx46", - "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx42:tx47", - "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx43:tx44", - "lane_to_serdes_map_fabric_lane28.BCM8892X": "rx56:tx60", - "lane_to_serdes_map_fabric_lane280.BCM8892X": "rx52:tx48", - "lane_to_serdes_map_fabric_lane281.BCM8892X": "rx53:tx49", + "lane_to_serdes_map_fabric_lane278.BCM8892X": "rx46:tx43", + "lane_to_serdes_map_fabric_lane279.BCM8892X": "rx47:tx40", + "lane_to_serdes_map_fabric_lane28.BCM8892X": "rx60:tx56", + "lane_to_serdes_map_fabric_lane280.BCM8892X": "rx48:tx52", + "lane_to_serdes_map_fabric_lane281.BCM8892X": "rx49:tx53", "lane_to_serdes_map_fabric_lane282.BCM8892X": "rx54:tx50", "lane_to_serdes_map_fabric_lane283.BCM8892X": "rx55:tx51", - "lane_to_serdes_map_fabric_lane284.BCM8892X": "rx60:tx56", - "lane_to_serdes_map_fabric_lane285.BCM8892X": "rx61:tx57", + "lane_to_serdes_map_fabric_lane284.BCM8892X": "rx56:tx60", + "lane_to_serdes_map_fabric_lane285.BCM8892X": "rx57:tx61", "lane_to_serdes_map_fabric_lane286.BCM8892X": "rx62:tx58", "lane_to_serdes_map_fabric_lane287.BCM8892X": "rx63:tx59", - "lane_to_serdes_map_fabric_lane288.BCM8892X": "rx68:tx65", - "lane_to_serdes_map_fabric_lane289.BCM8892X": "rx69:tx66", - "lane_to_serdes_map_fabric_lane29.BCM8892X": "rx57:tx61", + "lane_to_serdes_map_fabric_lane288.BCM8892X": "rx64:tx69", + "lane_to_serdes_map_fabric_lane289.BCM8892X": "rx65:tx70", + "lane_to_serdes_map_fabric_lane29.BCM8892X": "rx61:tx57", "lane_to_serdes_map_fabric_lane290.BCM8892X": "rx70:tx67", "lane_to_serdes_map_fabric_lane291.BCM8892X": "rx71:tx64", - "lane_to_serdes_map_fabric_lane292.BCM8892X": "rx76:tx73", - "lane_to_serdes_map_fabric_lane293.BCM8892X": "rx77:tx74", + "lane_to_serdes_map_fabric_lane292.BCM8892X": "rx72:tx77", + "lane_to_serdes_map_fabric_lane293.BCM8892X": "rx73:tx78", "lane_to_serdes_map_fabric_lane294.BCM8892X": "rx78:tx75", "lane_to_serdes_map_fabric_lane295.BCM8892X": "rx79:tx72", - "lane_to_serdes_map_fabric_lane296.BCM8892X": "rx84:tx80", - "lane_to_serdes_map_fabric_lane297.BCM8892X": "rx85:tx81", + "lane_to_serdes_map_fabric_lane296.BCM8892X": "rx80:tx84", + "lane_to_serdes_map_fabric_lane297.BCM8892X": "rx81:tx85", "lane_to_serdes_map_fabric_lane298.BCM8892X": "rx86:tx82", "lane_to_serdes_map_fabric_lane299.BCM8892X": "rx87:tx83", - "lane_to_serdes_map_fabric_lane3.BCM8892X": "rx3:tx2", + "lane_to_serdes_map_fabric_lane3.BCM8892X": "rx7:tx6", "lane_to_serdes_map_fabric_lane30.BCM8892X": "rx58:tx62", - "lane_to_serdes_map_fabric_lane300.BCM8892X": "rx92:tx88", - "lane_to_serdes_map_fabric_lane301.BCM8892X": "rx93:tx89", + "lane_to_serdes_map_fabric_lane300.BCM8892X": "rx88:tx92", + "lane_to_serdes_map_fabric_lane301.BCM8892X": "rx89:tx93", "lane_to_serdes_map_fabric_lane302.BCM8892X": "rx94:tx90", "lane_to_serdes_map_fabric_lane303.BCM8892X": "rx95:tx91", - "lane_to_serdes_map_fabric_lane304.BCM8892X": "rx100:tx97", - "lane_to_serdes_map_fabric_lane305.BCM8892X": "rx101:tx98", + "lane_to_serdes_map_fabric_lane304.BCM8892X": "rx96:tx101", + "lane_to_serdes_map_fabric_lane305.BCM8892X": "rx97:tx102", "lane_to_serdes_map_fabric_lane306.BCM8892X": "rx102:tx99", "lane_to_serdes_map_fabric_lane307.BCM8892X": "rx103:tx96", - "lane_to_serdes_map_fabric_lane308.BCM8892X": "rx108:tx105", - "lane_to_serdes_map_fabric_lane309.BCM8892X": "rx109:tx106", + "lane_to_serdes_map_fabric_lane308.BCM8892X": "rx104:tx109", + "lane_to_serdes_map_fabric_lane309.BCM8892X": "rx105:tx110", "lane_to_serdes_map_fabric_lane31.BCM8892X": "rx59:tx63", "lane_to_serdes_map_fabric_lane310.BCM8892X": "rx110:tx107", "lane_to_serdes_map_fabric_lane311.BCM8892X": "rx111:tx104", - "lane_to_serdes_map_fabric_lane312.BCM8892X": "rx116:tx112", - "lane_to_serdes_map_fabric_lane313.BCM8892X": "rx117:tx113", + "lane_to_serdes_map_fabric_lane312.BCM8892X": "rx112:tx116", + "lane_to_serdes_map_fabric_lane313.BCM8892X": "rx113:tx117", "lane_to_serdes_map_fabric_lane314.BCM8892X": "rx118:tx114", "lane_to_serdes_map_fabric_lane315.BCM8892X": "rx119:tx115", - "lane_to_serdes_map_fabric_lane316.BCM8892X": "rx124:tx120", - "lane_to_serdes_map_fabric_lane317.BCM8892X": "rx125:tx121", + "lane_to_serdes_map_fabric_lane316.BCM8892X": "rx120:tx124", + "lane_to_serdes_map_fabric_lane317.BCM8892X": "rx121:tx125", "lane_to_serdes_map_fabric_lane318.BCM8892X": "rx126:tx122", "lane_to_serdes_map_fabric_lane319.BCM8892X": "rx127:tx123", - "lane_to_serdes_map_fabric_lane32.BCM8892X": "rx64:tx69", + "lane_to_serdes_map_fabric_lane32.BCM8892X": "rx68:tx65", "lane_to_serdes_map_fabric_lane320.BCM8892X": "rx132:tx129", "lane_to_serdes_map_fabric_lane321.BCM8892X": "rx133:tx130", - "lane_to_serdes_map_fabric_lane322.BCM8892X": "rx134:tx131", - "lane_to_serdes_map_fabric_lane323.BCM8892X": "rx135:tx128", + "lane_to_serdes_map_fabric_lane322.BCM8892X": "rx130:tx135", + "lane_to_serdes_map_fabric_lane323.BCM8892X": "rx131:tx132", "lane_to_serdes_map_fabric_lane324.BCM8892X": "rx140:tx137", "lane_to_serdes_map_fabric_lane325.BCM8892X": "rx141:tx138", - "lane_to_serdes_map_fabric_lane326.BCM8892X": "rx142:tx139", - "lane_to_serdes_map_fabric_lane327.BCM8892X": "rx143:tx136", + "lane_to_serdes_map_fabric_lane326.BCM8892X": "rx138:tx143", + "lane_to_serdes_map_fabric_lane327.BCM8892X": "rx139:tx140", "lane_to_serdes_map_fabric_lane328.BCM8892X": "rx148:tx144", "lane_to_serdes_map_fabric_lane329.BCM8892X": "rx149:tx145", - "lane_to_serdes_map_fabric_lane33.BCM8892X": "rx65:tx70", - "lane_to_serdes_map_fabric_lane330.BCM8892X": "rx150:tx146", - "lane_to_serdes_map_fabric_lane331.BCM8892X": "rx151:tx147", + "lane_to_serdes_map_fabric_lane33.BCM8892X": "rx69:tx66", + "lane_to_serdes_map_fabric_lane330.BCM8892X": "rx146:tx150", + "lane_to_serdes_map_fabric_lane331.BCM8892X": "rx147:tx151", "lane_to_serdes_map_fabric_lane332.BCM8892X": "rx156:tx152", "lane_to_serdes_map_fabric_lane333.BCM8892X": "rx157:tx153", - "lane_to_serdes_map_fabric_lane334.BCM8892X": "rx158:tx154", - "lane_to_serdes_map_fabric_lane335.BCM8892X": "rx159:tx155", + "lane_to_serdes_map_fabric_lane334.BCM8892X": "rx154:tx158", + "lane_to_serdes_map_fabric_lane335.BCM8892X": "rx155:tx159", "lane_to_serdes_map_fabric_lane336.BCM8892X": "rx164:tx161", "lane_to_serdes_map_fabric_lane337.BCM8892X": "rx165:tx162", - "lane_to_serdes_map_fabric_lane338.BCM8892X": "rx166:tx163", - "lane_to_serdes_map_fabric_lane339.BCM8892X": "rx167:tx160", + "lane_to_serdes_map_fabric_lane338.BCM8892X": "rx162:tx167", + "lane_to_serdes_map_fabric_lane339.BCM8892X": "rx163:tx164", "lane_to_serdes_map_fabric_lane34.BCM8892X": "rx66:tx71", "lane_to_serdes_map_fabric_lane340.BCM8892X": "rx172:tx169", "lane_to_serdes_map_fabric_lane341.BCM8892X": "rx173:tx170", - "lane_to_serdes_map_fabric_lane342.BCM8892X": "rx174:tx171", - "lane_to_serdes_map_fabric_lane343.BCM8892X": "rx175:tx168", + "lane_to_serdes_map_fabric_lane342.BCM8892X": "rx170:tx175", + "lane_to_serdes_map_fabric_lane343.BCM8892X": "rx171:tx172", "lane_to_serdes_map_fabric_lane344.BCM8892X": "rx180:tx176", "lane_to_serdes_map_fabric_lane345.BCM8892X": "rx181:tx177", - "lane_to_serdes_map_fabric_lane346.BCM8892X": "rx182:tx178", - "lane_to_serdes_map_fabric_lane347.BCM8892X": "rx183:tx179", + "lane_to_serdes_map_fabric_lane346.BCM8892X": "rx178:tx182", + "lane_to_serdes_map_fabric_lane347.BCM8892X": "rx179:tx183", "lane_to_serdes_map_fabric_lane348.BCM8892X": "rx188:tx184", "lane_to_serdes_map_fabric_lane349.BCM8892X": "rx189:tx185", "lane_to_serdes_map_fabric_lane35.BCM8892X": "rx67:tx68", - "lane_to_serdes_map_fabric_lane350.BCM8892X": "rx190:tx186", - "lane_to_serdes_map_fabric_lane351.BCM8892X": "rx191:tx187", + "lane_to_serdes_map_fabric_lane350.BCM8892X": "rx186:tx190", + "lane_to_serdes_map_fabric_lane351.BCM8892X": "rx187:tx191", "lane_to_serdes_map_fabric_lane352.BCM8892X": "rx196:tx193", "lane_to_serdes_map_fabric_lane353.BCM8892X": "rx197:tx194", - "lane_to_serdes_map_fabric_lane354.BCM8892X": "rx198:tx195", - "lane_to_serdes_map_fabric_lane355.BCM8892X": "rx199:tx192", + "lane_to_serdes_map_fabric_lane354.BCM8892X": "rx194:tx199", + "lane_to_serdes_map_fabric_lane355.BCM8892X": "rx195:tx196", "lane_to_serdes_map_fabric_lane356.BCM8892X": "rx204:tx201", "lane_to_serdes_map_fabric_lane357.BCM8892X": "rx205:tx202", - "lane_to_serdes_map_fabric_lane358.BCM8892X": "rx206:tx203", - "lane_to_serdes_map_fabric_lane359.BCM8892X": "rx207:tx200", - "lane_to_serdes_map_fabric_lane36.BCM8892X": "rx72:tx77", + "lane_to_serdes_map_fabric_lane358.BCM8892X": "rx202:tx207", + "lane_to_serdes_map_fabric_lane359.BCM8892X": "rx203:tx204", + "lane_to_serdes_map_fabric_lane36.BCM8892X": "rx76:tx73", "lane_to_serdes_map_fabric_lane360.BCM8892X": "rx212:tx208", "lane_to_serdes_map_fabric_lane361.BCM8892X": "rx213:tx209", - "lane_to_serdes_map_fabric_lane362.BCM8892X": "rx214:tx210", - "lane_to_serdes_map_fabric_lane363.BCM8892X": "rx215:tx211", + "lane_to_serdes_map_fabric_lane362.BCM8892X": "rx210:tx214", + "lane_to_serdes_map_fabric_lane363.BCM8892X": "rx211:tx215", "lane_to_serdes_map_fabric_lane364.BCM8892X": "rx220:tx216", "lane_to_serdes_map_fabric_lane365.BCM8892X": "rx221:tx217", - "lane_to_serdes_map_fabric_lane366.BCM8892X": "rx222:tx218", - "lane_to_serdes_map_fabric_lane367.BCM8892X": "rx223:tx219", + "lane_to_serdes_map_fabric_lane366.BCM8892X": "rx218:tx222", + "lane_to_serdes_map_fabric_lane367.BCM8892X": "rx219:tx223", "lane_to_serdes_map_fabric_lane368.BCM8892X": "rx224:tx225", "lane_to_serdes_map_fabric_lane369.BCM8892X": "rx225:tx224", - "lane_to_serdes_map_fabric_lane37.BCM8892X": "rx73:tx78", + "lane_to_serdes_map_fabric_lane37.BCM8892X": "rx77:tx74", "lane_to_serdes_map_fabric_lane370.BCM8892X": "rx230:tx231", "lane_to_serdes_map_fabric_lane371.BCM8892X": "rx231:tx230", "lane_to_serdes_map_fabric_lane372.BCM8892X": "rx236:tx237", @@ -2056,135 +2061,135 @@ "lane_to_serdes_map_fabric_lane381.BCM8892X": "rx253:tx253", "lane_to_serdes_map_fabric_lane382.BCM8892X": "rx250:tx250", "lane_to_serdes_map_fabric_lane383.BCM8892X": "rx251:tx251", - "lane_to_serdes_map_fabric_lane384.BCM8892X": "rx256:tx257", - "lane_to_serdes_map_fabric_lane385.BCM8892X": "rx257:tx256", - "lane_to_serdes_map_fabric_lane386.BCM8892X": "rx262:tx263", - "lane_to_serdes_map_fabric_lane387.BCM8892X": "rx263:tx262", - "lane_to_serdes_map_fabric_lane388.BCM8892X": "rx268:tx269", - "lane_to_serdes_map_fabric_lane389.BCM8892X": "rx269:tx268", + "lane_to_serdes_map_fabric_lane384.BCM8892X": "rx260:tx261", + "lane_to_serdes_map_fabric_lane385.BCM8892X": "rx261:tx260", + "lane_to_serdes_map_fabric_lane386.BCM8892X": "rx258:tx259", + "lane_to_serdes_map_fabric_lane387.BCM8892X": "rx259:tx258", + "lane_to_serdes_map_fabric_lane388.BCM8892X": "rx264:tx265", + "lane_to_serdes_map_fabric_lane389.BCM8892X": "rx265:tx264", "lane_to_serdes_map_fabric_lane39.BCM8892X": "rx75:tx76", - "lane_to_serdes_map_fabric_lane390.BCM8892X": "rx266:tx267", - "lane_to_serdes_map_fabric_lane391.BCM8892X": "rx267:tx266", - "lane_to_serdes_map_fabric_lane392.BCM8892X": "rx272:tx272", - "lane_to_serdes_map_fabric_lane393.BCM8892X": "rx273:tx273", - "lane_to_serdes_map_fabric_lane394.BCM8892X": "rx278:tx278", - "lane_to_serdes_map_fabric_lane395.BCM8892X": "rx279:tx279", - "lane_to_serdes_map_fabric_lane396.BCM8892X": "rx284:tx284", - "lane_to_serdes_map_fabric_lane397.BCM8892X": "rx285:tx285", - "lane_to_serdes_map_fabric_lane398.BCM8892X": "rx282:tx282", - "lane_to_serdes_map_fabric_lane399.BCM8892X": "rx283:tx283", - "lane_to_serdes_map_fabric_lane4.BCM8892X": "rx8:tx9", - "lane_to_serdes_map_fabric_lane40.BCM8892X": "rx80:tx84", - "lane_to_serdes_map_fabric_lane400.BCM8892X": "rx292:tx289", - "lane_to_serdes_map_fabric_lane401.BCM8892X": "rx293:tx290", + "lane_to_serdes_map_fabric_lane390.BCM8892X": "rx270:tx271", + "lane_to_serdes_map_fabric_lane391.BCM8892X": "rx271:tx270", + "lane_to_serdes_map_fabric_lane392.BCM8892X": "rx276:tx276", + "lane_to_serdes_map_fabric_lane393.BCM8892X": "rx277:tx277", + "lane_to_serdes_map_fabric_lane394.BCM8892X": "rx274:tx274", + "lane_to_serdes_map_fabric_lane395.BCM8892X": "rx275:tx275", + "lane_to_serdes_map_fabric_lane396.BCM8892X": "rx280:tx280", + "lane_to_serdes_map_fabric_lane397.BCM8892X": "rx281:tx281", + "lane_to_serdes_map_fabric_lane398.BCM8892X": "rx286:tx286", + "lane_to_serdes_map_fabric_lane399.BCM8892X": "rx287:tx287", + "lane_to_serdes_map_fabric_lane4.BCM8892X": "rx12:tx13", + "lane_to_serdes_map_fabric_lane40.BCM8892X": "rx84:tx80", + "lane_to_serdes_map_fabric_lane400.BCM8892X": "rx288:tx293", + "lane_to_serdes_map_fabric_lane401.BCM8892X": "rx289:tx294", "lane_to_serdes_map_fabric_lane402.BCM8892X": "rx294:tx291", "lane_to_serdes_map_fabric_lane403.BCM8892X": "rx295:tx288", - "lane_to_serdes_map_fabric_lane404.BCM8892X": "rx300:tx297", - "lane_to_serdes_map_fabric_lane405.BCM8892X": "rx301:tx298", + "lane_to_serdes_map_fabric_lane404.BCM8892X": "rx296:tx301", + "lane_to_serdes_map_fabric_lane405.BCM8892X": "rx297:tx302", "lane_to_serdes_map_fabric_lane406.BCM8892X": "rx302:tx299", "lane_to_serdes_map_fabric_lane407.BCM8892X": "rx303:tx296", - "lane_to_serdes_map_fabric_lane408.BCM8892X": "rx308:tx304", - "lane_to_serdes_map_fabric_lane409.BCM8892X": "rx309:tx305", - "lane_to_serdes_map_fabric_lane41.BCM8892X": "rx81:tx85", + "lane_to_serdes_map_fabric_lane408.BCM8892X": "rx304:tx308", + "lane_to_serdes_map_fabric_lane409.BCM8892X": "rx305:tx309", + "lane_to_serdes_map_fabric_lane41.BCM8892X": "rx85:tx81", "lane_to_serdes_map_fabric_lane410.BCM8892X": "rx310:tx306", "lane_to_serdes_map_fabric_lane411.BCM8892X": "rx311:tx307", - "lane_to_serdes_map_fabric_lane412.BCM8892X": "rx316:tx312", - "lane_to_serdes_map_fabric_lane413.BCM8892X": "rx317:tx313", + "lane_to_serdes_map_fabric_lane412.BCM8892X": "rx312:tx316", + "lane_to_serdes_map_fabric_lane413.BCM8892X": "rx313:tx317", "lane_to_serdes_map_fabric_lane414.BCM8892X": "rx318:tx314", "lane_to_serdes_map_fabric_lane415.BCM8892X": "rx319:tx315", - "lane_to_serdes_map_fabric_lane416.BCM8892X": "rx324:tx321", - "lane_to_serdes_map_fabric_lane417.BCM8892X": "rx325:tx322", + "lane_to_serdes_map_fabric_lane416.BCM8892X": "rx320:tx325", + "lane_to_serdes_map_fabric_lane417.BCM8892X": "rx321:tx326", "lane_to_serdes_map_fabric_lane418.BCM8892X": "rx326:tx323", "lane_to_serdes_map_fabric_lane419.BCM8892X": "rx327:tx320", "lane_to_serdes_map_fabric_lane42.BCM8892X": "rx82:tx86", - "lane_to_serdes_map_fabric_lane420.BCM8892X": "rx332:tx329", - "lane_to_serdes_map_fabric_lane421.BCM8892X": "rx333:tx330", + "lane_to_serdes_map_fabric_lane420.BCM8892X": "rx328:tx333", + "lane_to_serdes_map_fabric_lane421.BCM8892X": "rx329:tx334", "lane_to_serdes_map_fabric_lane422.BCM8892X": "rx334:tx331", "lane_to_serdes_map_fabric_lane423.BCM8892X": "rx335:tx328", - "lane_to_serdes_map_fabric_lane424.BCM8892X": "rx340:tx336", - "lane_to_serdes_map_fabric_lane425.BCM8892X": "rx341:tx337", + "lane_to_serdes_map_fabric_lane424.BCM8892X": "rx336:tx340", + "lane_to_serdes_map_fabric_lane425.BCM8892X": "rx337:tx341", "lane_to_serdes_map_fabric_lane426.BCM8892X": "rx342:tx338", "lane_to_serdes_map_fabric_lane427.BCM8892X": "rx343:tx339", - "lane_to_serdes_map_fabric_lane428.BCM8892X": "rx348:tx344", - "lane_to_serdes_map_fabric_lane429.BCM8892X": "rx349:tx345", + "lane_to_serdes_map_fabric_lane428.BCM8892X": "rx344:tx348", + "lane_to_serdes_map_fabric_lane429.BCM8892X": "rx345:tx349", "lane_to_serdes_map_fabric_lane43.BCM8892X": "rx83:tx87", "lane_to_serdes_map_fabric_lane430.BCM8892X": "rx350:tx346", "lane_to_serdes_map_fabric_lane431.BCM8892X": "rx351:tx347", - "lane_to_serdes_map_fabric_lane432.BCM8892X": "rx356:tx353", - "lane_to_serdes_map_fabric_lane433.BCM8892X": "rx357:tx354", + "lane_to_serdes_map_fabric_lane432.BCM8892X": "rx352:tx357", + "lane_to_serdes_map_fabric_lane433.BCM8892X": "rx353:tx358", "lane_to_serdes_map_fabric_lane434.BCM8892X": "rx358:tx355", "lane_to_serdes_map_fabric_lane435.BCM8892X": "rx359:tx352", - "lane_to_serdes_map_fabric_lane436.BCM8892X": "rx364:tx361", - "lane_to_serdes_map_fabric_lane437.BCM8892X": "rx365:tx362", + "lane_to_serdes_map_fabric_lane436.BCM8892X": "rx360:tx365", + "lane_to_serdes_map_fabric_lane437.BCM8892X": "rx361:tx366", "lane_to_serdes_map_fabric_lane438.BCM8892X": "rx366:tx363", "lane_to_serdes_map_fabric_lane439.BCM8892X": "rx367:tx360", - "lane_to_serdes_map_fabric_lane44.BCM8892X": "rx88:tx92", - "lane_to_serdes_map_fabric_lane440.BCM8892X": "rx372:tx368", - "lane_to_serdes_map_fabric_lane441.BCM8892X": "rx373:tx369", + "lane_to_serdes_map_fabric_lane44.BCM8892X": "rx92:tx88", + "lane_to_serdes_map_fabric_lane440.BCM8892X": "rx368:tx372", + "lane_to_serdes_map_fabric_lane441.BCM8892X": "rx369:tx373", "lane_to_serdes_map_fabric_lane442.BCM8892X": "rx374:tx370", "lane_to_serdes_map_fabric_lane443.BCM8892X": "rx375:tx371", - "lane_to_serdes_map_fabric_lane444.BCM8892X": "rx380:tx376", - "lane_to_serdes_map_fabric_lane445.BCM8892X": "rx381:tx377", + "lane_to_serdes_map_fabric_lane444.BCM8892X": "rx376:tx380", + "lane_to_serdes_map_fabric_lane445.BCM8892X": "rx377:tx381", "lane_to_serdes_map_fabric_lane446.BCM8892X": "rx382:tx378", "lane_to_serdes_map_fabric_lane447.BCM8892X": "rx383:tx379", "lane_to_serdes_map_fabric_lane448.BCM8892X": "rx388:tx385", "lane_to_serdes_map_fabric_lane449.BCM8892X": "rx389:tx386", - "lane_to_serdes_map_fabric_lane45.BCM8892X": "rx89:tx93", - "lane_to_serdes_map_fabric_lane450.BCM8892X": "rx390:tx387", - "lane_to_serdes_map_fabric_lane451.BCM8892X": "rx391:tx384", + "lane_to_serdes_map_fabric_lane45.BCM8892X": "rx93:tx89", + "lane_to_serdes_map_fabric_lane450.BCM8892X": "rx386:tx391", + "lane_to_serdes_map_fabric_lane451.BCM8892X": "rx387:tx388", "lane_to_serdes_map_fabric_lane452.BCM8892X": "rx396:tx393", "lane_to_serdes_map_fabric_lane453.BCM8892X": "rx397:tx394", - "lane_to_serdes_map_fabric_lane454.BCM8892X": "rx398:tx395", - "lane_to_serdes_map_fabric_lane455.BCM8892X": "rx399:tx392", + "lane_to_serdes_map_fabric_lane454.BCM8892X": "rx394:tx399", + "lane_to_serdes_map_fabric_lane455.BCM8892X": "rx395:tx396", "lane_to_serdes_map_fabric_lane456.BCM8892X": "rx404:tx400", "lane_to_serdes_map_fabric_lane457.BCM8892X": "rx405:tx401", - "lane_to_serdes_map_fabric_lane458.BCM8892X": "rx406:tx402", - "lane_to_serdes_map_fabric_lane459.BCM8892X": "rx407:tx403", + "lane_to_serdes_map_fabric_lane458.BCM8892X": "rx402:tx406", + "lane_to_serdes_map_fabric_lane459.BCM8892X": "rx403:tx407", "lane_to_serdes_map_fabric_lane46.BCM8892X": "rx90:tx94", "lane_to_serdes_map_fabric_lane460.BCM8892X": "rx412:tx408", "lane_to_serdes_map_fabric_lane461.BCM8892X": "rx413:tx409", - "lane_to_serdes_map_fabric_lane462.BCM8892X": "rx414:tx410", - "lane_to_serdes_map_fabric_lane463.BCM8892X": "rx415:tx411", + "lane_to_serdes_map_fabric_lane462.BCM8892X": "rx410:tx414", + "lane_to_serdes_map_fabric_lane463.BCM8892X": "rx411:tx415", "lane_to_serdes_map_fabric_lane464.BCM8892X": "rx420:tx417", "lane_to_serdes_map_fabric_lane465.BCM8892X": "rx421:tx418", - "lane_to_serdes_map_fabric_lane466.BCM8892X": "rx422:tx419", - "lane_to_serdes_map_fabric_lane467.BCM8892X": "rx423:tx416", + "lane_to_serdes_map_fabric_lane466.BCM8892X": "rx418:tx423", + "lane_to_serdes_map_fabric_lane467.BCM8892X": "rx419:tx420", "lane_to_serdes_map_fabric_lane468.BCM8892X": "rx428:tx425", "lane_to_serdes_map_fabric_lane469.BCM8892X": "rx429:tx426", "lane_to_serdes_map_fabric_lane47.BCM8892X": "rx91:tx95", - "lane_to_serdes_map_fabric_lane470.BCM8892X": "rx430:tx427", - "lane_to_serdes_map_fabric_lane471.BCM8892X": "rx431:tx424", + "lane_to_serdes_map_fabric_lane470.BCM8892X": "rx426:tx431", + "lane_to_serdes_map_fabric_lane471.BCM8892X": "rx427:tx428", "lane_to_serdes_map_fabric_lane472.BCM8892X": "rx436:tx432", "lane_to_serdes_map_fabric_lane473.BCM8892X": "rx437:tx433", - "lane_to_serdes_map_fabric_lane474.BCM8892X": "rx438:tx434", - "lane_to_serdes_map_fabric_lane475.BCM8892X": "rx439:tx435", + "lane_to_serdes_map_fabric_lane474.BCM8892X": "rx434:tx438", + "lane_to_serdes_map_fabric_lane475.BCM8892X": "rx435:tx439", "lane_to_serdes_map_fabric_lane476.BCM8892X": "rx444:tx440", "lane_to_serdes_map_fabric_lane477.BCM8892X": "rx445:tx441", - "lane_to_serdes_map_fabric_lane478.BCM8892X": "rx446:tx442", - "lane_to_serdes_map_fabric_lane479.BCM8892X": "rx447:tx443", - "lane_to_serdes_map_fabric_lane48.BCM8892X": "rx96:tx101", + "lane_to_serdes_map_fabric_lane478.BCM8892X": "rx442:tx446", + "lane_to_serdes_map_fabric_lane479.BCM8892X": "rx443:tx447", + "lane_to_serdes_map_fabric_lane48.BCM8892X": "rx100:tx97", "lane_to_serdes_map_fabric_lane480.BCM8892X": "rx452:tx449", "lane_to_serdes_map_fabric_lane481.BCM8892X": "rx453:tx450", - "lane_to_serdes_map_fabric_lane482.BCM8892X": "rx454:tx451", - "lane_to_serdes_map_fabric_lane483.BCM8892X": "rx455:tx448", + "lane_to_serdes_map_fabric_lane482.BCM8892X": "rx450:tx455", + "lane_to_serdes_map_fabric_lane483.BCM8892X": "rx451:tx452", "lane_to_serdes_map_fabric_lane484.BCM8892X": "rx460:tx457", "lane_to_serdes_map_fabric_lane485.BCM8892X": "rx461:tx458", - "lane_to_serdes_map_fabric_lane486.BCM8892X": "rx462:tx459", - "lane_to_serdes_map_fabric_lane487.BCM8892X": "rx463:tx456", + "lane_to_serdes_map_fabric_lane486.BCM8892X": "rx458:tx463", + "lane_to_serdes_map_fabric_lane487.BCM8892X": "rx459:tx460", "lane_to_serdes_map_fabric_lane488.BCM8892X": "rx468:tx464", "lane_to_serdes_map_fabric_lane489.BCM8892X": "rx469:tx465", - "lane_to_serdes_map_fabric_lane49.BCM8892X": "rx97:tx102", - "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx470:tx466", - "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx471:tx467", + "lane_to_serdes_map_fabric_lane49.BCM8892X": "rx101:tx98", + "lane_to_serdes_map_fabric_lane490.BCM8892X": "rx466:tx470", + "lane_to_serdes_map_fabric_lane491.BCM8892X": "rx467:tx471", "lane_to_serdes_map_fabric_lane492.BCM8892X": "rx472:tx472", "lane_to_serdes_map_fabric_lane493.BCM8892X": "rx473:tx473", - "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx474:tx474", - "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx475:tx475", + "lane_to_serdes_map_fabric_lane494.BCM8892X": "rx478:tx478", + "lane_to_serdes_map_fabric_lane495.BCM8892X": "rx479:tx479", "lane_to_serdes_map_fabric_lane496.BCM8892X": "rx484:tx485", "lane_to_serdes_map_fabric_lane497.BCM8892X": "rx485:tx484", "lane_to_serdes_map_fabric_lane498.BCM8892X": "rx482:tx483", "lane_to_serdes_map_fabric_lane499.BCM8892X": "rx483:tx482", - "lane_to_serdes_map_fabric_lane5.BCM8892X": "rx9:tx8", + "lane_to_serdes_map_fabric_lane5.BCM8892X": "rx13:tx12", "lane_to_serdes_map_fabric_lane50.BCM8892X": "rx98:tx103", "lane_to_serdes_map_fabric_lane500.BCM8892X": "rx488:tx489", "lane_to_serdes_map_fabric_lane501.BCM8892X": "rx489:tx488", @@ -2199,68 +2204,68 @@ "lane_to_serdes_map_fabric_lane51.BCM8892X": "rx99:tx100", "lane_to_serdes_map_fabric_lane510.BCM8892X": "rx510:tx510", "lane_to_serdes_map_fabric_lane511.BCM8892X": "rx511:tx511", - "lane_to_serdes_map_fabric_lane52.BCM8892X": "rx104:tx109", - "lane_to_serdes_map_fabric_lane53.BCM8892X": "rx105:tx110", + "lane_to_serdes_map_fabric_lane52.BCM8892X": "rx108:tx105", + "lane_to_serdes_map_fabric_lane53.BCM8892X": "rx109:tx106", "lane_to_serdes_map_fabric_lane54.BCM8892X": "rx106:tx111", "lane_to_serdes_map_fabric_lane55.BCM8892X": "rx107:tx108", - "lane_to_serdes_map_fabric_lane56.BCM8892X": "rx112:tx116", - "lane_to_serdes_map_fabric_lane57.BCM8892X": "rx113:tx117", + "lane_to_serdes_map_fabric_lane56.BCM8892X": "rx116:tx112", + "lane_to_serdes_map_fabric_lane57.BCM8892X": "rx117:tx113", "lane_to_serdes_map_fabric_lane58.BCM8892X": "rx114:tx118", "lane_to_serdes_map_fabric_lane59.BCM8892X": "rx115:tx119", - "lane_to_serdes_map_fabric_lane6.BCM8892X": "rx14:tx15", - "lane_to_serdes_map_fabric_lane60.BCM8892X": "rx120:tx124", - "lane_to_serdes_map_fabric_lane61.BCM8892X": "rx121:tx125", + "lane_to_serdes_map_fabric_lane6.BCM8892X": "rx10:tx11", + "lane_to_serdes_map_fabric_lane60.BCM8892X": "rx124:tx120", + "lane_to_serdes_map_fabric_lane61.BCM8892X": "rx125:tx121", "lane_to_serdes_map_fabric_lane62.BCM8892X": "rx122:tx126", "lane_to_serdes_map_fabric_lane63.BCM8892X": "rx123:tx127", "lane_to_serdes_map_fabric_lane64.BCM8892X": "rx128:tx133", "lane_to_serdes_map_fabric_lane65.BCM8892X": "rx129:tx134", - "lane_to_serdes_map_fabric_lane66.BCM8892X": "rx130:tx135", - "lane_to_serdes_map_fabric_lane67.BCM8892X": "rx131:tx132", + "lane_to_serdes_map_fabric_lane66.BCM8892X": "rx134:tx131", + "lane_to_serdes_map_fabric_lane67.BCM8892X": "rx135:tx128", "lane_to_serdes_map_fabric_lane68.BCM8892X": "rx136:tx141", "lane_to_serdes_map_fabric_lane69.BCM8892X": "rx137:tx142", - "lane_to_serdes_map_fabric_lane7.BCM8892X": "rx15:tx14", - "lane_to_serdes_map_fabric_lane70.BCM8892X": "rx138:tx143", - "lane_to_serdes_map_fabric_lane71.BCM8892X": "rx139:tx140", + "lane_to_serdes_map_fabric_lane7.BCM8892X": "rx11:tx10", + "lane_to_serdes_map_fabric_lane70.BCM8892X": "rx142:tx139", + "lane_to_serdes_map_fabric_lane71.BCM8892X": "rx143:tx136", "lane_to_serdes_map_fabric_lane72.BCM8892X": "rx144:tx148", "lane_to_serdes_map_fabric_lane73.BCM8892X": "rx145:tx149", - "lane_to_serdes_map_fabric_lane74.BCM8892X": "rx146:tx150", - "lane_to_serdes_map_fabric_lane75.BCM8892X": "rx147:tx151", + "lane_to_serdes_map_fabric_lane74.BCM8892X": "rx150:tx146", + "lane_to_serdes_map_fabric_lane75.BCM8892X": "rx151:tx147", "lane_to_serdes_map_fabric_lane76.BCM8892X": "rx152:tx156", "lane_to_serdes_map_fabric_lane77.BCM8892X": "rx153:tx157", - "lane_to_serdes_map_fabric_lane78.BCM8892X": "rx154:tx158", - "lane_to_serdes_map_fabric_lane79.BCM8892X": "rx155:tx159", - "lane_to_serdes_map_fabric_lane8.BCM8892X": "rx20:tx20", + "lane_to_serdes_map_fabric_lane78.BCM8892X": "rx158:tx154", + "lane_to_serdes_map_fabric_lane79.BCM8892X": "rx159:tx155", + "lane_to_serdes_map_fabric_lane8.BCM8892X": "rx16:tx16", "lane_to_serdes_map_fabric_lane80.BCM8892X": "rx160:tx165", "lane_to_serdes_map_fabric_lane81.BCM8892X": "rx161:tx166", - "lane_to_serdes_map_fabric_lane82.BCM8892X": "rx162:tx167", - "lane_to_serdes_map_fabric_lane83.BCM8892X": "rx163:tx164", + "lane_to_serdes_map_fabric_lane82.BCM8892X": "rx166:tx163", + "lane_to_serdes_map_fabric_lane83.BCM8892X": "rx167:tx160", "lane_to_serdes_map_fabric_lane84.BCM8892X": "rx168:tx173", "lane_to_serdes_map_fabric_lane85.BCM8892X": "rx169:tx174", - "lane_to_serdes_map_fabric_lane86.BCM8892X": "rx170:tx175", - "lane_to_serdes_map_fabric_lane87.BCM8892X": "rx171:tx172", + "lane_to_serdes_map_fabric_lane86.BCM8892X": "rx174:tx171", + "lane_to_serdes_map_fabric_lane87.BCM8892X": "rx175:tx168", "lane_to_serdes_map_fabric_lane88.BCM8892X": "rx176:tx180", "lane_to_serdes_map_fabric_lane89.BCM8892X": "rx177:tx181", - "lane_to_serdes_map_fabric_lane9.BCM8892X": "rx21:tx21", - "lane_to_serdes_map_fabric_lane90.BCM8892X": "rx178:tx182", - "lane_to_serdes_map_fabric_lane91.BCM8892X": "rx179:tx183", + "lane_to_serdes_map_fabric_lane9.BCM8892X": "rx17:tx17", + "lane_to_serdes_map_fabric_lane90.BCM8892X": "rx182:tx178", + "lane_to_serdes_map_fabric_lane91.BCM8892X": "rx183:tx179", "lane_to_serdes_map_fabric_lane92.BCM8892X": "rx184:tx188", "lane_to_serdes_map_fabric_lane93.BCM8892X": "rx185:tx189", - "lane_to_serdes_map_fabric_lane94.BCM8892X": "rx186:tx190", - "lane_to_serdes_map_fabric_lane95.BCM8892X": "rx187:tx191", + "lane_to_serdes_map_fabric_lane94.BCM8892X": "rx190:tx186", + "lane_to_serdes_map_fabric_lane95.BCM8892X": "rx191:tx187", "lane_to_serdes_map_fabric_lane96.BCM8892X": "rx192:tx197", "lane_to_serdes_map_fabric_lane97.BCM8892X": "rx193:tx198", - "lane_to_serdes_map_fabric_lane98.BCM8892X": "rx194:tx199", - "lane_to_serdes_map_fabric_lane99.BCM8892X": "rx195:tx196", - "phy_rx_polarity_flip_fabric0.BCM8892X": "0", + "lane_to_serdes_map_fabric_lane98.BCM8892X": "rx198:tx195", + "lane_to_serdes_map_fabric_lane99.BCM8892X": "rx199:tx192", + "phy_rx_polarity_flip_fabric0.BCM8892X": "1", "phy_rx_polarity_flip_fabric1.BCM8892X": "1", "phy_rx_polarity_flip_fabric10.BCM8892X": "0", "phy_rx_polarity_flip_fabric100.BCM8892X": "0", "phy_rx_polarity_flip_fabric101.BCM8892X": "0", - "phy_rx_polarity_flip_fabric102.BCM8892X": "0", + "phy_rx_polarity_flip_fabric102.BCM8892X": "1", "phy_rx_polarity_flip_fabric103.BCM8892X": "1", "phy_rx_polarity_flip_fabric104.BCM8892X": "0", "phy_rx_polarity_flip_fabric105.BCM8892X": "0", - "phy_rx_polarity_flip_fabric106.BCM8892X": "0", + "phy_rx_polarity_flip_fabric106.BCM8892X": "1", "phy_rx_polarity_flip_fabric107.BCM8892X": "1", "phy_rx_polarity_flip_fabric108.BCM8892X": "0", "phy_rx_polarity_flip_fabric109.BCM8892X": "0", @@ -2284,126 +2289,126 @@ "phy_rx_polarity_flip_fabric125.BCM8892X": "0", "phy_rx_polarity_flip_fabric126.BCM8892X": "1", "phy_rx_polarity_flip_fabric127.BCM8892X": "1", - "phy_rx_polarity_flip_fabric128.BCM8892X": "0", + "phy_rx_polarity_flip_fabric128.BCM8892X": "1", "phy_rx_polarity_flip_fabric129.BCM8892X": "1", "phy_rx_polarity_flip_fabric13.BCM8892X": "0", - "phy_rx_polarity_flip_fabric130.BCM8892X": "0", + "phy_rx_polarity_flip_fabric130.BCM8892X": "1", "phy_rx_polarity_flip_fabric131.BCM8892X": "0", - "phy_rx_polarity_flip_fabric132.BCM8892X": "0", + "phy_rx_polarity_flip_fabric132.BCM8892X": "1", "phy_rx_polarity_flip_fabric133.BCM8892X": "0", - "phy_rx_polarity_flip_fabric134.BCM8892X": "1", + "phy_rx_polarity_flip_fabric134.BCM8892X": "0", "phy_rx_polarity_flip_fabric135.BCM8892X": "1", - "phy_rx_polarity_flip_fabric136.BCM8892X": "0", + "phy_rx_polarity_flip_fabric136.BCM8892X": "1", "phy_rx_polarity_flip_fabric137.BCM8892X": "1", - "phy_rx_polarity_flip_fabric138.BCM8892X": "0", + "phy_rx_polarity_flip_fabric138.BCM8892X": "1", "phy_rx_polarity_flip_fabric139.BCM8892X": "0", "phy_rx_polarity_flip_fabric14.BCM8892X": "1", - "phy_rx_polarity_flip_fabric140.BCM8892X": "0", + "phy_rx_polarity_flip_fabric140.BCM8892X": "1", "phy_rx_polarity_flip_fabric141.BCM8892X": "0", - "phy_rx_polarity_flip_fabric142.BCM8892X": "1", + "phy_rx_polarity_flip_fabric142.BCM8892X": "0", "phy_rx_polarity_flip_fabric143.BCM8892X": "1", - "phy_rx_polarity_flip_fabric144.BCM8892X": "1", - "phy_rx_polarity_flip_fabric145.BCM8892X": "1", + "phy_rx_polarity_flip_fabric144.BCM8892X": "0", + "phy_rx_polarity_flip_fabric145.BCM8892X": "0", "phy_rx_polarity_flip_fabric146.BCM8892X": "0", "phy_rx_polarity_flip_fabric147.BCM8892X": "1", "phy_rx_polarity_flip_fabric148.BCM8892X": "1", - "phy_rx_polarity_flip_fabric149.BCM8892X": "1", + "phy_rx_polarity_flip_fabric149.BCM8892X": "0", "phy_rx_polarity_flip_fabric15.BCM8892X": "0", "phy_rx_polarity_flip_fabric150.BCM8892X": "1", "phy_rx_polarity_flip_fabric151.BCM8892X": "0", "phy_rx_polarity_flip_fabric152.BCM8892X": "1", - "phy_rx_polarity_flip_fabric153.BCM8892X": "1", + "phy_rx_polarity_flip_fabric153.BCM8892X": "0", "phy_rx_polarity_flip_fabric154.BCM8892X": "1", "phy_rx_polarity_flip_fabric155.BCM8892X": "0", "phy_rx_polarity_flip_fabric156.BCM8892X": "1", - "phy_rx_polarity_flip_fabric157.BCM8892X": "1", + "phy_rx_polarity_flip_fabric157.BCM8892X": "0", "phy_rx_polarity_flip_fabric158.BCM8892X": "1", "phy_rx_polarity_flip_fabric159.BCM8892X": "0", "phy_rx_polarity_flip_fabric16.BCM8892X": "0", "phy_rx_polarity_flip_fabric160.BCM8892X": "1", - "phy_rx_polarity_flip_fabric161.BCM8892X": "1", + "phy_rx_polarity_flip_fabric161.BCM8892X": "0", "phy_rx_polarity_flip_fabric162.BCM8892X": "1", "phy_rx_polarity_flip_fabric163.BCM8892X": "0", "phy_rx_polarity_flip_fabric164.BCM8892X": "1", - "phy_rx_polarity_flip_fabric165.BCM8892X": "1", + "phy_rx_polarity_flip_fabric165.BCM8892X": "0", "phy_rx_polarity_flip_fabric166.BCM8892X": "1", "phy_rx_polarity_flip_fabric167.BCM8892X": "0", "phy_rx_polarity_flip_fabric168.BCM8892X": "1", - "phy_rx_polarity_flip_fabric169.BCM8892X": "1", + "phy_rx_polarity_flip_fabric169.BCM8892X": "0", "phy_rx_polarity_flip_fabric17.BCM8892X": "1", "phy_rx_polarity_flip_fabric170.BCM8892X": "1", "phy_rx_polarity_flip_fabric171.BCM8892X": "0", "phy_rx_polarity_flip_fabric172.BCM8892X": "1", - "phy_rx_polarity_flip_fabric173.BCM8892X": "1", + "phy_rx_polarity_flip_fabric173.BCM8892X": "0", "phy_rx_polarity_flip_fabric174.BCM8892X": "1", "phy_rx_polarity_flip_fabric175.BCM8892X": "0", "phy_rx_polarity_flip_fabric176.BCM8892X": "1", - "phy_rx_polarity_flip_fabric177.BCM8892X": "1", + "phy_rx_polarity_flip_fabric177.BCM8892X": "0", "phy_rx_polarity_flip_fabric178.BCM8892X": "1", "phy_rx_polarity_flip_fabric179.BCM8892X": "0", "phy_rx_polarity_flip_fabric18.BCM8892X": "0", "phy_rx_polarity_flip_fabric180.BCM8892X": "1", - "phy_rx_polarity_flip_fabric181.BCM8892X": "1", + "phy_rx_polarity_flip_fabric181.BCM8892X": "0", "phy_rx_polarity_flip_fabric182.BCM8892X": "1", "phy_rx_polarity_flip_fabric183.BCM8892X": "0", "phy_rx_polarity_flip_fabric184.BCM8892X": "1", - "phy_rx_polarity_flip_fabric185.BCM8892X": "1", + "phy_rx_polarity_flip_fabric185.BCM8892X": "0", "phy_rx_polarity_flip_fabric186.BCM8892X": "1", "phy_rx_polarity_flip_fabric187.BCM8892X": "0", "phy_rx_polarity_flip_fabric188.BCM8892X": "1", - "phy_rx_polarity_flip_fabric189.BCM8892X": "1", + "phy_rx_polarity_flip_fabric189.BCM8892X": "0", "phy_rx_polarity_flip_fabric19.BCM8892X": "1", "phy_rx_polarity_flip_fabric190.BCM8892X": "1", "phy_rx_polarity_flip_fabric191.BCM8892X": "0", "phy_rx_polarity_flip_fabric192.BCM8892X": "1", "phy_rx_polarity_flip_fabric193.BCM8892X": "1", - "phy_rx_polarity_flip_fabric194.BCM8892X": "0", - "phy_rx_polarity_flip_fabric195.BCM8892X": "0", + "phy_rx_polarity_flip_fabric194.BCM8892X": "1", + "phy_rx_polarity_flip_fabric195.BCM8892X": "1", "phy_rx_polarity_flip_fabric196.BCM8892X": "1", "phy_rx_polarity_flip_fabric197.BCM8892X": "1", - "phy_rx_polarity_flip_fabric198.BCM8892X": "0", - "phy_rx_polarity_flip_fabric199.BCM8892X": "0", + "phy_rx_polarity_flip_fabric198.BCM8892X": "1", + "phy_rx_polarity_flip_fabric199.BCM8892X": "1", "phy_rx_polarity_flip_fabric2.BCM8892X": "0", "phy_rx_polarity_flip_fabric20.BCM8892X": "0", "phy_rx_polarity_flip_fabric200.BCM8892X": "1", "phy_rx_polarity_flip_fabric201.BCM8892X": "1", - "phy_rx_polarity_flip_fabric202.BCM8892X": "0", - "phy_rx_polarity_flip_fabric203.BCM8892X": "0", + "phy_rx_polarity_flip_fabric202.BCM8892X": "1", + "phy_rx_polarity_flip_fabric203.BCM8892X": "1", "phy_rx_polarity_flip_fabric204.BCM8892X": "1", "phy_rx_polarity_flip_fabric205.BCM8892X": "1", - "phy_rx_polarity_flip_fabric206.BCM8892X": "0", - "phy_rx_polarity_flip_fabric207.BCM8892X": "0", + "phy_rx_polarity_flip_fabric206.BCM8892X": "1", + "phy_rx_polarity_flip_fabric207.BCM8892X": "1", "phy_rx_polarity_flip_fabric208.BCM8892X": "1", "phy_rx_polarity_flip_fabric209.BCM8892X": "1", "phy_rx_polarity_flip_fabric21.BCM8892X": "0", - "phy_rx_polarity_flip_fabric210.BCM8892X": "0", - "phy_rx_polarity_flip_fabric211.BCM8892X": "0", + "phy_rx_polarity_flip_fabric210.BCM8892X": "1", + "phy_rx_polarity_flip_fabric211.BCM8892X": "1", "phy_rx_polarity_flip_fabric212.BCM8892X": "1", "phy_rx_polarity_flip_fabric213.BCM8892X": "1", - "phy_rx_polarity_flip_fabric214.BCM8892X": "0", - "phy_rx_polarity_flip_fabric215.BCM8892X": "0", + "phy_rx_polarity_flip_fabric214.BCM8892X": "1", + "phy_rx_polarity_flip_fabric215.BCM8892X": "1", "phy_rx_polarity_flip_fabric216.BCM8892X": "1", "phy_rx_polarity_flip_fabric217.BCM8892X": "1", - "phy_rx_polarity_flip_fabric218.BCM8892X": "0", - "phy_rx_polarity_flip_fabric219.BCM8892X": "0", - "phy_rx_polarity_flip_fabric22.BCM8892X": "0", + "phy_rx_polarity_flip_fabric218.BCM8892X": "1", + "phy_rx_polarity_flip_fabric219.BCM8892X": "1", + "phy_rx_polarity_flip_fabric22.BCM8892X": "1", "phy_rx_polarity_flip_fabric220.BCM8892X": "1", "phy_rx_polarity_flip_fabric221.BCM8892X": "1", - "phy_rx_polarity_flip_fabric222.BCM8892X": "0", - "phy_rx_polarity_flip_fabric223.BCM8892X": "0", + "phy_rx_polarity_flip_fabric222.BCM8892X": "1", + "phy_rx_polarity_flip_fabric223.BCM8892X": "1", "phy_rx_polarity_flip_fabric224.BCM8892X": "1", "phy_rx_polarity_flip_fabric225.BCM8892X": "1", - "phy_rx_polarity_flip_fabric226.BCM8892X": "0", - "phy_rx_polarity_flip_fabric227.BCM8892X": "0", + "phy_rx_polarity_flip_fabric226.BCM8892X": "1", + "phy_rx_polarity_flip_fabric227.BCM8892X": "1", "phy_rx_polarity_flip_fabric228.BCM8892X": "1", "phy_rx_polarity_flip_fabric229.BCM8892X": "1", - "phy_rx_polarity_flip_fabric23.BCM8892X": "0", - "phy_rx_polarity_flip_fabric230.BCM8892X": "0", - "phy_rx_polarity_flip_fabric231.BCM8892X": "0", + "phy_rx_polarity_flip_fabric23.BCM8892X": "1", + "phy_rx_polarity_flip_fabric230.BCM8892X": "1", + "phy_rx_polarity_flip_fabric231.BCM8892X": "1", "phy_rx_polarity_flip_fabric232.BCM8892X": "1", "phy_rx_polarity_flip_fabric233.BCM8892X": "1", - "phy_rx_polarity_flip_fabric234.BCM8892X": "0", - "phy_rx_polarity_flip_fabric235.BCM8892X": "0", + "phy_rx_polarity_flip_fabric234.BCM8892X": "1", + "phy_rx_polarity_flip_fabric235.BCM8892X": "1", "phy_rx_polarity_flip_fabric236.BCM8892X": "1", "phy_rx_polarity_flip_fabric237.BCM8892X": "1", "phy_rx_polarity_flip_fabric238.BCM8892X": "1", @@ -2426,7 +2431,7 @@ "phy_rx_polarity_flip_fabric253.BCM8892X": "0", "phy_rx_polarity_flip_fabric254.BCM8892X": "1", "phy_rx_polarity_flip_fabric255.BCM8892X": "1", - "phy_rx_polarity_flip_fabric256.BCM8892X": "1", + "phy_rx_polarity_flip_fabric256.BCM8892X": "0", "phy_rx_polarity_flip_fabric257.BCM8892X": "1", "phy_rx_polarity_flip_fabric258.BCM8892X": "0", "phy_rx_polarity_flip_fabric259.BCM8892X": "0", @@ -2450,8 +2455,8 @@ "phy_rx_polarity_flip_fabric275.BCM8892X": "1", "phy_rx_polarity_flip_fabric276.BCM8892X": "0", "phy_rx_polarity_flip_fabric277.BCM8892X": "0", - "phy_rx_polarity_flip_fabric278.BCM8892X": "1", - "phy_rx_polarity_flip_fabric279.BCM8892X": "1", + "phy_rx_polarity_flip_fabric278.BCM8892X": "0", + "phy_rx_polarity_flip_fabric279.BCM8892X": "0", "phy_rx_polarity_flip_fabric28.BCM8892X": "0", "phy_rx_polarity_flip_fabric280.BCM8892X": "0", "phy_rx_polarity_flip_fabric281.BCM8892X": "0", @@ -2500,51 +2505,51 @@ "phy_rx_polarity_flip_fabric32.BCM8892X": "0", "phy_rx_polarity_flip_fabric320.BCM8892X": "0", "phy_rx_polarity_flip_fabric321.BCM8892X": "1", - "phy_rx_polarity_flip_fabric322.BCM8892X": "1", + "phy_rx_polarity_flip_fabric322.BCM8892X": "0", "phy_rx_polarity_flip_fabric323.BCM8892X": "1", "phy_rx_polarity_flip_fabric324.BCM8892X": "0", "phy_rx_polarity_flip_fabric325.BCM8892X": "1", - "phy_rx_polarity_flip_fabric326.BCM8892X": "1", + "phy_rx_polarity_flip_fabric326.BCM8892X": "0", "phy_rx_polarity_flip_fabric327.BCM8892X": "1", "phy_rx_polarity_flip_fabric328.BCM8892X": "0", "phy_rx_polarity_flip_fabric329.BCM8892X": "1", "phy_rx_polarity_flip_fabric33.BCM8892X": "0", - "phy_rx_polarity_flip_fabric330.BCM8892X": "1", + "phy_rx_polarity_flip_fabric330.BCM8892X": "0", "phy_rx_polarity_flip_fabric331.BCM8892X": "1", "phy_rx_polarity_flip_fabric332.BCM8892X": "0", "phy_rx_polarity_flip_fabric333.BCM8892X": "1", - "phy_rx_polarity_flip_fabric334.BCM8892X": "1", + "phy_rx_polarity_flip_fabric334.BCM8892X": "0", "phy_rx_polarity_flip_fabric335.BCM8892X": "1", "phy_rx_polarity_flip_fabric336.BCM8892X": "0", "phy_rx_polarity_flip_fabric337.BCM8892X": "1", - "phy_rx_polarity_flip_fabric338.BCM8892X": "1", + "phy_rx_polarity_flip_fabric338.BCM8892X": "0", "phy_rx_polarity_flip_fabric339.BCM8892X": "1", "phy_rx_polarity_flip_fabric34.BCM8892X": "1", "phy_rx_polarity_flip_fabric340.BCM8892X": "0", "phy_rx_polarity_flip_fabric341.BCM8892X": "1", - "phy_rx_polarity_flip_fabric342.BCM8892X": "1", + "phy_rx_polarity_flip_fabric342.BCM8892X": "0", "phy_rx_polarity_flip_fabric343.BCM8892X": "1", "phy_rx_polarity_flip_fabric344.BCM8892X": "0", "phy_rx_polarity_flip_fabric345.BCM8892X": "1", - "phy_rx_polarity_flip_fabric346.BCM8892X": "1", + "phy_rx_polarity_flip_fabric346.BCM8892X": "0", "phy_rx_polarity_flip_fabric347.BCM8892X": "1", "phy_rx_polarity_flip_fabric348.BCM8892X": "0", "phy_rx_polarity_flip_fabric349.BCM8892X": "1", "phy_rx_polarity_flip_fabric35.BCM8892X": "1", - "phy_rx_polarity_flip_fabric350.BCM8892X": "1", + "phy_rx_polarity_flip_fabric350.BCM8892X": "0", "phy_rx_polarity_flip_fabric351.BCM8892X": "1", "phy_rx_polarity_flip_fabric352.BCM8892X": "0", "phy_rx_polarity_flip_fabric353.BCM8892X": "1", - "phy_rx_polarity_flip_fabric354.BCM8892X": "1", + "phy_rx_polarity_flip_fabric354.BCM8892X": "0", "phy_rx_polarity_flip_fabric355.BCM8892X": "1", "phy_rx_polarity_flip_fabric356.BCM8892X": "0", "phy_rx_polarity_flip_fabric357.BCM8892X": "1", - "phy_rx_polarity_flip_fabric358.BCM8892X": "1", + "phy_rx_polarity_flip_fabric358.BCM8892X": "0", "phy_rx_polarity_flip_fabric359.BCM8892X": "1", "phy_rx_polarity_flip_fabric36.BCM8892X": "0", "phy_rx_polarity_flip_fabric360.BCM8892X": "0", "phy_rx_polarity_flip_fabric361.BCM8892X": "1", - "phy_rx_polarity_flip_fabric362.BCM8892X": "1", + "phy_rx_polarity_flip_fabric362.BCM8892X": "0", "phy_rx_polarity_flip_fabric363.BCM8892X": "1", "phy_rx_polarity_flip_fabric364.BCM8892X": "1", "phy_rx_polarity_flip_fabric365.BCM8892X": "1", @@ -2568,126 +2573,126 @@ "phy_rx_polarity_flip_fabric381.BCM8892X": "0", "phy_rx_polarity_flip_fabric382.BCM8892X": "0", "phy_rx_polarity_flip_fabric383.BCM8892X": "1", - "phy_rx_polarity_flip_fabric384.BCM8892X": "1", + "phy_rx_polarity_flip_fabric384.BCM8892X": "0", "phy_rx_polarity_flip_fabric385.BCM8892X": "1", - "phy_rx_polarity_flip_fabric386.BCM8892X": "1", + "phy_rx_polarity_flip_fabric386.BCM8892X": "0", "phy_rx_polarity_flip_fabric387.BCM8892X": "0", - "phy_rx_polarity_flip_fabric388.BCM8892X": "1", + "phy_rx_polarity_flip_fabric388.BCM8892X": "0", "phy_rx_polarity_flip_fabric389.BCM8892X": "0", "phy_rx_polarity_flip_fabric39.BCM8892X": "1", - "phy_rx_polarity_flip_fabric390.BCM8892X": "0", + "phy_rx_polarity_flip_fabric390.BCM8892X": "1", "phy_rx_polarity_flip_fabric391.BCM8892X": "1", - "phy_rx_polarity_flip_fabric392.BCM8892X": "1", + "phy_rx_polarity_flip_fabric392.BCM8892X": "0", "phy_rx_polarity_flip_fabric393.BCM8892X": "1", - "phy_rx_polarity_flip_fabric394.BCM8892X": "1", + "phy_rx_polarity_flip_fabric394.BCM8892X": "0", "phy_rx_polarity_flip_fabric395.BCM8892X": "0", - "phy_rx_polarity_flip_fabric396.BCM8892X": "1", + "phy_rx_polarity_flip_fabric396.BCM8892X": "0", "phy_rx_polarity_flip_fabric397.BCM8892X": "0", - "phy_rx_polarity_flip_fabric398.BCM8892X": "0", + "phy_rx_polarity_flip_fabric398.BCM8892X": "1", "phy_rx_polarity_flip_fabric399.BCM8892X": "1", "phy_rx_polarity_flip_fabric4.BCM8892X": "1", "phy_rx_polarity_flip_fabric40.BCM8892X": "0", - "phy_rx_polarity_flip_fabric400.BCM8892X": "0", - "phy_rx_polarity_flip_fabric401.BCM8892X": "0", + "phy_rx_polarity_flip_fabric400.BCM8892X": "1", + "phy_rx_polarity_flip_fabric401.BCM8892X": "1", "phy_rx_polarity_flip_fabric402.BCM8892X": "0", "phy_rx_polarity_flip_fabric403.BCM8892X": "1", "phy_rx_polarity_flip_fabric404.BCM8892X": "1", - "phy_rx_polarity_flip_fabric405.BCM8892X": "0", + "phy_rx_polarity_flip_fabric405.BCM8892X": "1", "phy_rx_polarity_flip_fabric406.BCM8892X": "0", "phy_rx_polarity_flip_fabric407.BCM8892X": "0", "phy_rx_polarity_flip_fabric408.BCM8892X": "1", - "phy_rx_polarity_flip_fabric409.BCM8892X": "0", + "phy_rx_polarity_flip_fabric409.BCM8892X": "1", "phy_rx_polarity_flip_fabric41.BCM8892X": "0", "phy_rx_polarity_flip_fabric410.BCM8892X": "0", "phy_rx_polarity_flip_fabric411.BCM8892X": "0", "phy_rx_polarity_flip_fabric412.BCM8892X": "1", - "phy_rx_polarity_flip_fabric413.BCM8892X": "0", + "phy_rx_polarity_flip_fabric413.BCM8892X": "1", "phy_rx_polarity_flip_fabric414.BCM8892X": "0", "phy_rx_polarity_flip_fabric415.BCM8892X": "0", "phy_rx_polarity_flip_fabric416.BCM8892X": "1", - "phy_rx_polarity_flip_fabric417.BCM8892X": "0", + "phy_rx_polarity_flip_fabric417.BCM8892X": "1", "phy_rx_polarity_flip_fabric418.BCM8892X": "0", "phy_rx_polarity_flip_fabric419.BCM8892X": "0", "phy_rx_polarity_flip_fabric42.BCM8892X": "1", "phy_rx_polarity_flip_fabric420.BCM8892X": "1", - "phy_rx_polarity_flip_fabric421.BCM8892X": "0", + "phy_rx_polarity_flip_fabric421.BCM8892X": "1", "phy_rx_polarity_flip_fabric422.BCM8892X": "0", "phy_rx_polarity_flip_fabric423.BCM8892X": "0", "phy_rx_polarity_flip_fabric424.BCM8892X": "1", - "phy_rx_polarity_flip_fabric425.BCM8892X": "0", + "phy_rx_polarity_flip_fabric425.BCM8892X": "1", "phy_rx_polarity_flip_fabric426.BCM8892X": "0", "phy_rx_polarity_flip_fabric427.BCM8892X": "0", "phy_rx_polarity_flip_fabric428.BCM8892X": "1", - "phy_rx_polarity_flip_fabric429.BCM8892X": "0", + "phy_rx_polarity_flip_fabric429.BCM8892X": "1", "phy_rx_polarity_flip_fabric43.BCM8892X": "1", "phy_rx_polarity_flip_fabric430.BCM8892X": "0", "phy_rx_polarity_flip_fabric431.BCM8892X": "0", "phy_rx_polarity_flip_fabric432.BCM8892X": "1", - "phy_rx_polarity_flip_fabric433.BCM8892X": "0", + "phy_rx_polarity_flip_fabric433.BCM8892X": "1", "phy_rx_polarity_flip_fabric434.BCM8892X": "0", "phy_rx_polarity_flip_fabric435.BCM8892X": "0", "phy_rx_polarity_flip_fabric436.BCM8892X": "1", - "phy_rx_polarity_flip_fabric437.BCM8892X": "0", + "phy_rx_polarity_flip_fabric437.BCM8892X": "1", "phy_rx_polarity_flip_fabric438.BCM8892X": "0", "phy_rx_polarity_flip_fabric439.BCM8892X": "0", "phy_rx_polarity_flip_fabric44.BCM8892X": "0", "phy_rx_polarity_flip_fabric440.BCM8892X": "1", - "phy_rx_polarity_flip_fabric441.BCM8892X": "0", + "phy_rx_polarity_flip_fabric441.BCM8892X": "1", "phy_rx_polarity_flip_fabric442.BCM8892X": "0", "phy_rx_polarity_flip_fabric443.BCM8892X": "0", "phy_rx_polarity_flip_fabric444.BCM8892X": "1", - "phy_rx_polarity_flip_fabric445.BCM8892X": "0", + "phy_rx_polarity_flip_fabric445.BCM8892X": "1", "phy_rx_polarity_flip_fabric446.BCM8892X": "0", "phy_rx_polarity_flip_fabric447.BCM8892X": "0", "phy_rx_polarity_flip_fabric448.BCM8892X": "1", "phy_rx_polarity_flip_fabric449.BCM8892X": "1", "phy_rx_polarity_flip_fabric45.BCM8892X": "0", - "phy_rx_polarity_flip_fabric450.BCM8892X": "1", - "phy_rx_polarity_flip_fabric451.BCM8892X": "1", + "phy_rx_polarity_flip_fabric450.BCM8892X": "0", + "phy_rx_polarity_flip_fabric451.BCM8892X": "0", "phy_rx_polarity_flip_fabric452.BCM8892X": "1", "phy_rx_polarity_flip_fabric453.BCM8892X": "1", - "phy_rx_polarity_flip_fabric454.BCM8892X": "1", - "phy_rx_polarity_flip_fabric455.BCM8892X": "1", + "phy_rx_polarity_flip_fabric454.BCM8892X": "0", + "phy_rx_polarity_flip_fabric455.BCM8892X": "0", "phy_rx_polarity_flip_fabric456.BCM8892X": "1", "phy_rx_polarity_flip_fabric457.BCM8892X": "1", - "phy_rx_polarity_flip_fabric458.BCM8892X": "1", - "phy_rx_polarity_flip_fabric459.BCM8892X": "1", + "phy_rx_polarity_flip_fabric458.BCM8892X": "0", + "phy_rx_polarity_flip_fabric459.BCM8892X": "0", "phy_rx_polarity_flip_fabric46.BCM8892X": "1", "phy_rx_polarity_flip_fabric460.BCM8892X": "1", "phy_rx_polarity_flip_fabric461.BCM8892X": "1", - "phy_rx_polarity_flip_fabric462.BCM8892X": "1", - "phy_rx_polarity_flip_fabric463.BCM8892X": "1", + "phy_rx_polarity_flip_fabric462.BCM8892X": "0", + "phy_rx_polarity_flip_fabric463.BCM8892X": "0", "phy_rx_polarity_flip_fabric464.BCM8892X": "1", "phy_rx_polarity_flip_fabric465.BCM8892X": "1", - "phy_rx_polarity_flip_fabric466.BCM8892X": "1", - "phy_rx_polarity_flip_fabric467.BCM8892X": "1", + "phy_rx_polarity_flip_fabric466.BCM8892X": "0", + "phy_rx_polarity_flip_fabric467.BCM8892X": "0", "phy_rx_polarity_flip_fabric468.BCM8892X": "1", "phy_rx_polarity_flip_fabric469.BCM8892X": "1", "phy_rx_polarity_flip_fabric47.BCM8892X": "1", - "phy_rx_polarity_flip_fabric470.BCM8892X": "1", - "phy_rx_polarity_flip_fabric471.BCM8892X": "1", + "phy_rx_polarity_flip_fabric470.BCM8892X": "0", + "phy_rx_polarity_flip_fabric471.BCM8892X": "0", "phy_rx_polarity_flip_fabric472.BCM8892X": "1", "phy_rx_polarity_flip_fabric473.BCM8892X": "1", - "phy_rx_polarity_flip_fabric474.BCM8892X": "1", - "phy_rx_polarity_flip_fabric475.BCM8892X": "1", + "phy_rx_polarity_flip_fabric474.BCM8892X": "0", + "phy_rx_polarity_flip_fabric475.BCM8892X": "0", "phy_rx_polarity_flip_fabric476.BCM8892X": "1", "phy_rx_polarity_flip_fabric477.BCM8892X": "1", - "phy_rx_polarity_flip_fabric478.BCM8892X": "1", - "phy_rx_polarity_flip_fabric479.BCM8892X": "1", + "phy_rx_polarity_flip_fabric478.BCM8892X": "0", + "phy_rx_polarity_flip_fabric479.BCM8892X": "0", "phy_rx_polarity_flip_fabric48.BCM8892X": "0", "phy_rx_polarity_flip_fabric480.BCM8892X": "1", "phy_rx_polarity_flip_fabric481.BCM8892X": "1", - "phy_rx_polarity_flip_fabric482.BCM8892X": "1", - "phy_rx_polarity_flip_fabric483.BCM8892X": "1", + "phy_rx_polarity_flip_fabric482.BCM8892X": "0", + "phy_rx_polarity_flip_fabric483.BCM8892X": "0", "phy_rx_polarity_flip_fabric484.BCM8892X": "1", "phy_rx_polarity_flip_fabric485.BCM8892X": "1", - "phy_rx_polarity_flip_fabric486.BCM8892X": "1", - "phy_rx_polarity_flip_fabric487.BCM8892X": "1", + "phy_rx_polarity_flip_fabric486.BCM8892X": "0", + "phy_rx_polarity_flip_fabric487.BCM8892X": "0", "phy_rx_polarity_flip_fabric488.BCM8892X": "1", "phy_rx_polarity_flip_fabric489.BCM8892X": "1", "phy_rx_polarity_flip_fabric49.BCM8892X": "0", - "phy_rx_polarity_flip_fabric490.BCM8892X": "1", - "phy_rx_polarity_flip_fabric491.BCM8892X": "1", + "phy_rx_polarity_flip_fabric490.BCM8892X": "0", + "phy_rx_polarity_flip_fabric491.BCM8892X": "0", "phy_rx_polarity_flip_fabric492.BCM8892X": "1", "phy_rx_polarity_flip_fabric493.BCM8892X": "0", "phy_rx_polarity_flip_fabric494.BCM8892X": "1", @@ -2726,59 +2731,59 @@ "phy_rx_polarity_flip_fabric63.BCM8892X": "1", "phy_rx_polarity_flip_fabric64.BCM8892X": "0", "phy_rx_polarity_flip_fabric65.BCM8892X": "0", - "phy_rx_polarity_flip_fabric66.BCM8892X": "0", + "phy_rx_polarity_flip_fabric66.BCM8892X": "1", "phy_rx_polarity_flip_fabric67.BCM8892X": "1", "phy_rx_polarity_flip_fabric68.BCM8892X": "0", "phy_rx_polarity_flip_fabric69.BCM8892X": "0", "phy_rx_polarity_flip_fabric7.BCM8892X": "0", - "phy_rx_polarity_flip_fabric70.BCM8892X": "0", + "phy_rx_polarity_flip_fabric70.BCM8892X": "1", "phy_rx_polarity_flip_fabric71.BCM8892X": "1", "phy_rx_polarity_flip_fabric72.BCM8892X": "0", "phy_rx_polarity_flip_fabric73.BCM8892X": "0", - "phy_rx_polarity_flip_fabric74.BCM8892X": "0", + "phy_rx_polarity_flip_fabric74.BCM8892X": "1", "phy_rx_polarity_flip_fabric75.BCM8892X": "1", "phy_rx_polarity_flip_fabric76.BCM8892X": "0", "phy_rx_polarity_flip_fabric77.BCM8892X": "0", - "phy_rx_polarity_flip_fabric78.BCM8892X": "0", + "phy_rx_polarity_flip_fabric78.BCM8892X": "1", "phy_rx_polarity_flip_fabric79.BCM8892X": "1", "phy_rx_polarity_flip_fabric8.BCM8892X": "1", "phy_rx_polarity_flip_fabric80.BCM8892X": "0", "phy_rx_polarity_flip_fabric81.BCM8892X": "0", - "phy_rx_polarity_flip_fabric82.BCM8892X": "0", + "phy_rx_polarity_flip_fabric82.BCM8892X": "1", "phy_rx_polarity_flip_fabric83.BCM8892X": "1", "phy_rx_polarity_flip_fabric84.BCM8892X": "0", "phy_rx_polarity_flip_fabric85.BCM8892X": "0", - "phy_rx_polarity_flip_fabric86.BCM8892X": "0", + "phy_rx_polarity_flip_fabric86.BCM8892X": "1", "phy_rx_polarity_flip_fabric87.BCM8892X": "1", "phy_rx_polarity_flip_fabric88.BCM8892X": "0", "phy_rx_polarity_flip_fabric89.BCM8892X": "0", "phy_rx_polarity_flip_fabric9.BCM8892X": "1", - "phy_rx_polarity_flip_fabric90.BCM8892X": "0", + "phy_rx_polarity_flip_fabric90.BCM8892X": "1", "phy_rx_polarity_flip_fabric91.BCM8892X": "1", "phy_rx_polarity_flip_fabric92.BCM8892X": "0", "phy_rx_polarity_flip_fabric93.BCM8892X": "0", - "phy_rx_polarity_flip_fabric94.BCM8892X": "0", + "phy_rx_polarity_flip_fabric94.BCM8892X": "1", "phy_rx_polarity_flip_fabric95.BCM8892X": "1", "phy_rx_polarity_flip_fabric96.BCM8892X": "0", "phy_rx_polarity_flip_fabric97.BCM8892X": "0", - "phy_rx_polarity_flip_fabric98.BCM8892X": "0", + "phy_rx_polarity_flip_fabric98.BCM8892X": "1", "phy_rx_polarity_flip_fabric99.BCM8892X": "1", "phy_tx_polarity_flip_fabric0.BCM8892X": "1", "phy_tx_polarity_flip_fabric1.BCM8892X": "0", "phy_tx_polarity_flip_fabric10.BCM8892X": "0", "phy_tx_polarity_flip_fabric100.BCM8892X": "1", "phy_tx_polarity_flip_fabric101.BCM8892X": "1", - "phy_tx_polarity_flip_fabric102.BCM8892X": "0", - "phy_tx_polarity_flip_fabric103.BCM8892X": "0", + "phy_tx_polarity_flip_fabric102.BCM8892X": "1", + "phy_tx_polarity_flip_fabric103.BCM8892X": "1", "phy_tx_polarity_flip_fabric104.BCM8892X": "0", "phy_tx_polarity_flip_fabric105.BCM8892X": "1", "phy_tx_polarity_flip_fabric106.BCM8892X": "1", - "phy_tx_polarity_flip_fabric107.BCM8892X": "0", + "phy_tx_polarity_flip_fabric107.BCM8892X": "1", "phy_tx_polarity_flip_fabric108.BCM8892X": "1", "phy_tx_polarity_flip_fabric109.BCM8892X": "1", "phy_tx_polarity_flip_fabric11.BCM8892X": "1", "phy_tx_polarity_flip_fabric110.BCM8892X": "0", - "phy_tx_polarity_flip_fabric111.BCM8892X": "1", + "phy_tx_polarity_flip_fabric111.BCM8892X": "0", "phy_tx_polarity_flip_fabric112.BCM8892X": "0", "phy_tx_polarity_flip_fabric113.BCM8892X": "1", "phy_tx_polarity_flip_fabric114.BCM8892X": "1", @@ -2818,109 +2823,109 @@ "phy_tx_polarity_flip_fabric145.BCM8892X": "1", "phy_tx_polarity_flip_fabric146.BCM8892X": "0", "phy_tx_polarity_flip_fabric147.BCM8892X": "0", - "phy_tx_polarity_flip_fabric148.BCM8892X": "0", + "phy_tx_polarity_flip_fabric148.BCM8892X": "1", "phy_tx_polarity_flip_fabric149.BCM8892X": "0", "phy_tx_polarity_flip_fabric15.BCM8892X": "0", "phy_tx_polarity_flip_fabric150.BCM8892X": "1", "phy_tx_polarity_flip_fabric151.BCM8892X": "1", - "phy_tx_polarity_flip_fabric152.BCM8892X": "1", - "phy_tx_polarity_flip_fabric153.BCM8892X": "0", + "phy_tx_polarity_flip_fabric152.BCM8892X": "0", + "phy_tx_polarity_flip_fabric153.BCM8892X": "1", "phy_tx_polarity_flip_fabric154.BCM8892X": "0", "phy_tx_polarity_flip_fabric155.BCM8892X": "1", - "phy_tx_polarity_flip_fabric156.BCM8892X": "1", - "phy_tx_polarity_flip_fabric157.BCM8892X": "0", + "phy_tx_polarity_flip_fabric156.BCM8892X": "0", + "phy_tx_polarity_flip_fabric157.BCM8892X": "1", "phy_tx_polarity_flip_fabric158.BCM8892X": "0", "phy_tx_polarity_flip_fabric159.BCM8892X": "1", "phy_tx_polarity_flip_fabric16.BCM8892X": "0", - "phy_tx_polarity_flip_fabric160.BCM8892X": "0", + "phy_tx_polarity_flip_fabric160.BCM8892X": "1", "phy_tx_polarity_flip_fabric161.BCM8892X": "0", "phy_tx_polarity_flip_fabric162.BCM8892X": "1", "phy_tx_polarity_flip_fabric163.BCM8892X": "1", - "phy_tx_polarity_flip_fabric164.BCM8892X": "0", + "phy_tx_polarity_flip_fabric164.BCM8892X": "1", "phy_tx_polarity_flip_fabric165.BCM8892X": "0", "phy_tx_polarity_flip_fabric166.BCM8892X": "1", "phy_tx_polarity_flip_fabric167.BCM8892X": "1", - "phy_tx_polarity_flip_fabric168.BCM8892X": "1", - "phy_tx_polarity_flip_fabric169.BCM8892X": "0", + "phy_tx_polarity_flip_fabric168.BCM8892X": "0", + "phy_tx_polarity_flip_fabric169.BCM8892X": "1", "phy_tx_polarity_flip_fabric17.BCM8892X": "0", "phy_tx_polarity_flip_fabric170.BCM8892X": "0", "phy_tx_polarity_flip_fabric171.BCM8892X": "1", - "phy_tx_polarity_flip_fabric172.BCM8892X": "1", - "phy_tx_polarity_flip_fabric173.BCM8892X": "0", + "phy_tx_polarity_flip_fabric172.BCM8892X": "0", + "phy_tx_polarity_flip_fabric173.BCM8892X": "1", "phy_tx_polarity_flip_fabric174.BCM8892X": "0", "phy_tx_polarity_flip_fabric175.BCM8892X": "1", - "phy_tx_polarity_flip_fabric176.BCM8892X": "0", + "phy_tx_polarity_flip_fabric176.BCM8892X": "1", "phy_tx_polarity_flip_fabric177.BCM8892X": "0", "phy_tx_polarity_flip_fabric178.BCM8892X": "1", "phy_tx_polarity_flip_fabric179.BCM8892X": "1", - "phy_tx_polarity_flip_fabric18.BCM8892X": "1", - "phy_tx_polarity_flip_fabric180.BCM8892X": "0", + "phy_tx_polarity_flip_fabric18.BCM8892X": "0", + "phy_tx_polarity_flip_fabric180.BCM8892X": "1", "phy_tx_polarity_flip_fabric181.BCM8892X": "0", "phy_tx_polarity_flip_fabric182.BCM8892X": "1", "phy_tx_polarity_flip_fabric183.BCM8892X": "1", - "phy_tx_polarity_flip_fabric184.BCM8892X": "1", - "phy_tx_polarity_flip_fabric185.BCM8892X": "0", + "phy_tx_polarity_flip_fabric184.BCM8892X": "0", + "phy_tx_polarity_flip_fabric185.BCM8892X": "1", "phy_tx_polarity_flip_fabric186.BCM8892X": "0", "phy_tx_polarity_flip_fabric187.BCM8892X": "1", - "phy_tx_polarity_flip_fabric188.BCM8892X": "1", - "phy_tx_polarity_flip_fabric189.BCM8892X": "0", - "phy_tx_polarity_flip_fabric19.BCM8892X": "1", + "phy_tx_polarity_flip_fabric188.BCM8892X": "0", + "phy_tx_polarity_flip_fabric189.BCM8892X": "1", + "phy_tx_polarity_flip_fabric19.BCM8892X": "0", "phy_tx_polarity_flip_fabric190.BCM8892X": "0", "phy_tx_polarity_flip_fabric191.BCM8892X": "1", "phy_tx_polarity_flip_fabric192.BCM8892X": "1", "phy_tx_polarity_flip_fabric193.BCM8892X": "0", - "phy_tx_polarity_flip_fabric194.BCM8892X": "1", - "phy_tx_polarity_flip_fabric195.BCM8892X": "0", + "phy_tx_polarity_flip_fabric194.BCM8892X": "0", + "phy_tx_polarity_flip_fabric195.BCM8892X": "1", "phy_tx_polarity_flip_fabric196.BCM8892X": "1", "phy_tx_polarity_flip_fabric197.BCM8892X": "0", - "phy_tx_polarity_flip_fabric198.BCM8892X": "1", - "phy_tx_polarity_flip_fabric199.BCM8892X": "0", + "phy_tx_polarity_flip_fabric198.BCM8892X": "0", + "phy_tx_polarity_flip_fabric199.BCM8892X": "1", "phy_tx_polarity_flip_fabric2.BCM8892X": "1", "phy_tx_polarity_flip_fabric20.BCM8892X": "1", "phy_tx_polarity_flip_fabric200.BCM8892X": "0", "phy_tx_polarity_flip_fabric201.BCM8892X": "1", - "phy_tx_polarity_flip_fabric202.BCM8892X": "0", - "phy_tx_polarity_flip_fabric203.BCM8892X": "1", + "phy_tx_polarity_flip_fabric202.BCM8892X": "1", + "phy_tx_polarity_flip_fabric203.BCM8892X": "0", "phy_tx_polarity_flip_fabric204.BCM8892X": "0", "phy_tx_polarity_flip_fabric205.BCM8892X": "1", - "phy_tx_polarity_flip_fabric206.BCM8892X": "0", - "phy_tx_polarity_flip_fabric207.BCM8892X": "1", + "phy_tx_polarity_flip_fabric206.BCM8892X": "1", + "phy_tx_polarity_flip_fabric207.BCM8892X": "0", "phy_tx_polarity_flip_fabric208.BCM8892X": "1", "phy_tx_polarity_flip_fabric209.BCM8892X": "0", "phy_tx_polarity_flip_fabric21.BCM8892X": "0", - "phy_tx_polarity_flip_fabric210.BCM8892X": "1", - "phy_tx_polarity_flip_fabric211.BCM8892X": "0", + "phy_tx_polarity_flip_fabric210.BCM8892X": "0", + "phy_tx_polarity_flip_fabric211.BCM8892X": "1", "phy_tx_polarity_flip_fabric212.BCM8892X": "1", "phy_tx_polarity_flip_fabric213.BCM8892X": "0", - "phy_tx_polarity_flip_fabric214.BCM8892X": "1", - "phy_tx_polarity_flip_fabric215.BCM8892X": "0", + "phy_tx_polarity_flip_fabric214.BCM8892X": "0", + "phy_tx_polarity_flip_fabric215.BCM8892X": "1", "phy_tx_polarity_flip_fabric216.BCM8892X": "0", "phy_tx_polarity_flip_fabric217.BCM8892X": "1", - "phy_tx_polarity_flip_fabric218.BCM8892X": "0", - "phy_tx_polarity_flip_fabric219.BCM8892X": "1", - "phy_tx_polarity_flip_fabric22.BCM8892X": "1", + "phy_tx_polarity_flip_fabric218.BCM8892X": "1", + "phy_tx_polarity_flip_fabric219.BCM8892X": "0", + "phy_tx_polarity_flip_fabric22.BCM8892X": "0", "phy_tx_polarity_flip_fabric220.BCM8892X": "0", "phy_tx_polarity_flip_fabric221.BCM8892X": "1", - "phy_tx_polarity_flip_fabric222.BCM8892X": "0", - "phy_tx_polarity_flip_fabric223.BCM8892X": "1", + "phy_tx_polarity_flip_fabric222.BCM8892X": "1", + "phy_tx_polarity_flip_fabric223.BCM8892X": "0", "phy_tx_polarity_flip_fabric224.BCM8892X": "1", "phy_tx_polarity_flip_fabric225.BCM8892X": "0", - "phy_tx_polarity_flip_fabric226.BCM8892X": "1", - "phy_tx_polarity_flip_fabric227.BCM8892X": "0", + "phy_tx_polarity_flip_fabric226.BCM8892X": "0", + "phy_tx_polarity_flip_fabric227.BCM8892X": "1", "phy_tx_polarity_flip_fabric228.BCM8892X": "1", "phy_tx_polarity_flip_fabric229.BCM8892X": "0", "phy_tx_polarity_flip_fabric23.BCM8892X": "1", - "phy_tx_polarity_flip_fabric230.BCM8892X": "1", - "phy_tx_polarity_flip_fabric231.BCM8892X": "0", + "phy_tx_polarity_flip_fabric230.BCM8892X": "0", + "phy_tx_polarity_flip_fabric231.BCM8892X": "1", "phy_tx_polarity_flip_fabric232.BCM8892X": "0", "phy_tx_polarity_flip_fabric233.BCM8892X": "1", - "phy_tx_polarity_flip_fabric234.BCM8892X": "0", - "phy_tx_polarity_flip_fabric235.BCM8892X": "1", + "phy_tx_polarity_flip_fabric234.BCM8892X": "1", + "phy_tx_polarity_flip_fabric235.BCM8892X": "0", "phy_tx_polarity_flip_fabric236.BCM8892X": "1", "phy_tx_polarity_flip_fabric237.BCM8892X": "1", "phy_tx_polarity_flip_fabric238.BCM8892X": "1", - "phy_tx_polarity_flip_fabric239.BCM8892X": "1", - "phy_tx_polarity_flip_fabric24.BCM8892X": "1", + "phy_tx_polarity_flip_fabric239.BCM8892X": "0", + "phy_tx_polarity_flip_fabric24.BCM8892X": "0", "phy_tx_polarity_flip_fabric240.BCM8892X": "0", "phy_tx_polarity_flip_fabric241.BCM8892X": "1", "phy_tx_polarity_flip_fabric242.BCM8892X": "1", @@ -2931,7 +2936,7 @@ "phy_tx_polarity_flip_fabric247.BCM8892X": "1", "phy_tx_polarity_flip_fabric248.BCM8892X": "1", "phy_tx_polarity_flip_fabric249.BCM8892X": "0", - "phy_tx_polarity_flip_fabric25.BCM8892X": "0", + "phy_tx_polarity_flip_fabric25.BCM8892X": "1", "phy_tx_polarity_flip_fabric250.BCM8892X": "0", "phy_tx_polarity_flip_fabric251.BCM8892X": "1", "phy_tx_polarity_flip_fabric252.BCM8892X": "1", @@ -2958,113 +2963,113 @@ "phy_tx_polarity_flip_fabric271.BCM8892X": "0", "phy_tx_polarity_flip_fabric272.BCM8892X": "0", "phy_tx_polarity_flip_fabric273.BCM8892X": "0", - "phy_tx_polarity_flip_fabric274.BCM8892X": "0", - "phy_tx_polarity_flip_fabric275.BCM8892X": "0", + "phy_tx_polarity_flip_fabric274.BCM8892X": "1", + "phy_tx_polarity_flip_fabric275.BCM8892X": "1", "phy_tx_polarity_flip_fabric276.BCM8892X": "0", "phy_tx_polarity_flip_fabric277.BCM8892X": "1", - "phy_tx_polarity_flip_fabric278.BCM8892X": "0", + "phy_tx_polarity_flip_fabric278.BCM8892X": "1", "phy_tx_polarity_flip_fabric279.BCM8892X": "1", - "phy_tx_polarity_flip_fabric28.BCM8892X": "1", - "phy_tx_polarity_flip_fabric280.BCM8892X": "0", - "phy_tx_polarity_flip_fabric281.BCM8892X": "1", + "phy_tx_polarity_flip_fabric28.BCM8892X": "0", + "phy_tx_polarity_flip_fabric280.BCM8892X": "1", + "phy_tx_polarity_flip_fabric281.BCM8892X": "0", "phy_tx_polarity_flip_fabric282.BCM8892X": "0", "phy_tx_polarity_flip_fabric283.BCM8892X": "1", - "phy_tx_polarity_flip_fabric284.BCM8892X": "0", - "phy_tx_polarity_flip_fabric285.BCM8892X": "1", + "phy_tx_polarity_flip_fabric284.BCM8892X": "1", + "phy_tx_polarity_flip_fabric285.BCM8892X": "0", "phy_tx_polarity_flip_fabric286.BCM8892X": "0", "phy_tx_polarity_flip_fabric287.BCM8892X": "1", - "phy_tx_polarity_flip_fabric288.BCM8892X": "1", - "phy_tx_polarity_flip_fabric289.BCM8892X": "0", - "phy_tx_polarity_flip_fabric29.BCM8892X": "0", + "phy_tx_polarity_flip_fabric288.BCM8892X": "0", + "phy_tx_polarity_flip_fabric289.BCM8892X": "1", + "phy_tx_polarity_flip_fabric29.BCM8892X": "1", "phy_tx_polarity_flip_fabric290.BCM8892X": "1", "phy_tx_polarity_flip_fabric291.BCM8892X": "0", - "phy_tx_polarity_flip_fabric292.BCM8892X": "1", - "phy_tx_polarity_flip_fabric293.BCM8892X": "0", + "phy_tx_polarity_flip_fabric292.BCM8892X": "0", + "phy_tx_polarity_flip_fabric293.BCM8892X": "1", "phy_tx_polarity_flip_fabric294.BCM8892X": "1", "phy_tx_polarity_flip_fabric295.BCM8892X": "0", - "phy_tx_polarity_flip_fabric296.BCM8892X": "0", - "phy_tx_polarity_flip_fabric297.BCM8892X": "1", + "phy_tx_polarity_flip_fabric296.BCM8892X": "1", + "phy_tx_polarity_flip_fabric297.BCM8892X": "0", "phy_tx_polarity_flip_fabric298.BCM8892X": "0", "phy_tx_polarity_flip_fabric299.BCM8892X": "1", "phy_tx_polarity_flip_fabric3.BCM8892X": "0", "phy_tx_polarity_flip_fabric30.BCM8892X": "1", - "phy_tx_polarity_flip_fabric300.BCM8892X": "0", - "phy_tx_polarity_flip_fabric301.BCM8892X": "1", + "phy_tx_polarity_flip_fabric300.BCM8892X": "1", + "phy_tx_polarity_flip_fabric301.BCM8892X": "0", "phy_tx_polarity_flip_fabric302.BCM8892X": "0", "phy_tx_polarity_flip_fabric303.BCM8892X": "1", - "phy_tx_polarity_flip_fabric304.BCM8892X": "1", - "phy_tx_polarity_flip_fabric305.BCM8892X": "0", + "phy_tx_polarity_flip_fabric304.BCM8892X": "0", + "phy_tx_polarity_flip_fabric305.BCM8892X": "1", "phy_tx_polarity_flip_fabric306.BCM8892X": "1", "phy_tx_polarity_flip_fabric307.BCM8892X": "0", - "phy_tx_polarity_flip_fabric308.BCM8892X": "1", - "phy_tx_polarity_flip_fabric309.BCM8892X": "0", + "phy_tx_polarity_flip_fabric308.BCM8892X": "0", + "phy_tx_polarity_flip_fabric309.BCM8892X": "1", "phy_tx_polarity_flip_fabric31.BCM8892X": "0", "phy_tx_polarity_flip_fabric310.BCM8892X": "1", "phy_tx_polarity_flip_fabric311.BCM8892X": "0", - "phy_tx_polarity_flip_fabric312.BCM8892X": "0", - "phy_tx_polarity_flip_fabric313.BCM8892X": "1", + "phy_tx_polarity_flip_fabric312.BCM8892X": "1", + "phy_tx_polarity_flip_fabric313.BCM8892X": "0", "phy_tx_polarity_flip_fabric314.BCM8892X": "0", "phy_tx_polarity_flip_fabric315.BCM8892X": "1", - "phy_tx_polarity_flip_fabric316.BCM8892X": "0", - "phy_tx_polarity_flip_fabric317.BCM8892X": "1", + "phy_tx_polarity_flip_fabric316.BCM8892X": "1", + "phy_tx_polarity_flip_fabric317.BCM8892X": "0", "phy_tx_polarity_flip_fabric318.BCM8892X": "0", "phy_tx_polarity_flip_fabric319.BCM8892X": "1", - "phy_tx_polarity_flip_fabric32.BCM8892X": "0", + "phy_tx_polarity_flip_fabric32.BCM8892X": "1", "phy_tx_polarity_flip_fabric320.BCM8892X": "0", "phy_tx_polarity_flip_fabric321.BCM8892X": "1", - "phy_tx_polarity_flip_fabric322.BCM8892X": "1", - "phy_tx_polarity_flip_fabric323.BCM8892X": "1", + "phy_tx_polarity_flip_fabric322.BCM8892X": "0", + "phy_tx_polarity_flip_fabric323.BCM8892X": "0", "phy_tx_polarity_flip_fabric324.BCM8892X": "0", "phy_tx_polarity_flip_fabric325.BCM8892X": "1", - "phy_tx_polarity_flip_fabric326.BCM8892X": "1", - "phy_tx_polarity_flip_fabric327.BCM8892X": "1", + "phy_tx_polarity_flip_fabric326.BCM8892X": "0", + "phy_tx_polarity_flip_fabric327.BCM8892X": "0", "phy_tx_polarity_flip_fabric328.BCM8892X": "1", "phy_tx_polarity_flip_fabric329.BCM8892X": "0", - "phy_tx_polarity_flip_fabric33.BCM8892X": "1", + "phy_tx_polarity_flip_fabric33.BCM8892X": "0", "phy_tx_polarity_flip_fabric330.BCM8892X": "1", - "phy_tx_polarity_flip_fabric331.BCM8892X": "1", + "phy_tx_polarity_flip_fabric331.BCM8892X": "0", "phy_tx_polarity_flip_fabric332.BCM8892X": "1", "phy_tx_polarity_flip_fabric333.BCM8892X": "0", "phy_tx_polarity_flip_fabric334.BCM8892X": "1", - "phy_tx_polarity_flip_fabric335.BCM8892X": "1", + "phy_tx_polarity_flip_fabric335.BCM8892X": "0", "phy_tx_polarity_flip_fabric336.BCM8892X": "0", "phy_tx_polarity_flip_fabric337.BCM8892X": "1", - "phy_tx_polarity_flip_fabric338.BCM8892X": "1", - "phy_tx_polarity_flip_fabric339.BCM8892X": "1", + "phy_tx_polarity_flip_fabric338.BCM8892X": "0", + "phy_tx_polarity_flip_fabric339.BCM8892X": "0", "phy_tx_polarity_flip_fabric34.BCM8892X": "0", "phy_tx_polarity_flip_fabric340.BCM8892X": "0", "phy_tx_polarity_flip_fabric341.BCM8892X": "1", - "phy_tx_polarity_flip_fabric342.BCM8892X": "1", - "phy_tx_polarity_flip_fabric343.BCM8892X": "1", + "phy_tx_polarity_flip_fabric342.BCM8892X": "0", + "phy_tx_polarity_flip_fabric343.BCM8892X": "0", "phy_tx_polarity_flip_fabric344.BCM8892X": "1", "phy_tx_polarity_flip_fabric345.BCM8892X": "0", "phy_tx_polarity_flip_fabric346.BCM8892X": "1", - "phy_tx_polarity_flip_fabric347.BCM8892X": "1", + "phy_tx_polarity_flip_fabric347.BCM8892X": "0", "phy_tx_polarity_flip_fabric348.BCM8892X": "1", "phy_tx_polarity_flip_fabric349.BCM8892X": "0", "phy_tx_polarity_flip_fabric35.BCM8892X": "1", "phy_tx_polarity_flip_fabric350.BCM8892X": "1", - "phy_tx_polarity_flip_fabric351.BCM8892X": "1", + "phy_tx_polarity_flip_fabric351.BCM8892X": "0", "phy_tx_polarity_flip_fabric352.BCM8892X": "0", "phy_tx_polarity_flip_fabric353.BCM8892X": "1", - "phy_tx_polarity_flip_fabric354.BCM8892X": "1", - "phy_tx_polarity_flip_fabric355.BCM8892X": "1", + "phy_tx_polarity_flip_fabric354.BCM8892X": "0", + "phy_tx_polarity_flip_fabric355.BCM8892X": "0", "phy_tx_polarity_flip_fabric356.BCM8892X": "0", "phy_tx_polarity_flip_fabric357.BCM8892X": "1", - "phy_tx_polarity_flip_fabric358.BCM8892X": "1", - "phy_tx_polarity_flip_fabric359.BCM8892X": "1", - "phy_tx_polarity_flip_fabric36.BCM8892X": "0", + "phy_tx_polarity_flip_fabric358.BCM8892X": "0", + "phy_tx_polarity_flip_fabric359.BCM8892X": "0", + "phy_tx_polarity_flip_fabric36.BCM8892X": "1", "phy_tx_polarity_flip_fabric360.BCM8892X": "0", "phy_tx_polarity_flip_fabric361.BCM8892X": "0", "phy_tx_polarity_flip_fabric362.BCM8892X": "1", - "phy_tx_polarity_flip_fabric363.BCM8892X": "1", + "phy_tx_polarity_flip_fabric363.BCM8892X": "0", "phy_tx_polarity_flip_fabric364.BCM8892X": "0", "phy_tx_polarity_flip_fabric365.BCM8892X": "1", "phy_tx_polarity_flip_fabric366.BCM8892X": "0", - "phy_tx_polarity_flip_fabric367.BCM8892X": "0", + "phy_tx_polarity_flip_fabric367.BCM8892X": "1", "phy_tx_polarity_flip_fabric368.BCM8892X": "0", "phy_tx_polarity_flip_fabric369.BCM8892X": "1", - "phy_tx_polarity_flip_fabric37.BCM8892X": "1", + "phy_tx_polarity_flip_fabric37.BCM8892X": "0", "phy_tx_polarity_flip_fabric370.BCM8892X": "1", "phy_tx_polarity_flip_fabric371.BCM8892X": "0", "phy_tx_polarity_flip_fabric372.BCM8892X": "1", @@ -3098,112 +3103,112 @@ "phy_tx_polarity_flip_fabric398.BCM8892X": "1", "phy_tx_polarity_flip_fabric399.BCM8892X": "0", "phy_tx_polarity_flip_fabric4.BCM8892X": "1", - "phy_tx_polarity_flip_fabric40.BCM8892X": "1", + "phy_tx_polarity_flip_fabric40.BCM8892X": "0", "phy_tx_polarity_flip_fabric400.BCM8892X": "0", "phy_tx_polarity_flip_fabric401.BCM8892X": "1", "phy_tx_polarity_flip_fabric402.BCM8892X": "1", "phy_tx_polarity_flip_fabric403.BCM8892X": "1", - "phy_tx_polarity_flip_fabric404.BCM8892X": "1", + "phy_tx_polarity_flip_fabric404.BCM8892X": "0", "phy_tx_polarity_flip_fabric405.BCM8892X": "0", "phy_tx_polarity_flip_fabric406.BCM8892X": "0", "phy_tx_polarity_flip_fabric407.BCM8892X": "1", - "phy_tx_polarity_flip_fabric408.BCM8892X": "0", - "phy_tx_polarity_flip_fabric409.BCM8892X": "1", - "phy_tx_polarity_flip_fabric41.BCM8892X": "0", + "phy_tx_polarity_flip_fabric408.BCM8892X": "1", + "phy_tx_polarity_flip_fabric409.BCM8892X": "0", + "phy_tx_polarity_flip_fabric41.BCM8892X": "1", "phy_tx_polarity_flip_fabric410.BCM8892X": "0", "phy_tx_polarity_flip_fabric411.BCM8892X": "0", - "phy_tx_polarity_flip_fabric412.BCM8892X": "0", - "phy_tx_polarity_flip_fabric413.BCM8892X": "1", + "phy_tx_polarity_flip_fabric412.BCM8892X": "1", + "phy_tx_polarity_flip_fabric413.BCM8892X": "0", "phy_tx_polarity_flip_fabric414.BCM8892X": "0", "phy_tx_polarity_flip_fabric415.BCM8892X": "0", - "phy_tx_polarity_flip_fabric416.BCM8892X": "1", + "phy_tx_polarity_flip_fabric416.BCM8892X": "0", "phy_tx_polarity_flip_fabric417.BCM8892X": "0", "phy_tx_polarity_flip_fabric418.BCM8892X": "0", "phy_tx_polarity_flip_fabric419.BCM8892X": "0", "phy_tx_polarity_flip_fabric42.BCM8892X": "1", - "phy_tx_polarity_flip_fabric420.BCM8892X": "1", + "phy_tx_polarity_flip_fabric420.BCM8892X": "0", "phy_tx_polarity_flip_fabric421.BCM8892X": "0", "phy_tx_polarity_flip_fabric422.BCM8892X": "0", "phy_tx_polarity_flip_fabric423.BCM8892X": "0", - "phy_tx_polarity_flip_fabric424.BCM8892X": "0", - "phy_tx_polarity_flip_fabric425.BCM8892X": "1", + "phy_tx_polarity_flip_fabric424.BCM8892X": "1", + "phy_tx_polarity_flip_fabric425.BCM8892X": "0", "phy_tx_polarity_flip_fabric426.BCM8892X": "0", "phy_tx_polarity_flip_fabric427.BCM8892X": "0", - "phy_tx_polarity_flip_fabric428.BCM8892X": "0", - "phy_tx_polarity_flip_fabric429.BCM8892X": "1", + "phy_tx_polarity_flip_fabric428.BCM8892X": "1", + "phy_tx_polarity_flip_fabric429.BCM8892X": "0", "phy_tx_polarity_flip_fabric43.BCM8892X": "0", "phy_tx_polarity_flip_fabric430.BCM8892X": "0", "phy_tx_polarity_flip_fabric431.BCM8892X": "0", - "phy_tx_polarity_flip_fabric432.BCM8892X": "1", + "phy_tx_polarity_flip_fabric432.BCM8892X": "0", "phy_tx_polarity_flip_fabric433.BCM8892X": "0", "phy_tx_polarity_flip_fabric434.BCM8892X": "0", "phy_tx_polarity_flip_fabric435.BCM8892X": "0", - "phy_tx_polarity_flip_fabric436.BCM8892X": "1", + "phy_tx_polarity_flip_fabric436.BCM8892X": "0", "phy_tx_polarity_flip_fabric437.BCM8892X": "0", "phy_tx_polarity_flip_fabric438.BCM8892X": "0", "phy_tx_polarity_flip_fabric439.BCM8892X": "0", - "phy_tx_polarity_flip_fabric44.BCM8892X": "1", - "phy_tx_polarity_flip_fabric440.BCM8892X": "0", - "phy_tx_polarity_flip_fabric441.BCM8892X": "1", + "phy_tx_polarity_flip_fabric44.BCM8892X": "0", + "phy_tx_polarity_flip_fabric440.BCM8892X": "1", + "phy_tx_polarity_flip_fabric441.BCM8892X": "0", "phy_tx_polarity_flip_fabric442.BCM8892X": "0", "phy_tx_polarity_flip_fabric443.BCM8892X": "0", - "phy_tx_polarity_flip_fabric444.BCM8892X": "0", - "phy_tx_polarity_flip_fabric445.BCM8892X": "1", + "phy_tx_polarity_flip_fabric444.BCM8892X": "1", + "phy_tx_polarity_flip_fabric445.BCM8892X": "0", "phy_tx_polarity_flip_fabric446.BCM8892X": "0", "phy_tx_polarity_flip_fabric447.BCM8892X": "0", "phy_tx_polarity_flip_fabric448.BCM8892X": "0", "phy_tx_polarity_flip_fabric449.BCM8892X": "1", - "phy_tx_polarity_flip_fabric45.BCM8892X": "0", - "phy_tx_polarity_flip_fabric450.BCM8892X": "0", - "phy_tx_polarity_flip_fabric451.BCM8892X": "1", + "phy_tx_polarity_flip_fabric45.BCM8892X": "1", + "phy_tx_polarity_flip_fabric450.BCM8892X": "1", + "phy_tx_polarity_flip_fabric451.BCM8892X": "0", "phy_tx_polarity_flip_fabric452.BCM8892X": "0", "phy_tx_polarity_flip_fabric453.BCM8892X": "1", - "phy_tx_polarity_flip_fabric454.BCM8892X": "0", - "phy_tx_polarity_flip_fabric455.BCM8892X": "1", + "phy_tx_polarity_flip_fabric454.BCM8892X": "1", + "phy_tx_polarity_flip_fabric455.BCM8892X": "0", "phy_tx_polarity_flip_fabric456.BCM8892X": "1", "phy_tx_polarity_flip_fabric457.BCM8892X": "0", - "phy_tx_polarity_flip_fabric458.BCM8892X": "1", - "phy_tx_polarity_flip_fabric459.BCM8892X": "0", + "phy_tx_polarity_flip_fabric458.BCM8892X": "0", + "phy_tx_polarity_flip_fabric459.BCM8892X": "1", "phy_tx_polarity_flip_fabric46.BCM8892X": "1", "phy_tx_polarity_flip_fabric460.BCM8892X": "1", "phy_tx_polarity_flip_fabric461.BCM8892X": "0", - "phy_tx_polarity_flip_fabric462.BCM8892X": "1", - "phy_tx_polarity_flip_fabric463.BCM8892X": "0", + "phy_tx_polarity_flip_fabric462.BCM8892X": "0", + "phy_tx_polarity_flip_fabric463.BCM8892X": "1", "phy_tx_polarity_flip_fabric464.BCM8892X": "0", "phy_tx_polarity_flip_fabric465.BCM8892X": "1", - "phy_tx_polarity_flip_fabric466.BCM8892X": "0", - "phy_tx_polarity_flip_fabric467.BCM8892X": "1", + "phy_tx_polarity_flip_fabric466.BCM8892X": "1", + "phy_tx_polarity_flip_fabric467.BCM8892X": "0", "phy_tx_polarity_flip_fabric468.BCM8892X": "0", "phy_tx_polarity_flip_fabric469.BCM8892X": "1", "phy_tx_polarity_flip_fabric47.BCM8892X": "0", - "phy_tx_polarity_flip_fabric470.BCM8892X": "0", - "phy_tx_polarity_flip_fabric471.BCM8892X": "1", + "phy_tx_polarity_flip_fabric470.BCM8892X": "1", + "phy_tx_polarity_flip_fabric471.BCM8892X": "0", "phy_tx_polarity_flip_fabric472.BCM8892X": "1", "phy_tx_polarity_flip_fabric473.BCM8892X": "0", - "phy_tx_polarity_flip_fabric474.BCM8892X": "1", - "phy_tx_polarity_flip_fabric475.BCM8892X": "0", + "phy_tx_polarity_flip_fabric474.BCM8892X": "0", + "phy_tx_polarity_flip_fabric475.BCM8892X": "1", "phy_tx_polarity_flip_fabric476.BCM8892X": "1", "phy_tx_polarity_flip_fabric477.BCM8892X": "0", - "phy_tx_polarity_flip_fabric478.BCM8892X": "1", - "phy_tx_polarity_flip_fabric479.BCM8892X": "0", - "phy_tx_polarity_flip_fabric48.BCM8892X": "0", + "phy_tx_polarity_flip_fabric478.BCM8892X": "0", + "phy_tx_polarity_flip_fabric479.BCM8892X": "1", + "phy_tx_polarity_flip_fabric48.BCM8892X": "1", "phy_tx_polarity_flip_fabric480.BCM8892X": "0", "phy_tx_polarity_flip_fabric481.BCM8892X": "1", - "phy_tx_polarity_flip_fabric482.BCM8892X": "0", - "phy_tx_polarity_flip_fabric483.BCM8892X": "1", + "phy_tx_polarity_flip_fabric482.BCM8892X": "1", + "phy_tx_polarity_flip_fabric483.BCM8892X": "0", "phy_tx_polarity_flip_fabric484.BCM8892X": "0", "phy_tx_polarity_flip_fabric485.BCM8892X": "1", - "phy_tx_polarity_flip_fabric486.BCM8892X": "0", - "phy_tx_polarity_flip_fabric487.BCM8892X": "1", + "phy_tx_polarity_flip_fabric486.BCM8892X": "1", + "phy_tx_polarity_flip_fabric487.BCM8892X": "0", "phy_tx_polarity_flip_fabric488.BCM8892X": "0", "phy_tx_polarity_flip_fabric489.BCM8892X": "0", - "phy_tx_polarity_flip_fabric49.BCM8892X": "1", - "phy_tx_polarity_flip_fabric490.BCM8892X": "1", - "phy_tx_polarity_flip_fabric491.BCM8892X": "0", + "phy_tx_polarity_flip_fabric49.BCM8892X": "0", + "phy_tx_polarity_flip_fabric490.BCM8892X": "0", + "phy_tx_polarity_flip_fabric491.BCM8892X": "1", "phy_tx_polarity_flip_fabric492.BCM8892X": "0", "phy_tx_polarity_flip_fabric493.BCM8892X": "1", "phy_tx_polarity_flip_fabric494.BCM8892X": "1", - "phy_tx_polarity_flip_fabric495.BCM8892X": "0", + "phy_tx_polarity_flip_fabric495.BCM8892X": "1", "phy_tx_polarity_flip_fabric496.BCM8892X": "0", "phy_tx_polarity_flip_fabric497.BCM8892X": "1", "phy_tx_polarity_flip_fabric498.BCM8892X": "1", @@ -3223,58 +3228,58 @@ "phy_tx_polarity_flip_fabric51.BCM8892X": "1", "phy_tx_polarity_flip_fabric510.BCM8892X": "1", "phy_tx_polarity_flip_fabric511.BCM8892X": "0", - "phy_tx_polarity_flip_fabric52.BCM8892X": "0", - "phy_tx_polarity_flip_fabric53.BCM8892X": "1", + "phy_tx_polarity_flip_fabric52.BCM8892X": "1", + "phy_tx_polarity_flip_fabric53.BCM8892X": "0", "phy_tx_polarity_flip_fabric54.BCM8892X": "0", "phy_tx_polarity_flip_fabric55.BCM8892X": "1", - "phy_tx_polarity_flip_fabric56.BCM8892X": "1", - "phy_tx_polarity_flip_fabric57.BCM8892X": "0", + "phy_tx_polarity_flip_fabric56.BCM8892X": "0", + "phy_tx_polarity_flip_fabric57.BCM8892X": "1", "phy_tx_polarity_flip_fabric58.BCM8892X": "1", "phy_tx_polarity_flip_fabric59.BCM8892X": "0", "phy_tx_polarity_flip_fabric6.BCM8892X": "0", - "phy_tx_polarity_flip_fabric60.BCM8892X": "1", - "phy_tx_polarity_flip_fabric61.BCM8892X": "0", + "phy_tx_polarity_flip_fabric60.BCM8892X": "0", + "phy_tx_polarity_flip_fabric61.BCM8892X": "1", "phy_tx_polarity_flip_fabric62.BCM8892X": "1", "phy_tx_polarity_flip_fabric63.BCM8892X": "0", "phy_tx_polarity_flip_fabric64.BCM8892X": "1", "phy_tx_polarity_flip_fabric65.BCM8892X": "1", - "phy_tx_polarity_flip_fabric66.BCM8892X": "0", - "phy_tx_polarity_flip_fabric67.BCM8892X": "0", + "phy_tx_polarity_flip_fabric66.BCM8892X": "1", + "phy_tx_polarity_flip_fabric67.BCM8892X": "1", "phy_tx_polarity_flip_fabric68.BCM8892X": "1", "phy_tx_polarity_flip_fabric69.BCM8892X": "1", "phy_tx_polarity_flip_fabric7.BCM8892X": "1", - "phy_tx_polarity_flip_fabric70.BCM8892X": "0", - "phy_tx_polarity_flip_fabric71.BCM8892X": "0", + "phy_tx_polarity_flip_fabric70.BCM8892X": "1", + "phy_tx_polarity_flip_fabric71.BCM8892X": "1", "phy_tx_polarity_flip_fabric72.BCM8892X": "0", "phy_tx_polarity_flip_fabric73.BCM8892X": "1", "phy_tx_polarity_flip_fabric74.BCM8892X": "1", - "phy_tx_polarity_flip_fabric75.BCM8892X": "0", + "phy_tx_polarity_flip_fabric75.BCM8892X": "1", "phy_tx_polarity_flip_fabric76.BCM8892X": "0", "phy_tx_polarity_flip_fabric77.BCM8892X": "1", "phy_tx_polarity_flip_fabric78.BCM8892X": "1", - "phy_tx_polarity_flip_fabric79.BCM8892X": "0", + "phy_tx_polarity_flip_fabric79.BCM8892X": "1", "phy_tx_polarity_flip_fabric8.BCM8892X": "0", "phy_tx_polarity_flip_fabric80.BCM8892X": "1", "phy_tx_polarity_flip_fabric81.BCM8892X": "1", - "phy_tx_polarity_flip_fabric82.BCM8892X": "0", - "phy_tx_polarity_flip_fabric83.BCM8892X": "0", + "phy_tx_polarity_flip_fabric82.BCM8892X": "1", + "phy_tx_polarity_flip_fabric83.BCM8892X": "1", "phy_tx_polarity_flip_fabric84.BCM8892X": "1", "phy_tx_polarity_flip_fabric85.BCM8892X": "1", - "phy_tx_polarity_flip_fabric86.BCM8892X": "0", - "phy_tx_polarity_flip_fabric87.BCM8892X": "0", + "phy_tx_polarity_flip_fabric86.BCM8892X": "1", + "phy_tx_polarity_flip_fabric87.BCM8892X": "1", "phy_tx_polarity_flip_fabric88.BCM8892X": "0", "phy_tx_polarity_flip_fabric89.BCM8892X": "1", "phy_tx_polarity_flip_fabric9.BCM8892X": "1", "phy_tx_polarity_flip_fabric90.BCM8892X": "1", - "phy_tx_polarity_flip_fabric91.BCM8892X": "0", + "phy_tx_polarity_flip_fabric91.BCM8892X": "1", "phy_tx_polarity_flip_fabric92.BCM8892X": "0", "phy_tx_polarity_flip_fabric93.BCM8892X": "1", "phy_tx_polarity_flip_fabric94.BCM8892X": "1", - "phy_tx_polarity_flip_fabric95.BCM8892X": "0", + "phy_tx_polarity_flip_fabric95.BCM8892X": "1", "phy_tx_polarity_flip_fabric96.BCM8892X": "1", "phy_tx_polarity_flip_fabric97.BCM8892X": "1", - "phy_tx_polarity_flip_fabric98.BCM8892X": "0", - "phy_tx_polarity_flip_fabric99.BCM8892X": "0" + "phy_tx_polarity_flip_fabric98.BCM8892X": "1", + "phy_tx_polarity_flip_fabric99.BCM8892X": "1" } } } diff --git a/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON b/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON index 8021f69aa51ca..c568370902915 100644 --- a/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/meru800bia.agent.materialized_JSON @@ -1,10 +1,13 @@ { "defaultCommandLineArgs": { "check_wb_handles": "true", + "classid_for_unresolved_routes": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "intf_nbr_tables": "true", "log_variable_name": "true", "sai_configure_six_tap": "true", + "set_classid_for_my_subnet_and_ip_routes": "true", "skip_transceiver_programming": "true" }, "sw": { @@ -57,7 +60,7 @@ "isVirtual": false, "isStateSyncDisabled": true, "type": 2, - "scope": 1 + "scope": 0 } ], "arpTimeoutSeconds": 60, @@ -86,6 +89,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -142,7 +146,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -157,10 +161,21 @@ }, "systemPortRange": { "minimum": 10, - "maximum": 54 + "maximum": 53 }, "switchMac": "02:00:00:00:00:01", - "connectionHandle": "15:00" + "connectionHandle": "15:00", + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 53 + } + ] + }, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "inbandPortId": 1 } }, "vendorMacOuis": [ @@ -171,6 +186,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { "0": { "name": "intfNode0", @@ -181,11 +222,22 @@ ], "systemPortRange": { "minimum": 10, - "maximum": 54 + "maximum": 53 }, "nodeMac": "02:00:00:00:0F:0B", "asicType": 14, - "platformType": 28 + "platformType": 28, + "localSystemPortOffset": 10, + "globalSystemPortOffset": 10, + "systemPortRanges": { + "systemPortRanges": [ + { + "minimum": 10, + "maximum": 53 + } + ] + }, + "inbandPortId": 1 } }, "defaultVoqConfig": [ @@ -208,6 +260,7 @@ "custom_feature_statdma_enable": "0", "custom_feature_use_new_access.BCM8889X": "1", "custom_feature_use_new_access.BCM8889X_ADAPTER": "1", + "custom_feature_vsqd_lossless_reject_enable": "1", "dpp_db_path": "/tmp/db", "dram_temperature_monitor_enable.BCM8889X_ADAPTER": "0", "dtm_flow_mapping_mode_region_65.BCM8889X": "3", @@ -245,6 +298,9 @@ "fabric_connectivity_based_on_integrity": "0", "fabric_distributed_system_enable": "1", "fail_on_unsupported_attribute": "1", + "fw_auto_isolation_arm_core_to_use.0": "5", + "fw_auto_isolation_image_filename.0": "/tmp/db/jericho3ai_a0/BCM8889X_fi.elf", + "fw_auto_isolation_log_filename.0": "/tmp/edk_fi.log", "l3_ecmp_max_group_size": "512", "lane_to_serdes_map_fabric_lane0.BCM8889X": "rx0:tx5", "lane_to_serdes_map_fabric_lane1.BCM8889X": "rx1:tx3", @@ -1197,8 +1253,10 @@ "port_init_speed_cd.BCM8889X": "400000", "port_init_speed_ce.BCM8889X": "100000", "port_init_speed_d3c.BCM8889X": "800000", + "port_init_speed_eventor.BCM8889X": "100000", "port_init_speed_fabric.BCM8889X": "106250", "port_init_speed_le.BCM8889X": "50000", + "port_init_speed_rcy.BCM8889X": "100000", "port_init_speed_sat.BCM8889X": "400000", "port_init_speed_xe.BCM8889X": "25000", "port_init_speed_xe13.BCM8889X": "10000", @@ -1252,6 +1310,7 @@ "sai_l3_max_ecmp_paths": "512", "sai_macro_flow_based_hash": "1", "sai_mmu_qgroups_default": "1", + "sai_ocb_fc_config": "2", "sai_optimize_acl_ipv6_addr_qual": "0", "sai_optimized_mmu": "0x1", "sai_pfc_defaults_disable": "0x1", @@ -1259,7 +1318,8 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_tc_mirror_buffer_size_bytes": "1", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_uncached_port_stats": "0x1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", diff --git a/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON b/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON index d9614579b2c63..6fdf5802b9a2e 100644 --- a/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/minipack.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -270,10 +298,12 @@ "dport_map_port_94": "113", "dport_map_port_95": "114", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON b/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON index df35fbd5cb223..b04b48951c219 100644 --- a/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/montblanc.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "sai_configure_six_tap": "true", "skip_transceiver_programming": "true" @@ -47,6 +48,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -102,7 +104,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -125,6 +127,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -136,7 +164,7 @@ "chip": { "asicConfig": { "common": { - "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x8C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x33\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x52701634\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74305612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21640357\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03562147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x29\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14567302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67315024\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217034\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x53\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65274130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x87\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47306521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03762514\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x03\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67125403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12470356\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x63\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x05371426\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56741032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46751032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32106754\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54721036\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63410725\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x93\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x77\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74260351\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13064257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x21\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01736524\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x96\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01746523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x86\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10576423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46357102\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54216703\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x54\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x20\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x64207531\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23671045\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0B\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xBB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51740362\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB1\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x66\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 65\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x3210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x3210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0F\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 9\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 10\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 11\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 15\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 26\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 30\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 31\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 33\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 42\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 44\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 48\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 59\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 63\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 64\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 66\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 77\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 81\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 96\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 97\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 99\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 110\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 114\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 118\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 129\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 130\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 132\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 147\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 151\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 152\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 162\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 163\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 165\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 169\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 257\n ?\n PORT_ID: 180\n :\n PC_PHYS_PORT_ID: 261\n ?\n PORT_ID: 184\n :\n PC_PHYS_PORT_ID: 265\n ?\n PORT_ID: 185\n :\n PC_PHYS_PORT_ID: 269\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 273\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 277\n ?\n PORT_ID: 195\n :\n PC_PHYS_PORT_ID: 281\n ?\n PORT_ID: 196\n :\n PC_PHYS_PORT_ID: 285\n ?\n PORT_ID: 198\n :\n PC_PHYS_PORT_ID: 289\n ?\n PORT_ID: 202\n :\n PC_PHYS_PORT_ID: 293\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 297\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 301\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 305\n ?\n PORT_ID: 213\n :\n PC_PHYS_PORT_ID: 309\n ?\n PORT_ID: 217\n :\n PC_PHYS_PORT_ID: 313\n ?\n PORT_ID: 218\n :\n PC_PHYS_PORT_ID: 317\n ?\n PORT_ID: 220\n :\n PC_PHYS_PORT_ID: 321\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 325\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 329\n ?\n PORT_ID: 229\n :\n PC_PHYS_PORT_ID: 333\n ?\n PORT_ID: 231\n :\n PC_PHYS_PORT_ID: 337\n ?\n PORT_ID: 235\n :\n PC_PHYS_PORT_ID: 341\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 345\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 349\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 353\n ?\n PORT_ID: 246\n :\n PC_PHYS_PORT_ID: 357\n ?\n PORT_ID: 250\n :\n PC_PHYS_PORT_ID: 361\n ?\n PORT_ID: 251\n :\n PC_PHYS_PORT_ID: 365\n ?\n PORT_ID: 253\n :\n PC_PHYS_PORT_ID: 369\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 373\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 377\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 381\n ?\n PORT_ID: 264\n :\n PC_PHYS_PORT_ID: 385\n ?\n PORT_ID: 268\n :\n PC_PHYS_PORT_ID: 389\n ?\n PORT_ID: 272\n :\n PC_PHYS_PORT_ID: 393\n ?\n PORT_ID: 273\n :\n PC_PHYS_PORT_ID: 397\n ?\n PORT_ID: 275\n :\n PC_PHYS_PORT_ID: 401\n ?\n PORT_ID: 279\n :\n PC_PHYS_PORT_ID: 405\n ?\n PORT_ID: 283\n :\n PC_PHYS_PORT_ID: 409\n ?\n PORT_ID: 284\n :\n PC_PHYS_PORT_ID: 413\n ?\n PORT_ID: 286\n :\n PC_PHYS_PORT_ID: 417\n ?\n PORT_ID: 290\n :\n PC_PHYS_PORT_ID: 421\n ?\n PORT_ID: 294\n :\n PC_PHYS_PORT_ID: 425\n ?\n PORT_ID: 295\n :\n PC_PHYS_PORT_ID: 429\n ?\n PORT_ID: 297\n :\n PC_PHYS_PORT_ID: 433\n ?\n PORT_ID: 301\n :\n PC_PHYS_PORT_ID: 437\n ?\n PORT_ID: 305\n :\n PC_PHYS_PORT_ID: 441\n ?\n PORT_ID: 306\n :\n PC_PHYS_PORT_ID: 445\n ?\n PORT_ID: 308\n :\n PC_PHYS_PORT_ID: 449\n ?\n PORT_ID: 312\n :\n PC_PHYS_PORT_ID: 453\n ?\n PORT_ID: 316\n :\n PC_PHYS_PORT_ID: 457\n ?\n PORT_ID: 317\n :\n PC_PHYS_PORT_ID: 461\n ?\n PORT_ID: 319\n :\n PC_PHYS_PORT_ID: 465\n ?\n PORT_ID: 323\n :\n PC_PHYS_PORT_ID: 469\n ?\n PORT_ID: 327\n :\n PC_PHYS_PORT_ID: 473\n ?\n PORT_ID: 328\n :\n PC_PHYS_PORT_ID: 477\n ?\n PORT_ID: 330\n :\n PC_PHYS_PORT_ID: 481\n ?\n PORT_ID: 334\n :\n PC_PHYS_PORT_ID: 485\n ?\n PORT_ID: 338\n :\n PC_PHYS_PORT_ID: 489\n ?\n PORT_ID: 339\n :\n PC_PHYS_PORT_ID: 493\n ?\n PORT_ID: 341\n :\n PC_PHYS_PORT_ID: 497\n ?\n PORT_ID: 345\n :\n PC_PHYS_PORT_ID: 501\n ?\n PORT_ID: 349\n :\n PC_PHYS_PORT_ID: 505\n ?\n PORT_ID: 350\n :\n PC_PHYS_PORT_ID: 509\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 76\n :\n PC_PHYS_PORT_ID: 513\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n ENABLE: 0\n SPEED: 400000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n ?\n PORT_ID: 76\n :\n ENABLE: 0\n SPEED: 100000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS528\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n sai_uncached_port_stats: 0x1\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n DEVICE_CONFIG:\n AUTOLOAD_BOARD_SETTINGS: 0\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n" + "yamlConfig": "---\ndevice:\n 0:\n PC_PM_CORE:\n ?\n PC_PM_ID: 1\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x8C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 2\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x55\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 3\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x33\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 4\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x52701634\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAA\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 5\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74305612\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21640357\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF7\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x59\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 6\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03562147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x29\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 7\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x14567302\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 8\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67315024\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217034\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x53\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 9\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 10\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 11\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 12\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 13\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x21403765\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20543176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x48\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 14\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x53062147\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30742165\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x48\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x69\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 15\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54067312\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56712430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xAF\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 16\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65304721\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56217430\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDD\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x56\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 17\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x65274130\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x87\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 18\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47306521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 19\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 20\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 21\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 22\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 23\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x02731456\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x99\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x07\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 24\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x30472165\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21543076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x6C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAD\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 25\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x45376120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56207431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA7\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 26\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x40376521\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x76305412\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x3C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x86\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 27\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x03762514\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21345076\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xDE\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x03\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 28\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x67125403\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x12470356\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x63\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xB2\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 29\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 30\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107654\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xCC\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x00\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 31\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x05371426\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x65\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 32\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x56741032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x9C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xFF\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 33\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46751032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32106754\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x55\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 34\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54721036\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x22\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 35\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x63410725\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x93\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 36\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32107645\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x77\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xCC\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 37\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x74260351\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x13064257\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD8\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x21\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 38\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x99\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 39\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 40\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 41\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01736524\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x96\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 42\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10573246\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 43\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x47356120\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 44\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54217630\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x58\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 45\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01746523\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20365174\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x86\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x52\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 46\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x10576423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x30762145\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC6\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xD9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 47\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x46357102\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x56702431\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x2D\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x8F\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 48\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75016423\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54216703\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xC9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x54\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 49\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 50\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 51\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 52\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 53\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 54\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 55\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x60\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 56\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x01572346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x21560347\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0C\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xA9\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 57\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x57032146\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54702631\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xED\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 58\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x75102346\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x74305612\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xF3\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 59\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x32610754\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x20345176\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x95\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x20\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 60\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x64207531\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23671045\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x0B\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xBB\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 61\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x51740362\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xB1\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 62\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x23016745\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x54761032\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x66\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 63\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x32107654\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x66\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 64\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x54761032\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x23016745\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0xD9\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0xAA\n TX_POLARITY_FLIP_AUTO: 0\n ?\n PC_PM_ID: 65\n CORE_INDEX: 0\n :\n RX_LANE_MAP: 0x3210\n RX_LANE_MAP_AUTO: 0\n TX_LANE_MAP: 0x3210\n TX_LANE_MAP_AUTO: 0\n RX_POLARITY_FLIP: 0x00\n RX_POLARITY_FLIP_AUTO: 0\n TX_POLARITY_FLIP: 0x0F\n TX_POLARITY_FLIP_AUTO: 0\n...\n---\ndevice:\n 0:\n PC_PORT_PHYS_MAP:\n ?\n PORT_ID: 1\n :\n PC_PHYS_PORT_ID: 1\n ?\n PORT_ID: 5\n :\n PC_PHYS_PORT_ID: 5\n ?\n PORT_ID: 9\n :\n PC_PHYS_PORT_ID: 9\n ?\n PORT_ID: 10\n :\n PC_PHYS_PORT_ID: 13\n ?\n PORT_ID: 11\n :\n PC_PHYS_PORT_ID: 17\n ?\n PORT_ID: 15\n :\n PC_PHYS_PORT_ID: 21\n ?\n PORT_ID: 19\n :\n PC_PHYS_PORT_ID: 25\n ?\n PORT_ID: 20\n :\n PC_PHYS_PORT_ID: 29\n ?\n PORT_ID: 22\n :\n PC_PHYS_PORT_ID: 33\n ?\n PORT_ID: 26\n :\n PC_PHYS_PORT_ID: 37\n ?\n PORT_ID: 30\n :\n PC_PHYS_PORT_ID: 41\n ?\n PORT_ID: 31\n :\n PC_PHYS_PORT_ID: 45\n ?\n PORT_ID: 33\n :\n PC_PHYS_PORT_ID: 49\n ?\n PORT_ID: 37\n :\n PC_PHYS_PORT_ID: 53\n ?\n PORT_ID: 41\n :\n PC_PHYS_PORT_ID: 57\n ?\n PORT_ID: 42\n :\n PC_PHYS_PORT_ID: 61\n ?\n PORT_ID: 44\n :\n PC_PHYS_PORT_ID: 65\n ?\n PORT_ID: 48\n :\n PC_PHYS_PORT_ID: 69\n ?\n PORT_ID: 52\n :\n PC_PHYS_PORT_ID: 73\n ?\n PORT_ID: 53\n :\n PC_PHYS_PORT_ID: 77\n ?\n PORT_ID: 55\n :\n PC_PHYS_PORT_ID: 81\n ?\n PORT_ID: 59\n :\n PC_PHYS_PORT_ID: 85\n ?\n PORT_ID: 63\n :\n PC_PHYS_PORT_ID: 89\n ?\n PORT_ID: 64\n :\n PC_PHYS_PORT_ID: 93\n ?\n PORT_ID: 66\n :\n PC_PHYS_PORT_ID: 97\n ?\n PORT_ID: 70\n :\n PC_PHYS_PORT_ID: 101\n ?\n PORT_ID: 74\n :\n PC_PHYS_PORT_ID: 105\n ?\n PORT_ID: 75\n :\n PC_PHYS_PORT_ID: 109\n ?\n PORT_ID: 77\n :\n PC_PHYS_PORT_ID: 113\n ?\n PORT_ID: 81\n :\n PC_PHYS_PORT_ID: 117\n ?\n PORT_ID: 85\n :\n PC_PHYS_PORT_ID: 121\n ?\n PORT_ID: 86\n :\n PC_PHYS_PORT_ID: 125\n ?\n PORT_ID: 88\n :\n PC_PHYS_PORT_ID: 129\n ?\n PORT_ID: 92\n :\n PC_PHYS_PORT_ID: 133\n ?\n PORT_ID: 96\n :\n PC_PHYS_PORT_ID: 137\n ?\n PORT_ID: 97\n :\n PC_PHYS_PORT_ID: 141\n ?\n PORT_ID: 99\n :\n PC_PHYS_PORT_ID: 145\n ?\n PORT_ID: 103\n :\n PC_PHYS_PORT_ID: 149\n ?\n PORT_ID: 107\n :\n PC_PHYS_PORT_ID: 153\n ?\n PORT_ID: 108\n :\n PC_PHYS_PORT_ID: 157\n ?\n PORT_ID: 110\n :\n PC_PHYS_PORT_ID: 161\n ?\n PORT_ID: 114\n :\n PC_PHYS_PORT_ID: 165\n ?\n PORT_ID: 118\n :\n PC_PHYS_PORT_ID: 169\n ?\n PORT_ID: 119\n :\n PC_PHYS_PORT_ID: 173\n ?\n PORT_ID: 121\n :\n PC_PHYS_PORT_ID: 177\n ?\n PORT_ID: 125\n :\n PC_PHYS_PORT_ID: 181\n ?\n PORT_ID: 129\n :\n PC_PHYS_PORT_ID: 185\n ?\n PORT_ID: 130\n :\n PC_PHYS_PORT_ID: 189\n ?\n PORT_ID: 132\n :\n PC_PHYS_PORT_ID: 193\n ?\n PORT_ID: 136\n :\n PC_PHYS_PORT_ID: 197\n ?\n PORT_ID: 140\n :\n PC_PHYS_PORT_ID: 201\n ?\n PORT_ID: 141\n :\n PC_PHYS_PORT_ID: 205\n ?\n PORT_ID: 143\n :\n PC_PHYS_PORT_ID: 209\n ?\n PORT_ID: 147\n :\n PC_PHYS_PORT_ID: 213\n ?\n PORT_ID: 151\n :\n PC_PHYS_PORT_ID: 217\n ?\n PORT_ID: 152\n :\n PC_PHYS_PORT_ID: 221\n ?\n PORT_ID: 154\n :\n PC_PHYS_PORT_ID: 225\n ?\n PORT_ID: 158\n :\n PC_PHYS_PORT_ID: 229\n ?\n PORT_ID: 162\n :\n PC_PHYS_PORT_ID: 233\n ?\n PORT_ID: 163\n :\n PC_PHYS_PORT_ID: 237\n ?\n PORT_ID: 165\n :\n PC_PHYS_PORT_ID: 241\n ?\n PORT_ID: 169\n :\n PC_PHYS_PORT_ID: 245\n ?\n PORT_ID: 173\n :\n PC_PHYS_PORT_ID: 249\n ?\n PORT_ID: 174\n :\n PC_PHYS_PORT_ID: 253\n ?\n PORT_ID: 176\n :\n PC_PHYS_PORT_ID: 257\n ?\n PORT_ID: 180\n :\n PC_PHYS_PORT_ID: 261\n ?\n PORT_ID: 184\n :\n PC_PHYS_PORT_ID: 265\n ?\n PORT_ID: 185\n :\n PC_PHYS_PORT_ID: 269\n ?\n PORT_ID: 187\n :\n PC_PHYS_PORT_ID: 273\n ?\n PORT_ID: 191\n :\n PC_PHYS_PORT_ID: 277\n ?\n PORT_ID: 195\n :\n PC_PHYS_PORT_ID: 281\n ?\n PORT_ID: 196\n :\n PC_PHYS_PORT_ID: 285\n ?\n PORT_ID: 198\n :\n PC_PHYS_PORT_ID: 289\n ?\n PORT_ID: 202\n :\n PC_PHYS_PORT_ID: 293\n ?\n PORT_ID: 206\n :\n PC_PHYS_PORT_ID: 297\n ?\n PORT_ID: 207\n :\n PC_PHYS_PORT_ID: 301\n ?\n PORT_ID: 209\n :\n PC_PHYS_PORT_ID: 305\n ?\n PORT_ID: 213\n :\n PC_PHYS_PORT_ID: 309\n ?\n PORT_ID: 217\n :\n PC_PHYS_PORT_ID: 313\n ?\n PORT_ID: 218\n :\n PC_PHYS_PORT_ID: 317\n ?\n PORT_ID: 220\n :\n PC_PHYS_PORT_ID: 321\n ?\n PORT_ID: 224\n :\n PC_PHYS_PORT_ID: 325\n ?\n PORT_ID: 228\n :\n PC_PHYS_PORT_ID: 329\n ?\n PORT_ID: 229\n :\n PC_PHYS_PORT_ID: 333\n ?\n PORT_ID: 231\n :\n PC_PHYS_PORT_ID: 337\n ?\n PORT_ID: 235\n :\n PC_PHYS_PORT_ID: 341\n ?\n PORT_ID: 239\n :\n PC_PHYS_PORT_ID: 345\n ?\n PORT_ID: 240\n :\n PC_PHYS_PORT_ID: 349\n ?\n PORT_ID: 242\n :\n PC_PHYS_PORT_ID: 353\n ?\n PORT_ID: 246\n :\n PC_PHYS_PORT_ID: 357\n ?\n PORT_ID: 250\n :\n PC_PHYS_PORT_ID: 361\n ?\n PORT_ID: 251\n :\n PC_PHYS_PORT_ID: 365\n ?\n PORT_ID: 253\n :\n PC_PHYS_PORT_ID: 369\n ?\n PORT_ID: 257\n :\n PC_PHYS_PORT_ID: 373\n ?\n PORT_ID: 261\n :\n PC_PHYS_PORT_ID: 377\n ?\n PORT_ID: 262\n :\n PC_PHYS_PORT_ID: 381\n ?\n PORT_ID: 264\n :\n PC_PHYS_PORT_ID: 385\n ?\n PORT_ID: 268\n :\n PC_PHYS_PORT_ID: 389\n ?\n PORT_ID: 272\n :\n PC_PHYS_PORT_ID: 393\n ?\n PORT_ID: 273\n :\n PC_PHYS_PORT_ID: 397\n ?\n PORT_ID: 275\n :\n PC_PHYS_PORT_ID: 401\n ?\n PORT_ID: 279\n :\n PC_PHYS_PORT_ID: 405\n ?\n PORT_ID: 283\n :\n PC_PHYS_PORT_ID: 409\n ?\n PORT_ID: 284\n :\n PC_PHYS_PORT_ID: 413\n ?\n PORT_ID: 286\n :\n PC_PHYS_PORT_ID: 417\n ?\n PORT_ID: 290\n :\n PC_PHYS_PORT_ID: 421\n ?\n PORT_ID: 294\n :\n PC_PHYS_PORT_ID: 425\n ?\n PORT_ID: 295\n :\n PC_PHYS_PORT_ID: 429\n ?\n PORT_ID: 297\n :\n PC_PHYS_PORT_ID: 433\n ?\n PORT_ID: 301\n :\n PC_PHYS_PORT_ID: 437\n ?\n PORT_ID: 305\n :\n PC_PHYS_PORT_ID: 441\n ?\n PORT_ID: 306\n :\n PC_PHYS_PORT_ID: 445\n ?\n PORT_ID: 308\n :\n PC_PHYS_PORT_ID: 449\n ?\n PORT_ID: 312\n :\n PC_PHYS_PORT_ID: 453\n ?\n PORT_ID: 316\n :\n PC_PHYS_PORT_ID: 457\n ?\n PORT_ID: 317\n :\n PC_PHYS_PORT_ID: 461\n ?\n PORT_ID: 319\n :\n PC_PHYS_PORT_ID: 465\n ?\n PORT_ID: 323\n :\n PC_PHYS_PORT_ID: 469\n ?\n PORT_ID: 327\n :\n PC_PHYS_PORT_ID: 473\n ?\n PORT_ID: 328\n :\n PC_PHYS_PORT_ID: 477\n ?\n PORT_ID: 330\n :\n PC_PHYS_PORT_ID: 481\n ?\n PORT_ID: 334\n :\n PC_PHYS_PORT_ID: 485\n ?\n PORT_ID: 338\n :\n PC_PHYS_PORT_ID: 489\n ?\n PORT_ID: 339\n :\n PC_PHYS_PORT_ID: 493\n ?\n PORT_ID: 341\n :\n PC_PHYS_PORT_ID: 497\n ?\n PORT_ID: 345\n :\n PC_PHYS_PORT_ID: 501\n ?\n PORT_ID: 349\n :\n PC_PHYS_PORT_ID: 505\n ?\n PORT_ID: 350\n :\n PC_PHYS_PORT_ID: 509\n ?\n PORT_ID: 0\n :\n PC_PHYS_PORT_ID: 0\n ?\n PORT_ID: 76\n :\n PC_PHYS_PORT_ID: 513\n...\n---\ndevice:\n 0:\n PC_PORT:\n ?\n PORT_ID: 0\n :\n ENABLE: 1\n SPEED: 10000\n NUM_LANES: 1\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n ENABLE: 0\n SPEED: 400000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS544_2XN\n MAX_FRAME_SIZE: 9416\n ?\n PORT_ID: 76\n :\n ENABLE: 0\n SPEED: 100000\n NUM_LANES: 4\n FEC_MODE: PC_FEC_RS528\n MAX_FRAME_SIZE: 9416\n...\n---\ndevice:\n 0:\n PORT_CONFIG:\n PORT_SYSTEM_PROFILE_OPERMODE_PIPEUNIQUE: 1\n...\n---\nbcm_device:\n 0:\n global:\n l3_alpm_template: 1\n l3_alpm_hit_mode: 1\n ipv6_lpm_128b_enable: 1\n pktio_driver_type: 1\n qos_map_multi_get_mode: 1\n rx_cosq_mapping_management_mode: 0\n l3_iif_reservation_skip: 0\n pcie_host_intf_timeout_purge_enable: 0\n macro_flow_hash_shuffle_random_seed: 34345645\n bcm_linkscan_interval: 25000\n sai_common_hash_crc: 0x1\n sai_disable_srcmacqedstmac_ctrl: 0x1\n sai_acl_qset_optimization: 0x1\n sai_optimized_mmu: 0x1\n sai_pkt_rx_custom_cfg: 1\n sai_pkt_rx_pkt_size: 16512\n sai_pkt_rx_cfg_ppc: 16\n sai_async_fdb_nbr_enable: 0x1\n sai_pfc_defaults_disable: 0x1\n sai_ifp_enable_on_cpu_tx: 0x1\n sai_vfp_smac_drop_filter_disable: 1\n sai_macro_flow_based_hash: 1\n sai_mmu_qgroups_default: 1\n sai_dis_ctr_incr_on_port_ln_dn: 0\n custom_feature_mesh_topology_sync_mode: 1\n sai_ecmp_group_members_increment: 1\n sai_field_group_auto_prioritize: 1\n bcm_tunnel_term_compatible_mode: 1\n sai_l2_cpu_fdb_event_suppress: 1\n sai_port_phy_time_sync_en: 1\n sai_stats_support_mask: 0x2\n sai_disable_internal_port_serdes: 1\n global_flexctr_ing_action_num_reserved: 20\n global_flexctr_ing_pool_num_reserved: 8\n global_flexctr_ing_op_profile_num_reserved: 20\n global_flexctr_ing_group_num_reserved: 2\n global_flexctr_egr_action_num_reserved: 8\n global_flexctr_egr_pool_num_reserved: 5\n global_flexctr_egr_op_profile_num_reserved: 10\n global_flexctr_egr_group_num_reserved: 1\n sai_uncached_port_stats: 0x1\n...\n---\ndevice:\n 0:\n TM_THD_CONFIG:\n THRESHOLD_MODE: LOSSY\n...\n---\ndevice:\n 0:\n PORT:\n ?\n PORT_ID: [[1, 1], [5, 5], [9, 9], [10, 10], [11, 11], [15, 15], [19, 19],\n [20, 20], [22, 22], [26, 26], [30, 30], [31, 31], [33, 33], [37, 37], [41,\n 41], [42, 42], [44, 44], [48, 48], [52, 52], [53, 53], [55, 55], [59, 59],\n [63, 63], [64, 64], [66, 66], [70, 70], [74, 74], [75, 75], [77, 77], [81,\n 81], [85, 85], [86, 86], [88, 88], [92, 92], [96, 96], [97, 97], [99, 99],\n [103, 103], [107, 107], [108, 108], [110, 110], [114, 114], [118, 118], [119,\n 119], [121, 121], [125, 125], [129, 129], [130, 130], [132, 132], [136, 136],\n [140, 140], [141, 141], [143, 143], [147, 147], [151, 151], [152, 152], [154,\n 154], [158, 158], [162, 162], [163, 163], [165, 165], [169, 169], [173, 173],\n [174, 174], [176, 176], [180, 180], [184, 184], [185, 185], [187, 187], [191,\n 191], [195, 195], [196, 196], [198, 198], [202, 202], [206, 206], [207, 207],\n [209, 209], [213, 213], [217, 217], [218, 218], [220, 220], [224, 224], [228,\n 228], [229, 229], [231, 231], [235, 235], [239, 239], [240, 240], [242, 242],\n [246, 246], [250, 250], [251, 251], [253, 253], [257, 257], [261, 261], [262,\n 262], [264, 264], [268, 268], [272, 272], [273, 273], [275, 275], [279, 279],\n [283, 283], [284, 284], [286, 286], [290, 290], [294, 294], [295, 295], [297,\n 297], [301, 301], [305, 305], [306, 306], [308, 308], [312, 312], [316, 316],\n [317, 317], [319, 319], [323, 323], [327, 327], [328, 328], [330, 330], [334,\n 334], [338, 338], [339, 339], [341, 341], [345, 345], [349, 349], [350, 350]]\n :\n MTU: 9416\n MTU_CHECK: 1\n...\n---\ndevice:\n 0:\n DEVICE_CONFIG:\n AUTOLOAD_BOARD_SETTINGS: 0\n CORE_CLK_FREQ: CLK_1125MHZ\n PP_CLK_FREQ: CLK_675MHZ\n...\n---\ndevice:\n 0:\n FP_CONFIG:\n FP_ING_OPERMODE: GLOBAL_PIPE_AWARE\n...\n---\ndevice:\n 0:\n CTR_EFLEX_CONFIG:\n CTR_ING_EFLEX_OPERMODE_PIPEUNIQUE: 1\n CTR_ING_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1\n CTR_EGR_EFLEX_OPERMODE_PIPEUNIQUE: 1\n CTR_EGR_EFLEX_OPERMODE_PIPE_INSTANCE_UNIQUE: 1\n...\n" } } } diff --git a/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON b/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON index f83fa93f52f7f..5f4ac186ffcbb 100644 --- a/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/wedge100.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -139,6 +167,7 @@ "bcm_num_cos": "0xa", "buf.mqueue.guarantee.0": "0x0b", "custom_feature_mesh_topology_sync_mode": "1", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "0x1", "l2_mem_entries": "0x8000", "l2xmsg_mode": "0x1", diff --git a/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON b/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON index ff12bb37ba96c..803433730718d 100644 --- a/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/wedge400.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -191,10 +219,12 @@ "dport_map_port_96": "9", "dport_map_port_97": "10", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON b/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON index c62f11e1c38a3..b8a77fd8388eb 100644 --- a/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON +++ b/fboss/oss/hw_test_configs/yamp.agent.materialized_JSON @@ -2,6 +2,7 @@ "defaultCommandLineArgs": { "check_wb_handles": "true", "counter_refresh_interval": "0", + "enable_acl_table_group": "true", "log_variable_name": "true", "skip_transceiver_programming": "true" }, @@ -46,6 +47,7 @@ "1": 1, "2": 0, "3": 0, + "4": 0, "700": 255, "786": 10 }, @@ -101,7 +103,7 @@ "exactMatchTableConfigs": [ ], - "switchIdToSwitchType": { + "switchIdToSwitchType_DEPRECATED": { }, "switchDrainState": 0, @@ -124,6 +126,32 @@ ], "needL2EntryForNeighbor": true }, + "aclTableGroup": { + "name": "acl-table-group-ingress", + "aclTables": [ + { + "name": "AclTable1", + "priority": 0, + "aclEntries": [ + + ], + "actionTypes": [ + + ], + "qualifiers": [ + + ], + "udfGroups": [ + + ] + } + ], + "stage": 0 + }, + "sdkVersion": { + "asicSdk": "sdk", + "saiSdk": "sai" + }, "dsfNodes": { }, @@ -271,10 +299,12 @@ "dport_map_port_94": "127", "dport_map_port_95": "128", "dpr_clock_frequency": "1000", + "host_as_route_disable": "1", "ipv6_lpm_128b_enable": "1", "l2xmsg_shadow_hit_bits": "0", "l3_alpm_enable": "2", "l3_alpm_ipv6_128b_bkt_rsvd": "1", + "l3_max_ecmp_mode": "1", "load_firmware": "0x2", "macro_flow_hash_shuffle_random_seed": "34345645", "mem_cache_enable": "0", diff --git a/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON b/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON new file mode 100644 index 0000000000000..1ad38a0bdcd77 --- /dev/null +++ b/fboss/oss/hw_test_configs/yangra.agent.materialized_JSON @@ -0,0 +1,161 @@ +{ + "defaultCommandLineArgs": { + "check_wb_handles": "true", + "counter_refresh_interval": "0", + "intf_nbr_tables": "true", + "log_variable_name": "true", + "mode": "yangra", + "skip_transceiver_programming": "true" + }, + "sw": { + "version": 0, + "ports": [ + + ], + "vlans": [ + + ], + "vlanPorts": [ + + ], + "defaultVlan": 0, + "interfaces": [ + { + "intfID": 101, + "routerID": 0, + "vlanID": 0, + "ipAddresses": [ + + ], + "mtu": 9000, + "isVirtual": false, + "isStateSyncDisabled": true, + "type": 2, + "scope": 0 + } + ], + "arpTimeoutSeconds": 60, + "arpRefreshSeconds": 20, + "arpAgerInterval": 5, + "proactiveArp": false, + "staticRoutesWithNhops": [ + + ], + "staticRoutesToNull": [ + + ], + "staticRoutesToCPU": [ + + ], + "acls": [ + + ], + "maxNeighborProbes": 300, + "staleEntryInterval": 10, + "aggregatePorts": [ + + ], + "clientIdToAdminDistance": { + "0": 20, + "1": 1, + "2": 0, + "3": 0, + "700": 255, + "786": 10 + }, + "sFlowCollectors": [ + + ], + "cpuQueues": [ + + ], + "loadBalancers": [ + + ], + "mirrors": [ + + ], + "trafficCounters": [ + + ], + "qosPolicies": [ + + ], + "defaultPortQueues": [ + + ], + "staticMplsRoutesWithNhops": [ + + ], + "staticMplsRoutesToNull": [ + + ], + "staticMplsRoutesToCPU": [ + + ], + "staticIp2MplsRoutes": [ + + ], + "portQueueConfigs": { + + }, + "switchSettings": { + "l2LearningMode": 0, + "qcmEnable": false, + "ptpTcEnable": false, + "l2AgeTimerSeconds": 300, + "maxRouteCounterIDs": 0, + "blockNeighbors": [ + + ], + "macAddrsToBlock": [ + + ], + "switchType": 0, + "switchId": 0, + "exactMatchTableConfigs": [ + + ], + "switchIdToSwitchType": { + + }, + "switchDrainState": 0, + "switchIdToSwitchInfo": { + "0": { + "switchType": 0, + "asicType": 17, + "switchIndex": 0, + "portIdRange": { + "minimum": 0, + "maximum": 2047 + }, + "systemPortRange": { + "minimum": 100, + "maximum": 120 + }, + "switchMac": "02:00:00:00:00:01" + } + }, + "vendorMacOuis": [ + + ], + "metaMacOuis": [ + + ], + "needL2EntryForNeighbor": true + }, + "dsfNodes": { + }, + "defaultVoqConfig": [ + + ] + }, + "platform": { + "chip": { + "bcm": { + "config": { + } + } + } + } +} diff --git a/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON b/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON index 15fda659a2963..bca1dcf46d98a 100644 --- a/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON +++ b/fboss/oss/link_known_bad_tests/fboss_link_known_bad_tests.materialized_JSON @@ -11792,7 +11792,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -11838,48 +11838,9 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" - }, - { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" - }, - { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -11893,7 +11854,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -11940,46 +11901,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -11994,7 +11978,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12041,46 +12025,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -12095,7 +12102,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "janga800bic/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12142,46 +12149,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -12196,7 +12226,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "janga800bic/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12243,46 +12273,69 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.verifyIphyFecCounters$" + } + ], + "janga800bic/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + { + "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "FsdbTest.statsPublishSubscribe$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "MacsecTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "MacsecFsdbTest.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTc.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" + }, + { + "test_name_regex": "PtpTests.*$" + }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -12297,7 +12350,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12398,7 +12451,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12499,7 +12552,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12600,7 +12653,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12701,7 +12754,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12748,25 +12801,25 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" @@ -12786,6 +12839,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -12799,7 +12855,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400bfu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12845,6 +12901,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -12854,18 +12916,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -12884,6 +12940,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -12897,7 +12956,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -12943,6 +13002,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -12952,18 +13017,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -12982,6 +13041,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -12995,7 +13057,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13041,6 +13103,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -13050,18 +13118,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -13080,6 +13142,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -13093,7 +13158,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400bfu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13139,6 +13204,12 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -13148,18 +13219,12 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, @@ -13178,6 +13243,9 @@ { "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -13191,7 +13259,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13289,7 +13357,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13387,7 +13455,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13485,7 +13553,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13583,7 +13651,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13630,28 +13698,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13666,7 +13749,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400biu/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13713,28 +13796,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13749,7 +13847,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13796,28 +13894,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13832,7 +13945,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13879,28 +13992,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13915,7 +14043,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru400biu/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -13962,28 +14090,43 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + }, + { + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + }, + { + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" @@ -13998,7 +14141,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14081,7 +14224,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14164,7 +14307,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14247,7 +14390,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14330,7 +14473,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14376,9 +14519,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14392,7 +14556,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bfa/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14438,9 +14602,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14454,7 +14639,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14500,9 +14685,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14516,7 +14722,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ + "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14562,9 +14768,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14578,7 +14805,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bfa/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14624,9 +14851,30 @@ { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, + { + "test_name_regex": "LinkTest.fabricLinkHealth$" + }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + }, + { + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + }, { "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, + { + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + }, + { + "test_name_regex": "LinkTest.opticsTxDisableEnable$" + }, + { + "test_name_regex": "LinkTest.testOpticsRemediation$" + }, { "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, @@ -14640,7 +14888,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14702,7 +14950,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14764,7 +15012,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/11.3.0.0_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14826,7 +15074,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14888,7 +15136,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14908,13 +15156,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -14923,40 +15168,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26/physdk-millenio-5.5/millenio-5.5": [ + "meru800bia/sai/asicsdk-11.3.0.0_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -14976,13 +15218,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -14991,40 +15230,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28": [ + "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15044,13 +15280,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -15059,40 +15292,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28/physdk-millenio-5.5/millenio-5.5": [ + "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15112,13 +15342,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -15127,40 +15354,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28": [ + "meru800bia/sai/asicsdk-12.0_ea_dnx_odp/12.0_ea_dnx_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15180,13 +15404,10 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { "test_name_regex": "SpeedChangeTest.*$" @@ -15195,40 +15416,37 @@ "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "MacLearningTest.l2EntryFlap.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PtpTests.*$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28/physdk-millenio-5.5/millenio-5.5": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15296,332 +15514,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.26/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15674,84 +15567,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "MacLearningTest.l2EntryFlap" }, { "test_name_regex": "SpeedChangeTest.*$" }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15803,80 +15634,6 @@ { "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, - { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" - }, - { - "test_name_regex": "LacpTest.lacpFlap$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecCounters$" - } - ], - "montblanc/bcm/asicsdk-6.5.26/6.5.26": [ - { - "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" - }, - { - "test_name_regex": "FsdbTest.statsPublishSubscribe$" - }, - { - "test_name_regex": "cold_boot.QsfpFsdbTest.tcvr$" - }, - { - "test_name_regex": "MacsecTest.*$" - }, - { - "test_name_regex": "MacsecFsdbTest.*$" - }, - { - "test_name_regex": "MacsecStatTest.*$" - }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, - { - "test_name_regex": "Prbs.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTc.*$" - }, - { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" - }, - { - "test_name_regex": "LinkTest.testOpticsRemediation$" - }, - { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" - }, - { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" - }, { "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, @@ -15893,7 +15650,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.26/6.5.28/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15912,26 +15669,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -15970,7 +15718,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -15989,26 +15737,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16047,7 +15786,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.28": [ + "minipack_7x16Q_1x16O/bcm/asicsdk-6.5.28/6.5.28/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16066,26 +15805,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16124,7 +15854,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16143,26 +15873,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16186,22 +15907,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16220,26 +15938,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16263,22 +15972,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.28/6.5.28": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16297,26 +16003,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16340,22 +16037,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16374,26 +16068,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16417,22 +16102,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16451,26 +16133,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16494,22 +16167,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "minipack_7x16Q_1x16O/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16528,26 +16198,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16583,7 +16244,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16602,26 +16263,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16657,7 +16309,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "minipack_7x16Q_1x16O/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-millenio-5.5/millenio-5.5": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16676,26 +16328,17 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "PortStatsTest.xphySanity" - }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, - { - "test_name_regex": "SpeedChangeTest.*$" - }, { "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTc.*$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -16731,7 +16374,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16793,19 +16436,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16867,19 +16513,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -16941,19 +16590,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17015,19 +16667,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17089,19 +16744,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17163,19 +16821,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "montblanc/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17237,19 +16898,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17311,19 +16975,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17385,19 +17052,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/1.42.8": [ + "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17422,6 +17092,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17437,6 +17110,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17446,15 +17122,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17468,16 +17135,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17502,6 +17166,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17517,6 +17184,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17526,15 +17196,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17548,16 +17209,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17582,6 +17240,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17597,6 +17258,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17606,15 +17270,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17628,16 +17283,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17662,6 +17314,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17677,6 +17332,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17686,15 +17344,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17708,16 +17357,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17742,6 +17388,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17757,6 +17406,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17766,15 +17418,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17788,16 +17431,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17822,6 +17462,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17837,6 +17480,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17846,15 +17492,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17868,16 +17505,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17902,6 +17536,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17917,6 +17554,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -17926,15 +17566,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -17948,16 +17579,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -17982,6 +17610,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -17997,6 +17628,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18006,15 +17640,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18028,16 +17653,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18062,6 +17684,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18077,6 +17702,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18086,15 +17714,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18108,16 +17727,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.6.1_yuba": [ + "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18142,6 +17758,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18157,6 +17776,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18166,15 +17788,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18188,16 +17801,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18222,6 +17832,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18237,6 +17850,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18246,15 +17862,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18268,16 +17875,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "montblanc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18302,6 +17906,9 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, + { + "test_name_regex": "LinkTest.ptpEnableIsHitless$" + }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, @@ -18317,6 +17924,9 @@ { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -18326,15 +17936,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -18348,16 +17949,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.8.3001": [ + "morgan800cc/sai/asicsdk-1.42.8/1.42.8": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18437,7 +18035,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18517,7 +18115,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18597,7 +18195,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90/24.4.90": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18677,7 +18275,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18757,7 +18355,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18837,7 +18435,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18917,7 +18515,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -18997,7 +18595,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19077,7 +18675,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.6.1_yuba/24.6.1_yuba": [ + "morgan800cc/sai/asicsdk-1.42.8/24.8.3001": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19157,7 +18755,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19237,7 +18835,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19317,7 +18915,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001": [ + "morgan800cc/sai/asicsdk-24.4.90/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19397,7 +18995,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19477,7 +19075,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19557,7 +19155,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.26": [ + "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19582,15 +19180,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19607,34 +19205,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19659,15 +19260,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19684,34 +19285,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19736,15 +19340,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19761,34 +19365,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.28": [ + "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19813,15 +19420,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19838,34 +19445,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19890,15 +19500,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19915,34 +19525,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "morgan800cc/sai/asicsdk-24.8.3001/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -19967,15 +19580,15 @@ { "test_name_regex": "LinkTest.xPhyInfoTest" }, - { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, { "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, + { + "test_name_regex": "Prbs.*$" + }, { "test_name_regex": "PtpTests.verifyPtpTc.*$" }, @@ -19992,34 +19605,37 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.28/6.5.28": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20096,7 +19712,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20173,7 +19789,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20250,7 +19866,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20312,19 +19928,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20386,19 +20005,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20460,19 +20082,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "tahan800bc/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20534,19 +20159,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" + }, + { + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20608,19 +20236,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20682,19 +20313,22 @@ "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20768,7 +20402,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20842,7 +20476,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20916,7 +20550,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -20990,7 +20624,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21064,7 +20698,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21138,7 +20772,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.26": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21157,39 +20791,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21200,28 +20822,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21240,39 +20865,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21283,28 +20896,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21323,39 +20939,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21366,28 +20970,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.28": [ + "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21406,39 +21013,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21449,28 +21044,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21489,39 +21087,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21532,28 +21118,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "tahan800bc/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21572,39 +21161,27 @@ { "test_name_regex": "MacsecStatTest.*$" }, - { - "test_name_regex": "LinkTest.xPhyInfoTest" - }, { "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable" - }, - { - "test_name_regex": "LinkTest.getTransceivers" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation" + "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "PtpTests.verifyPtpTc.*$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, - { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" - }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -21615,28 +21192,31 @@ "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + }, + { + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.28/6.5.28": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21719,7 +21299,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21802,7 +21382,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21885,7 +21465,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -21953,19 +21533,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22033,19 +21616,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22113,19 +21699,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "wedge100s/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22193,19 +21782,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22273,19 +21865,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22353,19 +21948,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22445,7 +22043,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22525,7 +22123,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22605,7 +22203,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22685,7 +22283,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22765,7 +22363,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22845,7 +22443,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.26": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22865,37 +22463,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -22903,6 +22492,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -22912,12 +22504,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -22925,22 +22511,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -22960,37 +22543,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -22998,6 +22572,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23007,12 +22584,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23020,22 +22591,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23055,37 +22623,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23093,6 +22652,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23102,12 +22664,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23115,22 +22671,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.28": [ + "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23150,37 +22703,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23189,19 +22733,16 @@ "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" - }, - { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -23210,22 +22751,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23245,37 +22783,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23283,6 +22812,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23292,12 +22824,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23305,22 +22831,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge100s/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23340,37 +22863,28 @@ "test_name_regex": "MacsecStatTest.*$" }, { - "test_name_regex": "LinkTest.ptpEnableIsHitless$" - }, - { - "test_name_regex": "LinkTest.fabricLinkHealth$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" - }, - { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" + "test_name_regex": "LinkTest.opticsTxDisableEnable" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" + "test_name_regex": "LinkTest.getTransceivers" }, { - "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" + "test_name_regex": "LinkTest.testOpticsRemediation" }, { - "test_name_regex": "Prbs.*ASIC.*ASIC.*$" + "test_name_regex": "Prbs.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "SpeedChangeTest.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" @@ -23378,6 +22892,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "Prbs.*ASIC.*$" + }, { "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, @@ -23387,12 +22904,6 @@ { "test_name_regex": "LinkTest.testOpticsRemediation$" }, - { - "test_name_regex": "Prbs.*ASIC.*$" - }, - { - "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" - }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" }, @@ -23400,22 +22911,19 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "MacLearningTest.l2EntryFlap" + "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "SpeedChangeTest.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.28/6.5.28": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.26": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23510,7 +23018,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23605,7 +23113,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.26/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23700,7 +23208,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23780,19 +23288,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23872,19 +23383,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/bcm/asicsdk-6.5.26/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -23964,19 +23478,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ + "wedge400/bcm/asicsdk-6.5.28/6.5.28": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24056,19 +23573,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24148,19 +23668,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/bcm/asicsdk-6.5.28/6.5.28/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24240,19 +23763,22 @@ "test_name_regex": "LinkTest.verifyIphyFecBerCounters$" }, { - "test_name_regex": "warm_boot.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.enablePtpPortDown.*$" }, { - "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" + "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" }, { - "test_name_regex": "LacpTest.lacpFlap$" + "test_name_regex": "MacLearningTest.l2EntryFlap" + }, + { + "test_name_regex": "SpeedChangeTest.*$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ + "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24344,7 +23870,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24436,7 +23962,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-10.2.0.0_odp/10.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24528,7 +24054,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24620,7 +24146,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24712,7 +24238,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/8.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24804,7 +24330,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/1.42.8": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24827,52 +24353,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -24887,16 +24416,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -24919,52 +24445,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" + }, + { + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -24979,16 +24508,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-8.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25011,52 +24537,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25071,16 +24600,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90": [ + "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25103,52 +24629,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25163,16 +24692,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25195,52 +24721,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25255,16 +24784,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400/sai/asicsdk-9.2.0.0_odp/9.2.0.0_odp/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25287,52 +24813,55 @@ "test_name_regex": "LinkTest.ptpEnableIsHitless$" }, { - "test_name_regex": "warm_boot.PtpTests.verifyPtpTcDelayRequest$" + "test_name_regex": "LinkTest.fabricLinkHealth$" }, { - "test_name_regex": "LinkTest.fabricLinkHealth$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR1_100G.*$" }, { - "test_name_regex": "Prbs.*$" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_200G.*$" }, { - "test_name_regex": "LinkTest.xPhyInfoTest" + "test_name_regex": "Prbs.*TRANSCEIVER_LINE.*FR4_400G.*$" }, { - "test_name_regex": "PortStatsTest.xphySanity" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR1_100G.*$" }, { - "test_name_regex": "warm_boot.LacpTest.lacpFlap$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_200G.*$" }, { - "test_name_regex": "roundtrip.*.testOpticsRemediation$" + "test_name_regex": "Prbs.*ASIC.*TRANSCEIVER_SYS.*FR4_400G.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" + "test_name_regex": "Prbs.*ASIC.*ASIC.*$" }, { - "test_name_regex": "LinkTest.opticsTxDisableEnable$" + "test_name_regex": "LinkTest.xPhyInfoTest" }, { - "test_name_regex": "LinkTest.testOpticsRemediation$" + "test_name_regex": "PortStatsTest.xphySanity" }, { - "test_name_regex": "Prbs.*ASIC.*$" + "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.HUNDREDGToTWOHUNDREDG$" + "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableRandomPorts$" }, { - "test_name_regex": "cold_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.opticsTxDisableEnable$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.FOURHUNDREDGToTWOHUNDREDG$" + "test_name_regex": "LinkTest.testOpticsRemediation$" }, { - "test_name_regex": "warm_boot.SpeedChangeTest.TWOHUNDREDGToHUNDREDG$" + "test_name_regex": "Prbs.*ASIC.*$" + }, + { + "test_name_regex": "SpeedChangeTest.TWOHUNDREDGToFOURHUNDREDG$" }, { "test_name_regex": "LinkTest.opticsVdmPerformanceMonitoring$" @@ -25347,16 +24876,13 @@ "test_name_regex": "CheckInit.MacLearningTest.l2EntryFlap" }, { - "test_name_regex": "PtpTests.enablePtpPortDown.*$" - }, - { - "test_name_regex": "PtpTests.verifyPtpTcAfterLinkFlap.*$" + "test_name_regex": "LacpTest.lacpFlap$" }, { "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba": [ + "wedge400c/sai/asicsdk-1.42.8/1.42.8": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25396,6 +24922,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25448,7 +24977,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25488,6 +25017,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25540,7 +25072,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/1.42.8/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25580,6 +25112,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25632,7 +25167,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.6.1_yuba": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25672,6 +25207,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25724,7 +25262,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25764,6 +25302,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25816,7 +25357,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25856,6 +25397,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -25908,7 +25452,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.8.3001": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -25948,6 +25492,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26000,7 +25547,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26040,6 +25587,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26092,7 +25642,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26132,6 +25682,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26184,7 +25737,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90/24.4.90": [ + "wedge400c/sai/asicsdk-1.42.8/24.8.3001": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26224,6 +25777,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26276,7 +25832,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26316,6 +25872,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26368,7 +25927,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-1.42.8/24.8.3001/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26408,6 +25967,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26460,7 +26022,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ + "wedge400c/sai/asicsdk-24.4.90/24.4.90": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26500,6 +26062,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26552,7 +26117,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26592,6 +26157,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26644,7 +26212,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-24.4.90/24.4.90/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26684,6 +26252,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26736,7 +26307,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.6.1_yuba/24.6.1_yuba": [ + "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26776,6 +26347,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26828,7 +26402,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.7.2/credo-0.7.2": [ + "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.7.2/credo-0.7.2": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26868,6 +26442,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -26920,7 +26497,7 @@ "test_name_regex": "LinkTest.verifyIphyFecCounters$" } ], - "wedge400c/sai/asicsdk-24.6.1_yuba/24.6.1_yuba/physdk-credo-0.8.4/credo-0.8.4": [ + "wedge400c/sai/asicsdk-24.4.90_yuba/24.4.90_yuba/physdk-credo-0.8.4/credo-0.8.4": [ { "test_name_regex": "LinkSanityTestDataPlaneFlood.*$" }, @@ -26960,6 +26537,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -27052,6 +26632,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -27144,6 +26727,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, @@ -27236,6 +26822,9 @@ { "test_name_regex": "warm_boot.LacpTest.lacpFlap$" }, + { + "test_name_regex": "roundtrip.preprod_2_.*_2_preprod.warm_boot.*$" + }, { "test_name_regex": "roundtrip.*.testOpticsRemediation$" }, diff --git a/fboss/oss/link_test_configs/janga800bic.materialized_JSON b/fboss/oss/link_test_configs/janga800bic.materialized_JSON index 1b796ac010b33..d49c43ac63019 100644 --- a/fboss/oss/link_test_configs/janga800bic.materialized_JSON +++ b/fboss/oss/link_test_configs/janga800bic.materialized_JSON @@ -223,7 +223,7 @@ }, { "logicalID": 7, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -243,7 +243,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/44/1" }, "lookupClasses": [ @@ -258,7 +258,7 @@ }, { "logicalID": 8, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -278,7 +278,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/2/5" }, "lookupClasses": [ @@ -293,7 +293,7 @@ }, { "logicalID": 9, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -313,7 +313,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/2/1" }, "lookupClasses": [ @@ -328,7 +328,7 @@ }, { "logicalID": 10, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -348,7 +348,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/1/5" }, "lookupClasses": [ @@ -363,7 +363,7 @@ }, { "logicalID": 11, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -383,7 +383,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/1/1" }, "lookupClasses": [ @@ -957,8 +957,8 @@ "scope": 1 }, { - "logicalID": 1112, - "state": 2, + "logicalID": 1114, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -978,7 +978,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/1" + }, "lookupClasses": [ @@ -992,8 +992,8 @@ "scope": 0 }, { - "logicalID": 1113, - "state": 2, + "logicalID": 1115, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1013,7 +1013,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/2" + }, "lookupClasses": [ @@ -1027,8 +1027,8 @@ "scope": 0 }, { - "logicalID": 1114, - "state": 2, + "logicalID": 1112, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1048,7 +1048,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/3" + }, "lookupClasses": [ @@ -1062,8 +1062,8 @@ "scope": 0 }, { - "logicalID": 1115, - "state": 2, + "logicalID": 1113, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1083,7 +1083,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/4" + }, "lookupClasses": [ @@ -1097,8 +1097,8 @@ "scope": 0 }, { - "logicalID": 1116, - "state": 2, + "logicalID": 1119, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1118,7 +1118,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/5" + }, "lookupClasses": [ @@ -1133,7 +1133,7 @@ }, { "logicalID": 1117, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1153,7 +1153,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/6" + }, "lookupClasses": [ @@ -1168,7 +1168,7 @@ }, { "logicalID": 1118, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1188,7 +1188,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/7" + }, "lookupClasses": [ @@ -1202,8 +1202,8 @@ "scope": 0 }, { - "logicalID": 1119, - "state": 2, + "logicalID": 1116, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1223,7 +1223,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/4/8" + }, "lookupClasses": [ @@ -1237,8 +1237,8 @@ "scope": 0 }, { - "logicalID": 1104, - "state": 2, + "logicalID": 1106, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1258,7 +1258,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/1" + }, "lookupClasses": [ @@ -1272,8 +1272,8 @@ "scope": 0 }, { - "logicalID": 1105, - "state": 2, + "logicalID": 1107, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1293,7 +1293,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/2" + }, "lookupClasses": [ @@ -1307,8 +1307,8 @@ "scope": 0 }, { - "logicalID": 1106, - "state": 2, + "logicalID": 1104, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1328,7 +1328,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/3" + }, "lookupClasses": [ @@ -1342,8 +1342,8 @@ "scope": 0 }, { - "logicalID": 1107, - "state": 2, + "logicalID": 1105, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1363,7 +1363,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/4" + }, "lookupClasses": [ @@ -1377,8 +1377,8 @@ "scope": 0 }, { - "logicalID": 1108, - "state": 2, + "logicalID": 1111, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1398,7 +1398,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/5" + }, "lookupClasses": [ @@ -1413,7 +1413,7 @@ }, { "logicalID": 1109, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1433,7 +1433,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/6" + }, "lookupClasses": [ @@ -1448,7 +1448,7 @@ }, { "logicalID": 1110, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1468,7 +1468,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/7" + }, "lookupClasses": [ @@ -1482,8 +1482,8 @@ "scope": 0 }, { - "logicalID": 1111, - "state": 2, + "logicalID": 1108, + "state": 1, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1503,7 +1503,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "fab1/3/8" + }, "lookupClasses": [ @@ -1517,7 +1517,7 @@ "scope": 0 }, { - "logicalID": 1136, + "logicalID": 1143, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1552,7 +1552,7 @@ "scope": 0 }, { - "logicalID": 1137, + "logicalID": 1141, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1587,7 +1587,7 @@ "scope": 0 }, { - "logicalID": 1138, + "logicalID": 1142, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1622,7 +1622,7 @@ "scope": 0 }, { - "logicalID": 1139, + "logicalID": 1140, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1657,7 +1657,7 @@ "scope": 0 }, { - "logicalID": 1140, + "logicalID": 1138, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1692,7 +1692,7 @@ "scope": 0 }, { - "logicalID": 1141, + "logicalID": 1136, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1727,7 +1727,7 @@ "scope": 0 }, { - "logicalID": 1142, + "logicalID": 1137, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1762,7 +1762,7 @@ "scope": 0 }, { - "logicalID": 1143, + "logicalID": 1139, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1797,7 +1797,7 @@ "scope": 0 }, { - "logicalID": 1128, + "logicalID": 1130, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1832,7 +1832,7 @@ "scope": 0 }, { - "logicalID": 1129, + "logicalID": 1131, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1867,7 +1867,7 @@ "scope": 0 }, { - "logicalID": 1130, + "logicalID": 1128, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1902,7 +1902,7 @@ "scope": 0 }, { - "logicalID": 1131, + "logicalID": 1129, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -1937,8 +1937,8 @@ "scope": 0 }, { - "logicalID": 1132, - "state": 1, + "logicalID": 1133, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1958,7 +1958,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/1" }, "lookupClasses": [ @@ -1972,8 +1972,8 @@ "scope": 0 }, { - "logicalID": 1133, - "state": 1, + "logicalID": 1135, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -1993,7 +1993,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/2" }, "lookupClasses": [ @@ -2008,7 +2008,7 @@ }, { "logicalID": 1134, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2028,7 +2028,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/3" }, "lookupClasses": [ @@ -2042,8 +2042,8 @@ "scope": 0 }, { - "logicalID": 1135, - "state": 1, + "logicalID": 1132, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2063,7 +2063,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/4" }, "lookupClasses": [ @@ -2077,8 +2077,8 @@ "scope": 0 }, { - "logicalID": 1120, - "state": 1, + "logicalID": 1122, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2098,7 +2098,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/5" }, "lookupClasses": [ @@ -2112,8 +2112,8 @@ "scope": 0 }, { - "logicalID": 1121, - "state": 1, + "logicalID": 1123, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2133,7 +2133,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/6" }, "lookupClasses": [ @@ -2147,8 +2147,8 @@ "scope": 0 }, { - "logicalID": 1122, - "state": 1, + "logicalID": 1120, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2168,7 +2168,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/7" }, "lookupClasses": [ @@ -2182,8 +2182,8 @@ "scope": 0 }, { - "logicalID": 1123, - "state": 1, + "logicalID": 1121, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2203,7 +2203,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/6/8" }, "lookupClasses": [ @@ -2217,8 +2217,8 @@ "scope": 0 }, { - "logicalID": 1124, - "state": 1, + "logicalID": 1125, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2238,7 +2238,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/1" }, "lookupClasses": [ @@ -2252,8 +2252,8 @@ "scope": 0 }, { - "logicalID": 1125, - "state": 1, + "logicalID": 1127, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2273,7 +2273,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/2" }, "lookupClasses": [ @@ -2288,7 +2288,7 @@ }, { "logicalID": 1126, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2308,7 +2308,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/3" }, "lookupClasses": [ @@ -2322,8 +2322,8 @@ "scope": 0 }, { - "logicalID": 1127, - "state": 1, + "logicalID": 1124, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2343,7 +2343,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/4" }, "lookupClasses": [ @@ -2357,8 +2357,8 @@ "scope": 0 }, { - "logicalID": 1160, - "state": 1, + "logicalID": 1162, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2378,7 +2378,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/5" }, "lookupClasses": [ @@ -2392,8 +2392,8 @@ "scope": 0 }, { - "logicalID": 1161, - "state": 1, + "logicalID": 1163, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2413,7 +2413,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/6" }, "lookupClasses": [ @@ -2427,8 +2427,8 @@ "scope": 0 }, { - "logicalID": 1162, - "state": 1, + "logicalID": 1165, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2448,7 +2448,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/7" }, "lookupClasses": [ @@ -2462,8 +2462,8 @@ "scope": 0 }, { - "logicalID": 1163, - "state": 1, + "logicalID": 1167, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2483,7 +2483,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/7/8" }, "lookupClasses": [ @@ -2498,7 +2498,7 @@ }, { "logicalID": 1164, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2518,7 +2518,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/1" }, "lookupClasses": [ @@ -2532,8 +2532,8 @@ "scope": 0 }, { - "logicalID": 1165, - "state": 1, + "logicalID": 1161, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2553,7 +2553,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/2" }, "lookupClasses": [ @@ -2568,7 +2568,7 @@ }, { "logicalID": 1166, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2588,7 +2588,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/3" }, "lookupClasses": [ @@ -2602,8 +2602,8 @@ "scope": 0 }, { - "logicalID": 1167, - "state": 1, + "logicalID": 1160, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2623,7 +2623,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/4" }, "lookupClasses": [ @@ -2637,8 +2637,8 @@ "scope": 0 }, { - "logicalID": 1152, - "state": 1, + "logicalID": 1155, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2658,7 +2658,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/5" }, "lookupClasses": [ @@ -2672,8 +2672,8 @@ "scope": 0 }, { - "logicalID": 1153, - "state": 1, + "logicalID": 1154, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2693,7 +2693,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/6" }, "lookupClasses": [ @@ -2707,8 +2707,8 @@ "scope": 0 }, { - "logicalID": 1154, - "state": 1, + "logicalID": 1153, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2728,7 +2728,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/7" }, "lookupClasses": [ @@ -2742,8 +2742,8 @@ "scope": 0 }, { - "logicalID": 1155, - "state": 1, + "logicalID": 1152, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2763,7 +2763,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/8/8" }, "lookupClasses": [ @@ -2777,8 +2777,8 @@ "scope": 0 }, { - "logicalID": 1156, - "state": 1, + "logicalID": 1159, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2798,7 +2798,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/1" }, "lookupClasses": [ @@ -2813,7 +2813,7 @@ }, { "logicalID": 1157, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2833,7 +2833,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/2" }, "lookupClasses": [ @@ -2848,7 +2848,7 @@ }, { "logicalID": 1158, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2868,7 +2868,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/3" }, "lookupClasses": [ @@ -2882,8 +2882,8 @@ "scope": 0 }, { - "logicalID": 1159, - "state": 1, + "logicalID": 1156, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2903,7 +2903,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/4" }, "lookupClasses": [ @@ -2917,8 +2917,8 @@ "scope": 0 }, { - "logicalID": 1144, - "state": 1, + "logicalID": 1146, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2938,7 +2938,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/5" }, "lookupClasses": [ @@ -2952,8 +2952,8 @@ "scope": 0 }, { - "logicalID": 1145, - "state": 1, + "logicalID": 1147, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -2973,7 +2973,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/6" }, "lookupClasses": [ @@ -2987,8 +2987,8 @@ "scope": 0 }, { - "logicalID": 1146, - "state": 1, + "logicalID": 1144, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3008,7 +3008,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/7" }, "lookupClasses": [ @@ -3022,8 +3022,8 @@ "scope": 0 }, { - "logicalID": 1147, - "state": 1, + "logicalID": 1145, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3043,7 +3043,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/9/8" }, "lookupClasses": [ @@ -3057,8 +3057,8 @@ "scope": 0 }, { - "logicalID": 1148, - "state": 1, + "logicalID": 1149, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3078,7 +3078,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/1" }, "lookupClasses": [ @@ -3092,8 +3092,8 @@ "scope": 0 }, { - "logicalID": 1149, - "state": 1, + "logicalID": 1151, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3113,7 +3113,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/2" }, "lookupClasses": [ @@ -3127,8 +3127,8 @@ "scope": 0 }, { - "logicalID": 1150, - "state": 1, + "logicalID": 1148, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3148,7 +3148,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/3" }, "lookupClasses": [ @@ -3162,8 +3162,8 @@ "scope": 0 }, { - "logicalID": 1151, - "state": 1, + "logicalID": 1150, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3183,7 +3183,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/4" }, "lookupClasses": [ @@ -3197,8 +3197,8 @@ "scope": 0 }, { - "logicalID": 1168, - "state": 1, + "logicalID": 1171, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3218,7 +3218,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/5" }, "lookupClasses": [ @@ -3232,8 +3232,8 @@ "scope": 0 }, { - "logicalID": 1169, - "state": 1, + "logicalID": 1175, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3253,7 +3253,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/6" }, "lookupClasses": [ @@ -3268,7 +3268,7 @@ }, { "logicalID": 1170, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3288,7 +3288,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/7" }, "lookupClasses": [ @@ -3302,8 +3302,8 @@ "scope": 0 }, { - "logicalID": 1171, - "state": 1, + "logicalID": 1169, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3323,7 +3323,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/10/8" }, "lookupClasses": [ @@ -3338,7 +3338,7 @@ }, { "logicalID": 1172, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3358,7 +3358,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/1" }, "lookupClasses": [ @@ -3373,7 +3373,7 @@ }, { "logicalID": 1173, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3393,7 +3393,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/2" }, "lookupClasses": [ @@ -3408,7 +3408,7 @@ }, { "logicalID": 1174, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3428,7 +3428,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/3" }, "lookupClasses": [ @@ -3442,8 +3442,8 @@ "scope": 0 }, { - "logicalID": 1175, - "state": 1, + "logicalID": 1168, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3463,7 +3463,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/4" }, "lookupClasses": [ @@ -3477,8 +3477,8 @@ "scope": 0 }, { - "logicalID": 1176, - "state": 1, + "logicalID": 1182, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3498,7 +3498,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/5" }, "lookupClasses": [ @@ -3512,8 +3512,8 @@ "scope": 0 }, { - "logicalID": 1177, - "state": 1, + "logicalID": 1176, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3533,7 +3533,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/6" }, "lookupClasses": [ @@ -3548,7 +3548,7 @@ }, { "logicalID": 1178, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3568,7 +3568,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/7" }, "lookupClasses": [ @@ -3582,8 +3582,8 @@ "scope": 0 }, { - "logicalID": 1179, - "state": 1, + "logicalID": 1181, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3603,7 +3603,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/11/8" }, "lookupClasses": [ @@ -3617,8 +3617,8 @@ "scope": 0 }, { - "logicalID": 1180, - "state": 1, + "logicalID": 1179, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3638,7 +3638,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/1" }, "lookupClasses": [ @@ -3652,8 +3652,8 @@ "scope": 0 }, { - "logicalID": 1181, - "state": 1, + "logicalID": 1177, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3673,7 +3673,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/2" }, "lookupClasses": [ @@ -3687,8 +3687,8 @@ "scope": 0 }, { - "logicalID": 1182, - "state": 1, + "logicalID": 1180, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3708,7 +3708,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/3" }, "lookupClasses": [ @@ -3723,7 +3723,7 @@ }, { "logicalID": 1183, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3743,7 +3743,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/4" }, "lookupClasses": [ @@ -3757,8 +3757,8 @@ "scope": 0 }, { - "logicalID": 1096, - "state": 1, + "logicalID": 1099, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3778,7 +3778,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/5" }, "lookupClasses": [ @@ -3792,8 +3792,8 @@ "scope": 0 }, { - "logicalID": 1097, - "state": 1, + "logicalID": 1103, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3813,7 +3813,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/6" }, "lookupClasses": [ @@ -3827,8 +3827,8 @@ "scope": 0 }, { - "logicalID": 1098, - "state": 1, + "logicalID": 1097, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3848,7 +3848,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/7" }, "lookupClasses": [ @@ -3862,8 +3862,8 @@ "scope": 0 }, { - "logicalID": 1099, - "state": 1, + "logicalID": 1098, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3883,7 +3883,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/12/8" }, "lookupClasses": [ @@ -3898,7 +3898,7 @@ }, { "logicalID": 1100, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3918,7 +3918,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/1" }, "lookupClasses": [ @@ -3933,7 +3933,7 @@ }, { "logicalID": 1101, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3953,7 +3953,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/2" }, "lookupClasses": [ @@ -3968,7 +3968,7 @@ }, { "logicalID": 1102, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -3988,7 +3988,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/3" }, "lookupClasses": [ @@ -4002,8 +4002,8 @@ "scope": 0 }, { - "logicalID": 1103, - "state": 1, + "logicalID": 1096, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4023,7 +4023,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/4" }, "lookupClasses": [ @@ -4037,8 +4037,8 @@ "scope": 0 }, { - "logicalID": 1072, - "state": 1, + "logicalID": 1078, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4058,7 +4058,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/5" }, "lookupClasses": [ @@ -4072,8 +4072,8 @@ "scope": 0 }, { - "logicalID": 1073, - "state": 1, + "logicalID": 1072, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4093,7 +4093,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/6" }, "lookupClasses": [ @@ -4107,8 +4107,8 @@ "scope": 0 }, { - "logicalID": 1074, - "state": 1, + "logicalID": 1077, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4128,7 +4128,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/7" }, "lookupClasses": [ @@ -4142,8 +4142,8 @@ "scope": 0 }, { - "logicalID": 1075, - "state": 1, + "logicalID": 1074, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4163,7 +4163,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/13/8" }, "lookupClasses": [ @@ -4177,8 +4177,8 @@ "scope": 0 }, { - "logicalID": 1076, - "state": 1, + "logicalID": 1073, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4198,7 +4198,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/1" }, "lookupClasses": [ @@ -4212,8 +4212,8 @@ "scope": 0 }, { - "logicalID": 1077, - "state": 1, + "logicalID": 1076, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4233,7 +4233,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/2" }, "lookupClasses": [ @@ -4247,8 +4247,8 @@ "scope": 0 }, { - "logicalID": 1078, - "state": 1, + "logicalID": 1079, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4268,7 +4268,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/3" }, "lookupClasses": [ @@ -4282,8 +4282,8 @@ "scope": 0 }, { - "logicalID": 1079, - "state": 1, + "logicalID": 1075, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4303,7 +4303,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/4" }, "lookupClasses": [ @@ -4317,8 +4317,8 @@ "scope": 0 }, { - "logicalID": 1080, - "state": 1, + "logicalID": 1084, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4338,7 +4338,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/5" }, "lookupClasses": [ @@ -4352,8 +4352,8 @@ "scope": 0 }, { - "logicalID": 1081, - "state": 1, + "logicalID": 1086, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4373,7 +4373,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/6" }, "lookupClasses": [ @@ -4387,8 +4387,8 @@ "scope": 0 }, { - "logicalID": 1082, - "state": 1, + "logicalID": 1087, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4408,7 +4408,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/7" }, "lookupClasses": [ @@ -4422,8 +4422,8 @@ "scope": 0 }, { - "logicalID": 1083, - "state": 1, + "logicalID": 1085, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4443,7 +4443,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/14/8" }, "lookupClasses": [ @@ -4457,8 +4457,8 @@ "scope": 0 }, { - "logicalID": 1084, - "state": 1, + "logicalID": 1081, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4478,7 +4478,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/1" }, "lookupClasses": [ @@ -4492,8 +4492,8 @@ "scope": 0 }, { - "logicalID": 1085, - "state": 1, + "logicalID": 1080, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4513,7 +4513,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/2" }, "lookupClasses": [ @@ -4527,8 +4527,8 @@ "scope": 0 }, { - "logicalID": 1086, - "state": 1, + "logicalID": 1083, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4548,7 +4548,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/3" }, "lookupClasses": [ @@ -4562,8 +4562,8 @@ "scope": 0 }, { - "logicalID": 1087, - "state": 1, + "logicalID": 1082, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4583,7 +4583,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/4" }, "lookupClasses": [ @@ -4597,8 +4597,8 @@ "scope": 0 }, { - "logicalID": 1088, - "state": 1, + "logicalID": 1094, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4618,7 +4618,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/5" }, "lookupClasses": [ @@ -4632,8 +4632,8 @@ "scope": 0 }, { - "logicalID": 1089, - "state": 1, + "logicalID": 1092, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4653,7 +4653,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/6" }, "lookupClasses": [ @@ -4667,8 +4667,8 @@ "scope": 0 }, { - "logicalID": 1090, - "state": 1, + "logicalID": 1093, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4688,7 +4688,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/7" }, "lookupClasses": [ @@ -4702,8 +4702,8 @@ "scope": 0 }, { - "logicalID": 1091, - "state": 1, + "logicalID": 1095, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4723,7 +4723,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/15/8" }, "lookupClasses": [ @@ -4737,8 +4737,8 @@ "scope": 0 }, { - "logicalID": 1092, - "state": 1, + "logicalID": 1088, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4758,7 +4758,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/1" }, "lookupClasses": [ @@ -4772,8 +4772,8 @@ "scope": 0 }, { - "logicalID": 1093, - "state": 1, + "logicalID": 1091, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4793,7 +4793,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/2" }, "lookupClasses": [ @@ -4807,8 +4807,8 @@ "scope": 0 }, { - "logicalID": 1094, - "state": 1, + "logicalID": 1090, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4828,7 +4828,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/3" }, "lookupClasses": [ @@ -4842,8 +4842,8 @@ "scope": 0 }, { - "logicalID": 1095, - "state": 1, + "logicalID": 1089, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4863,7 +4863,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/4" }, "lookupClasses": [ @@ -4877,8 +4877,8 @@ "scope": 0 }, { - "logicalID": 1064, - "state": 1, + "logicalID": 1070, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4898,7 +4898,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/5" }, "lookupClasses": [ @@ -4912,8 +4912,8 @@ "scope": 0 }, { - "logicalID": 1065, - "state": 1, + "logicalID": 1064, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4933,7 +4933,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/6" }, "lookupClasses": [ @@ -4947,8 +4947,8 @@ "scope": 0 }, { - "logicalID": 1066, - "state": 1, + "logicalID": 1068, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -4968,7 +4968,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/7" }, "lookupClasses": [ @@ -4982,8 +4982,8 @@ "scope": 0 }, { - "logicalID": 1067, - "state": 1, + "logicalID": 1069, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5003,7 +5003,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/16/8" }, "lookupClasses": [ @@ -5017,8 +5017,8 @@ "scope": 0 }, { - "logicalID": 1068, - "state": 1, + "logicalID": 1065, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5038,7 +5038,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/1" }, "lookupClasses": [ @@ -5052,8 +5052,8 @@ "scope": 0 }, { - "logicalID": 1069, - "state": 1, + "logicalID": 1066, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5073,7 +5073,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/2" }, "lookupClasses": [ @@ -5087,8 +5087,8 @@ "scope": 0 }, { - "logicalID": 1070, - "state": 1, + "logicalID": 1067, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5108,7 +5108,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/3" }, "lookupClasses": [ @@ -5123,7 +5123,7 @@ }, { "logicalID": 1071, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5143,7 +5143,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/4" }, "lookupClasses": [ @@ -5157,8 +5157,8 @@ "scope": 0 }, { - "logicalID": 1056, - "state": 1, + "logicalID": 1060, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5178,7 +5178,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/5" }, "lookupClasses": [ @@ -5192,8 +5192,8 @@ "scope": 0 }, { - "logicalID": 1057, - "state": 1, + "logicalID": 1061, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5213,7 +5213,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/6" }, "lookupClasses": [ @@ -5227,8 +5227,8 @@ "scope": 0 }, { - "logicalID": 1058, - "state": 1, + "logicalID": 1062, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5248,7 +5248,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/7" }, "lookupClasses": [ @@ -5262,8 +5262,8 @@ "scope": 0 }, { - "logicalID": 1059, - "state": 1, + "logicalID": 1056, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5283,7 +5283,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/17/8" }, "lookupClasses": [ @@ -5297,8 +5297,8 @@ "scope": 0 }, { - "logicalID": 1060, - "state": 1, + "logicalID": 1063, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5318,7 +5318,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/1" }, "lookupClasses": [ @@ -5332,8 +5332,8 @@ "scope": 0 }, { - "logicalID": 1061, - "state": 1, + "logicalID": 1057, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5353,7 +5353,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/2" }, "lookupClasses": [ @@ -5367,8 +5367,8 @@ "scope": 0 }, { - "logicalID": 1062, - "state": 1, + "logicalID": 1059, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5388,7 +5388,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/3" }, "lookupClasses": [ @@ -5402,8 +5402,8 @@ "scope": 0 }, { - "logicalID": 1063, - "state": 1, + "logicalID": 1058, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5423,7 +5423,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/4" }, "lookupClasses": [ @@ -5437,8 +5437,8 @@ "scope": 0 }, { - "logicalID": 1048, - "state": 1, + "logicalID": 1052, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5458,7 +5458,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/5" }, "lookupClasses": [ @@ -5472,8 +5472,8 @@ "scope": 0 }, { - "logicalID": 1049, - "state": 1, + "logicalID": 1053, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5493,7 +5493,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/6" }, "lookupClasses": [ @@ -5507,8 +5507,8 @@ "scope": 0 }, { - "logicalID": 1050, - "state": 1, + "logicalID": 1054, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5528,7 +5528,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/7" }, "lookupClasses": [ @@ -5542,8 +5542,8 @@ "scope": 0 }, { - "logicalID": 1051, - "state": 1, + "logicalID": 1048, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5563,7 +5563,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/18/8" }, "lookupClasses": [ @@ -5577,8 +5577,8 @@ "scope": 0 }, { - "logicalID": 1052, - "state": 1, + "logicalID": 1050, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5598,7 +5598,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/1" }, "lookupClasses": [ @@ -5612,8 +5612,8 @@ "scope": 0 }, { - "logicalID": 1053, - "state": 1, + "logicalID": 1055, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5633,7 +5633,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/2" }, "lookupClasses": [ @@ -5647,8 +5647,8 @@ "scope": 0 }, { - "logicalID": 1054, - "state": 1, + "logicalID": 1051, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5668,7 +5668,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/3" }, "lookupClasses": [ @@ -5682,8 +5682,8 @@ "scope": 0 }, { - "logicalID": 1055, - "state": 1, + "logicalID": 1049, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5703,7 +5703,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/4" }, "lookupClasses": [ @@ -5717,8 +5717,8 @@ "scope": 0 }, { - "logicalID": 1040, - "state": 1, + "logicalID": 1043, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5738,7 +5738,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/5" }, "lookupClasses": [ @@ -5753,7 +5753,7 @@ }, { "logicalID": 1041, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5773,7 +5773,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/6" }, "lookupClasses": [ @@ -5787,8 +5787,8 @@ "scope": 0 }, { - "logicalID": 1042, - "state": 1, + "logicalID": 1047, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5808,7 +5808,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/7" }, "lookupClasses": [ @@ -5822,8 +5822,8 @@ "scope": 0 }, { - "logicalID": 1043, - "state": 1, + "logicalID": 1042, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5843,7 +5843,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/19/8" }, "lookupClasses": [ @@ -5857,8 +5857,8 @@ "scope": 0 }, { - "logicalID": 1044, - "state": 1, + "logicalID": 1040, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5878,7 +5878,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/1" }, "lookupClasses": [ @@ -5892,8 +5892,8 @@ "scope": 0 }, { - "logicalID": 1045, - "state": 1, + "logicalID": 1046, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5913,7 +5913,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/2" }, "lookupClasses": [ @@ -5927,8 +5927,8 @@ "scope": 0 }, { - "logicalID": 1046, - "state": 1, + "logicalID": 1045, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5948,7 +5948,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/3" }, "lookupClasses": [ @@ -5962,8 +5962,8 @@ "scope": 0 }, { - "logicalID": 1047, - "state": 1, + "logicalID": 1044, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -5983,7 +5983,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/4" }, "lookupClasses": [ @@ -5997,8 +5997,8 @@ "scope": 0 }, { - "logicalID": 1032, - "state": 1, + "logicalID": 1036, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6018,7 +6018,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/5" }, "lookupClasses": [ @@ -6032,8 +6032,8 @@ "scope": 0 }, { - "logicalID": 1033, - "state": 1, + "logicalID": 1037, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6053,7 +6053,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/6" }, "lookupClasses": [ @@ -6067,8 +6067,8 @@ "scope": 0 }, { - "logicalID": 1034, - "state": 1, + "logicalID": 1038, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6088,7 +6088,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/7" }, "lookupClasses": [ @@ -6102,8 +6102,8 @@ "scope": 0 }, { - "logicalID": 1035, - "state": 1, + "logicalID": 1032, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6123,7 +6123,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/20/8" }, "lookupClasses": [ @@ -6137,8 +6137,8 @@ "scope": 0 }, { - "logicalID": 1036, - "state": 1, + "logicalID": 1039, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6158,7 +6158,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/1" }, "lookupClasses": [ @@ -6172,8 +6172,8 @@ "scope": 0 }, { - "logicalID": 1037, - "state": 1, + "logicalID": 1033, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6193,7 +6193,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/2" }, "lookupClasses": [ @@ -6207,8 +6207,8 @@ "scope": 0 }, { - "logicalID": 1038, - "state": 1, + "logicalID": 1035, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6228,7 +6228,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/3" }, "lookupClasses": [ @@ -6242,8 +6242,8 @@ "scope": 0 }, { - "logicalID": 1039, - "state": 1, + "logicalID": 1034, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6263,7 +6263,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/4" }, "lookupClasses": [ @@ -6277,8 +6277,8 @@ "scope": 0 }, { - "logicalID": 1024, - "state": 1, + "logicalID": 1028, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6298,7 +6298,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/5" }, "lookupClasses": [ @@ -6312,8 +6312,8 @@ "scope": 0 }, { - "logicalID": 1025, - "state": 1, + "logicalID": 1029, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6333,7 +6333,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/6" }, "lookupClasses": [ @@ -6347,8 +6347,8 @@ "scope": 0 }, { - "logicalID": 1026, - "state": 1, + "logicalID": 1030, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6368,7 +6368,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/7" }, "lookupClasses": [ @@ -6382,8 +6382,8 @@ "scope": 0 }, { - "logicalID": 1027, - "state": 1, + "logicalID": 1024, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6403,7 +6403,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/21/8" }, "lookupClasses": [ @@ -6417,8 +6417,8 @@ "scope": 0 }, { - "logicalID": 1028, - "state": 1, + "logicalID": 1026, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6438,7 +6438,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/1" }, "lookupClasses": [ @@ -6452,8 +6452,8 @@ "scope": 0 }, { - "logicalID": 1029, - "state": 1, + "logicalID": 1031, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6473,7 +6473,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/2" }, "lookupClasses": [ @@ -6487,8 +6487,8 @@ "scope": 0 }, { - "logicalID": 1030, - "state": 1, + "logicalID": 1027, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6508,7 +6508,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/3" }, "lookupClasses": [ @@ -6522,8 +6522,8 @@ "scope": 0 }, { - "logicalID": 1031, - "state": 1, + "logicalID": 1025, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -6543,7 +6543,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/4" }, "lookupClasses": [ @@ -6768,7 +6768,7 @@ }, { "logicalID": 2055, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -6788,7 +6788,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/41/1" }, "lookupClasses": [ @@ -6803,7 +6803,7 @@ }, { "logicalID": 2056, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -6823,7 +6823,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "eth1/46/1" + }, "lookupClasses": [ @@ -6873,7 +6873,7 @@ }, { "logicalID": 2058, - "state": 2, + "state": 1, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -6893,7 +6893,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - "2": "eth1/45/1" + }, "lookupClasses": [ @@ -7502,8 +7502,8 @@ "scope": 1 }, { - "logicalID": 3160, - "state": 1, + "logicalID": 3162, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7523,7 +7523,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/5" }, "lookupClasses": [ @@ -7537,8 +7537,8 @@ "scope": 0 }, { - "logicalID": 3161, - "state": 1, + "logicalID": 3163, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7558,7 +7558,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/6" }, "lookupClasses": [ @@ -7572,8 +7572,8 @@ "scope": 0 }, { - "logicalID": 3162, - "state": 1, + "logicalID": 3160, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7593,7 +7593,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/7" }, "lookupClasses": [ @@ -7607,8 +7607,8 @@ "scope": 0 }, { - "logicalID": 3163, - "state": 1, + "logicalID": 3161, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7628,7 +7628,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/23/8" }, "lookupClasses": [ @@ -7642,8 +7642,8 @@ "scope": 0 }, { - "logicalID": 3164, - "state": 1, + "logicalID": 3165, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7663,7 +7663,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/1" }, "lookupClasses": [ @@ -7677,8 +7677,8 @@ "scope": 0 }, { - "logicalID": 3165, - "state": 1, + "logicalID": 3167, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7698,7 +7698,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/2" }, "lookupClasses": [ @@ -7713,7 +7713,7 @@ }, { "logicalID": 3166, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7733,7 +7733,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/3" }, "lookupClasses": [ @@ -7747,8 +7747,8 @@ "scope": 0 }, { - "logicalID": 3167, - "state": 1, + "logicalID": 3164, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7768,7 +7768,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/4" }, "lookupClasses": [ @@ -7782,8 +7782,8 @@ "scope": 0 }, { - "logicalID": 3152, - "state": 1, + "logicalID": 3154, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7803,7 +7803,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/5" }, "lookupClasses": [ @@ -7817,8 +7817,8 @@ "scope": 0 }, { - "logicalID": 3153, - "state": 1, + "logicalID": 3155, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7838,7 +7838,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/6" }, "lookupClasses": [ @@ -7852,8 +7852,8 @@ "scope": 0 }, { - "logicalID": 3154, - "state": 1, + "logicalID": 3152, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7873,7 +7873,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/7" }, "lookupClasses": [ @@ -7887,8 +7887,8 @@ "scope": 0 }, { - "logicalID": 3155, - "state": 1, + "logicalID": 3153, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7908,7 +7908,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/8" }, "lookupClasses": [ @@ -7922,8 +7922,8 @@ "scope": 0 }, { - "logicalID": 3156, - "state": 1, + "logicalID": 3157, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7943,7 +7943,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/1" }, "lookupClasses": [ @@ -7957,8 +7957,8 @@ "scope": 0 }, { - "logicalID": 3157, - "state": 1, + "logicalID": 3159, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -7978,7 +7978,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/2" }, "lookupClasses": [ @@ -7993,7 +7993,7 @@ }, { "logicalID": 3158, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8013,7 +8013,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/3" }, "lookupClasses": [ @@ -8027,8 +8027,8 @@ "scope": 0 }, { - "logicalID": 3159, - "state": 1, + "logicalID": 3156, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8048,7 +8048,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/4" }, "lookupClasses": [ @@ -8062,8 +8062,8 @@ "scope": 0 }, { - "logicalID": 3184, - "state": 1, + "logicalID": 3186, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8083,7 +8083,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/5" }, "lookupClasses": [ @@ -8097,8 +8097,8 @@ "scope": 0 }, { - "logicalID": 3185, - "state": 1, + "logicalID": 3187, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8118,7 +8118,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/6" }, "lookupClasses": [ @@ -8132,8 +8132,8 @@ "scope": 0 }, { - "logicalID": 3186, - "state": 1, + "logicalID": 3184, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8153,7 +8153,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/7" }, "lookupClasses": [ @@ -8167,8 +8167,8 @@ "scope": 0 }, { - "logicalID": 3187, - "state": 1, + "logicalID": 3185, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8188,7 +8188,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/26/8" }, "lookupClasses": [ @@ -8202,8 +8202,8 @@ "scope": 0 }, { - "logicalID": 3188, - "state": 1, + "logicalID": 3189, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8223,7 +8223,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/1" }, "lookupClasses": [ @@ -8237,8 +8237,8 @@ "scope": 0 }, { - "logicalID": 3189, - "state": 1, + "logicalID": 3191, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8258,7 +8258,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/2" }, "lookupClasses": [ @@ -8272,8 +8272,8 @@ "scope": 0 }, { - "logicalID": 3190, - "state": 1, + "logicalID": 3188, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8293,7 +8293,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/3" }, "lookupClasses": [ @@ -8307,8 +8307,8 @@ "scope": 0 }, { - "logicalID": 3191, - "state": 1, + "logicalID": 3190, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8328,7 +8328,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/4" }, "lookupClasses": [ @@ -8342,8 +8342,8 @@ "scope": 0 }, { - "logicalID": 3176, - "state": 1, + "logicalID": 3181, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8363,7 +8363,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/5" }, "lookupClasses": [ @@ -8377,8 +8377,8 @@ "scope": 0 }, { - "logicalID": 3177, - "state": 1, + "logicalID": 3180, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8398,7 +8398,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/6" }, "lookupClasses": [ @@ -8412,8 +8412,8 @@ "scope": 0 }, { - "logicalID": 3178, - "state": 1, + "logicalID": 3176, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8433,7 +8433,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/7" }, "lookupClasses": [ @@ -8447,8 +8447,8 @@ "scope": 0 }, { - "logicalID": 3179, - "state": 1, + "logicalID": 3182, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8468,7 +8468,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/25/8" }, "lookupClasses": [ @@ -8482,8 +8482,8 @@ "scope": 0 }, { - "logicalID": 3180, - "state": 1, + "logicalID": 3183, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8503,7 +8503,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/1" }, "lookupClasses": [ @@ -8517,8 +8517,8 @@ "scope": 0 }, { - "logicalID": 3181, - "state": 1, + "logicalID": 3178, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8538,7 +8538,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/2" }, "lookupClasses": [ @@ -8552,8 +8552,8 @@ "scope": 0 }, { - "logicalID": 3182, - "state": 1, + "logicalID": 3179, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8573,7 +8573,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/3" }, "lookupClasses": [ @@ -8587,8 +8587,8 @@ "scope": 0 }, { - "logicalID": 3183, - "state": 1, + "logicalID": 3177, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8608,7 +8608,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/4" }, "lookupClasses": [ @@ -8622,8 +8622,8 @@ "scope": 0 }, { - "logicalID": 3168, - "state": 1, + "logicalID": 3175, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8643,7 +8643,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/5" }, "lookupClasses": [ @@ -8657,8 +8657,8 @@ "scope": 0 }, { - "logicalID": 3169, - "state": 1, + "logicalID": 3173, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8678,7 +8678,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/6" }, "lookupClasses": [ @@ -8692,8 +8692,8 @@ "scope": 0 }, { - "logicalID": 3170, - "state": 1, + "logicalID": 3174, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8713,7 +8713,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/7" }, "lookupClasses": [ @@ -8727,8 +8727,8 @@ "scope": 0 }, { - "logicalID": 3171, - "state": 1, + "logicalID": 3172, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8748,7 +8748,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/22/8" }, "lookupClasses": [ @@ -8762,8 +8762,8 @@ "scope": 0 }, { - "logicalID": 3172, - "state": 1, + "logicalID": 3170, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8783,7 +8783,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/1" }, "lookupClasses": [ @@ -8797,8 +8797,8 @@ "scope": 0 }, { - "logicalID": 3173, - "state": 1, + "logicalID": 3168, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8818,7 +8818,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/2" }, "lookupClasses": [ @@ -8832,8 +8832,8 @@ "scope": 0 }, { - "logicalID": 3174, - "state": 1, + "logicalID": 3169, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8853,7 +8853,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/3" }, "lookupClasses": [ @@ -8867,8 +8867,8 @@ "scope": 0 }, { - "logicalID": 3175, - "state": 1, + "logicalID": 3171, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8888,7 +8888,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/24/4" }, "lookupClasses": [ @@ -8902,8 +8902,8 @@ "scope": 0 }, { - "logicalID": 3208, - "state": 1, + "logicalID": 3211, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8923,7 +8923,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/5" }, "lookupClasses": [ @@ -8937,8 +8937,8 @@ "scope": 0 }, { - "logicalID": 3209, - "state": 1, + "logicalID": 3210, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8958,7 +8958,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/6" }, "lookupClasses": [ @@ -8972,8 +8972,8 @@ "scope": 0 }, { - "logicalID": 3210, - "state": 1, + "logicalID": 3209, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -8993,7 +8993,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/7" }, "lookupClasses": [ @@ -9007,8 +9007,8 @@ "scope": 0 }, { - "logicalID": 3211, - "state": 1, + "logicalID": 3208, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9028,7 +9028,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/8" }, "lookupClasses": [ @@ -9042,8 +9042,8 @@ "scope": 0 }, { - "logicalID": 3212, - "state": 1, + "logicalID": 3215, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9063,7 +9063,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/1" }, "lookupClasses": [ @@ -9078,7 +9078,7 @@ }, { "logicalID": 3213, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9098,7 +9098,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/2" }, "lookupClasses": [ @@ -9113,7 +9113,7 @@ }, { "logicalID": 3214, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9133,7 +9133,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/3" }, "lookupClasses": [ @@ -9147,8 +9147,8 @@ "scope": 0 }, { - "logicalID": 3215, - "state": 1, + "logicalID": 3212, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9168,7 +9168,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/4" }, "lookupClasses": [ @@ -9182,8 +9182,8 @@ "scope": 0 }, { - "logicalID": 3200, - "state": 1, + "logicalID": 3202, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9203,7 +9203,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/5" }, "lookupClasses": [ @@ -9217,8 +9217,8 @@ "scope": 0 }, { - "logicalID": 3201, - "state": 1, + "logicalID": 3203, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9238,7 +9238,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/6" }, "lookupClasses": [ @@ -9252,8 +9252,8 @@ "scope": 0 }, { - "logicalID": 3202, - "state": 1, + "logicalID": 3200, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9273,7 +9273,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/7" }, "lookupClasses": [ @@ -9287,8 +9287,8 @@ "scope": 0 }, { - "logicalID": 3203, - "state": 1, + "logicalID": 3201, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9308,7 +9308,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/8" }, "lookupClasses": [ @@ -9322,8 +9322,8 @@ "scope": 0 }, { - "logicalID": 3204, - "state": 1, + "logicalID": 3205, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9343,7 +9343,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/1" }, "lookupClasses": [ @@ -9357,8 +9357,8 @@ "scope": 0 }, { - "logicalID": 3205, - "state": 1, + "logicalID": 3207, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9378,7 +9378,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/2" }, "lookupClasses": [ @@ -9392,8 +9392,8 @@ "scope": 0 }, { - "logicalID": 3206, - "state": 1, + "logicalID": 3204, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9413,7 +9413,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/3" }, "lookupClasses": [ @@ -9427,8 +9427,8 @@ "scope": 0 }, { - "logicalID": 3207, - "state": 1, + "logicalID": 3206, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9448,7 +9448,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/4" }, "lookupClasses": [ @@ -9462,8 +9462,8 @@ "scope": 0 }, { - "logicalID": 3192, - "state": 1, + "logicalID": 3198, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9483,7 +9483,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/5" }, "lookupClasses": [ @@ -9497,8 +9497,8 @@ "scope": 0 }, { - "logicalID": 3193, - "state": 1, + "logicalID": 3192, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9518,7 +9518,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/6" }, "lookupClasses": [ @@ -9532,8 +9532,8 @@ "scope": 0 }, { - "logicalID": 3194, - "state": 1, + "logicalID": 3196, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9553,7 +9553,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/7" }, "lookupClasses": [ @@ -9567,8 +9567,8 @@ "scope": 0 }, { - "logicalID": 3195, - "state": 1, + "logicalID": 3197, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9588,7 +9588,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/27/8" }, "lookupClasses": [ @@ -9602,8 +9602,8 @@ "scope": 0 }, { - "logicalID": 3196, - "state": 1, + "logicalID": 3194, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9623,7 +9623,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/1" }, "lookupClasses": [ @@ -9637,8 +9637,8 @@ "scope": 0 }, { - "logicalID": 3197, - "state": 1, + "logicalID": 3193, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9658,7 +9658,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/2" }, "lookupClasses": [ @@ -9672,8 +9672,8 @@ "scope": 0 }, { - "logicalID": 3198, - "state": 1, + "logicalID": 3195, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9693,7 +9693,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/3" }, "lookupClasses": [ @@ -9708,7 +9708,7 @@ }, { "logicalID": 3199, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9728,7 +9728,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/29/4" }, "lookupClasses": [ @@ -9742,8 +9742,8 @@ "scope": 0 }, { - "logicalID": 3216, - "state": 1, + "logicalID": 3218, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9763,7 +9763,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/5" }, "lookupClasses": [ @@ -9777,8 +9777,8 @@ "scope": 0 }, { - "logicalID": 3217, - "state": 1, + "logicalID": 3219, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9798,7 +9798,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/6" }, "lookupClasses": [ @@ -9812,8 +9812,8 @@ "scope": 0 }, { - "logicalID": 3218, - "state": 1, + "logicalID": 3221, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9833,7 +9833,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/7" }, "lookupClasses": [ @@ -9847,8 +9847,8 @@ "scope": 0 }, { - "logicalID": 3219, - "state": 1, + "logicalID": 3223, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9868,7 +9868,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/28/8" }, "lookupClasses": [ @@ -9883,7 +9883,7 @@ }, { "logicalID": 3220, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9903,7 +9903,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/1" }, "lookupClasses": [ @@ -9917,8 +9917,8 @@ "scope": 0 }, { - "logicalID": 3221, - "state": 1, + "logicalID": 3217, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9938,7 +9938,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/2" }, "lookupClasses": [ @@ -9953,7 +9953,7 @@ }, { "logicalID": 3222, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -9973,7 +9973,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/3" }, "lookupClasses": [ @@ -9987,8 +9987,8 @@ "scope": 0 }, { - "logicalID": 3223, - "state": 1, + "logicalID": 3216, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10008,7 +10008,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/30/4" }, "lookupClasses": [ @@ -10022,8 +10022,8 @@ "scope": 0 }, { - "logicalID": 3224, - "state": 1, + "logicalID": 3227, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10043,7 +10043,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/5" }, "lookupClasses": [ @@ -10057,8 +10057,8 @@ "scope": 0 }, { - "logicalID": 3225, - "state": 1, + "logicalID": 3231, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10078,7 +10078,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/6" }, "lookupClasses": [ @@ -10093,7 +10093,7 @@ }, { "logicalID": 3226, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10113,7 +10113,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/7" }, "lookupClasses": [ @@ -10127,8 +10127,8 @@ "scope": 0 }, { - "logicalID": 3227, - "state": 1, + "logicalID": 3225, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10148,7 +10148,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/31/8" }, "lookupClasses": [ @@ -10163,7 +10163,7 @@ }, { "logicalID": 3228, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10183,7 +10183,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/1" }, "lookupClasses": [ @@ -10198,7 +10198,7 @@ }, { "logicalID": 3229, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10218,7 +10218,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/2" }, "lookupClasses": [ @@ -10233,7 +10233,7 @@ }, { "logicalID": 3230, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10253,7 +10253,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/3" }, "lookupClasses": [ @@ -10267,8 +10267,8 @@ "scope": 0 }, { - "logicalID": 3231, - "state": 1, + "logicalID": 3224, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10288,7 +10288,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/4" }, "lookupClasses": [ @@ -10302,8 +10302,8 @@ "scope": 0 }, { - "logicalID": 3144, - "state": 1, + "logicalID": 3147, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10323,7 +10323,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/5" }, "lookupClasses": [ @@ -10337,8 +10337,8 @@ "scope": 0 }, { - "logicalID": 3145, - "state": 1, + "logicalID": 3148, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10358,7 +10358,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/6" }, "lookupClasses": [ @@ -10372,8 +10372,8 @@ "scope": 0 }, { - "logicalID": 3146, - "state": 1, + "logicalID": 3145, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10393,7 +10393,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/7" }, "lookupClasses": [ @@ -10407,8 +10407,8 @@ "scope": 0 }, { - "logicalID": 3147, - "state": 1, + "logicalID": 3144, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10428,7 +10428,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/32/8" }, "lookupClasses": [ @@ -10442,8 +10442,8 @@ "scope": 0 }, { - "logicalID": 3148, - "state": 1, + "logicalID": 3150, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10463,7 +10463,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/1" }, "lookupClasses": [ @@ -10477,8 +10477,8 @@ "scope": 0 }, { - "logicalID": 3149, - "state": 1, + "logicalID": 3151, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10498,7 +10498,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/2" }, "lookupClasses": [ @@ -10512,8 +10512,8 @@ "scope": 0 }, { - "logicalID": 3150, - "state": 1, + "logicalID": 3149, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10533,7 +10533,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/3" }, "lookupClasses": [ @@ -10547,8 +10547,8 @@ "scope": 0 }, { - "logicalID": 3151, - "state": 1, + "logicalID": 3146, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -10568,7 +10568,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/4" }, "lookupClasses": [ @@ -10582,7 +10582,7 @@ "scope": 0 }, { - "logicalID": 3120, + "logicalID": 3124, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10617,7 +10617,7 @@ "scope": 0 }, { - "logicalID": 3121, + "logicalID": 3126, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10652,7 +10652,7 @@ "scope": 0 }, { - "logicalID": 3122, + "logicalID": 3127, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10687,7 +10687,7 @@ "scope": 0 }, { - "logicalID": 3123, + "logicalID": 3125, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10722,7 +10722,7 @@ "scope": 0 }, { - "logicalID": 3124, + "logicalID": 3121, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10757,7 +10757,7 @@ "scope": 0 }, { - "logicalID": 3125, + "logicalID": 3120, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10792,7 +10792,7 @@ "scope": 0 }, { - "logicalID": 3126, + "logicalID": 3123, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10827,7 +10827,7 @@ "scope": 0 }, { - "logicalID": 3127, + "logicalID": 3122, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10862,7 +10862,7 @@ "scope": 0 }, { - "logicalID": 3128, + "logicalID": 3134, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10897,7 +10897,7 @@ "scope": 0 }, { - "logicalID": 3129, + "logicalID": 3132, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10932,7 +10932,7 @@ "scope": 0 }, { - "logicalID": 3130, + "logicalID": 3133, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -10967,7 +10967,7 @@ "scope": 0 }, { - "logicalID": 3131, + "logicalID": 3135, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11002,7 +11002,7 @@ "scope": 0 }, { - "logicalID": 3132, + "logicalID": 3128, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11037,7 +11037,7 @@ "scope": 0 }, { - "logicalID": 3133, + "logicalID": 3131, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11072,7 +11072,7 @@ "scope": 0 }, { - "logicalID": 3134, + "logicalID": 3130, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11107,7 +11107,7 @@ "scope": 0 }, { - "logicalID": 3135, + "logicalID": 3129, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11142,8 +11142,8 @@ "scope": 0 }, { - "logicalID": 3136, - "state": 1, + "logicalID": 3139, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11163,7 +11163,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/5" }, "lookupClasses": [ @@ -11177,8 +11177,8 @@ "scope": 0 }, { - "logicalID": 3137, - "state": 1, + "logicalID": 3143, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11198,7 +11198,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/6" }, "lookupClasses": [ @@ -11212,8 +11212,8 @@ "scope": 0 }, { - "logicalID": 3138, - "state": 1, + "logicalID": 3137, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11233,7 +11233,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/7" }, "lookupClasses": [ @@ -11247,8 +11247,8 @@ "scope": 0 }, { - "logicalID": 3139, - "state": 1, + "logicalID": 3138, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11268,7 +11268,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/33/8" }, "lookupClasses": [ @@ -11283,7 +11283,7 @@ }, { "logicalID": 3140, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11303,7 +11303,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/1" }, "lookupClasses": [ @@ -11318,7 +11318,7 @@ }, { "logicalID": 3141, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11338,7 +11338,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/2" }, "lookupClasses": [ @@ -11353,7 +11353,7 @@ }, { "logicalID": 3142, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11373,7 +11373,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/3" }, "lookupClasses": [ @@ -11387,8 +11387,8 @@ "scope": 0 }, { - "logicalID": 3143, - "state": 1, + "logicalID": 3136, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11408,7 +11408,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/35/4" }, "lookupClasses": [ @@ -11422,8 +11422,8 @@ "scope": 0 }, { - "logicalID": 3112, - "state": 1, + "logicalID": 3118, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11443,7 +11443,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/5" }, "lookupClasses": [ @@ -11457,8 +11457,8 @@ "scope": 0 }, { - "logicalID": 3113, - "state": 1, + "logicalID": 3112, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11478,7 +11478,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/6" }, "lookupClasses": [ @@ -11492,8 +11492,8 @@ "scope": 0 }, { - "logicalID": 3114, - "state": 1, + "logicalID": 3117, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11513,7 +11513,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/7" }, "lookupClasses": [ @@ -11527,8 +11527,8 @@ "scope": 0 }, { - "logicalID": 3115, - "state": 1, + "logicalID": 3114, + "state": 2, "minFrameSize": 64, "maxFrameSize": 0, "parserType": 1, @@ -11548,7 +11548,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "fab1/34/8" }, "lookupClasses": [ @@ -11562,7 +11562,7 @@ "scope": 0 }, { - "logicalID": 3116, + "logicalID": 3113, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11597,7 +11597,7 @@ "scope": 0 }, { - "logicalID": 3117, + "logicalID": 3116, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11632,7 +11632,7 @@ "scope": 0 }, { - "logicalID": 3118, + "logicalID": 3119, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11667,7 +11667,7 @@ "scope": 0 }, { - "logicalID": 3119, + "logicalID": 3115, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11702,7 +11702,7 @@ "scope": 0 }, { - "logicalID": 3104, + "logicalID": 3110, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11737,7 +11737,7 @@ "scope": 0 }, { - "logicalID": 3105, + "logicalID": 3108, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11772,7 +11772,7 @@ "scope": 0 }, { - "logicalID": 3106, + "logicalID": 3109, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11807,7 +11807,7 @@ "scope": 0 }, { - "logicalID": 3107, + "logicalID": 3111, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11842,7 +11842,7 @@ "scope": 0 }, { - "logicalID": 3108, + "logicalID": 3104, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11877,7 +11877,7 @@ "scope": 0 }, { - "logicalID": 3109, + "logicalID": 3105, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11912,7 +11912,7 @@ "scope": 0 }, { - "logicalID": 3110, + "logicalID": 3106, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11947,7 +11947,7 @@ "scope": 0 }, { - "logicalID": 3111, + "logicalID": 3107, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -11982,7 +11982,7 @@ "scope": 0 }, { - "logicalID": 3096, + "logicalID": 3100, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12017,7 +12017,7 @@ "scope": 0 }, { - "logicalID": 3097, + "logicalID": 3102, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12052,7 +12052,7 @@ "scope": 0 }, { - "logicalID": 3098, + "logicalID": 3103, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12087,7 +12087,7 @@ "scope": 0 }, { - "logicalID": 3099, + "logicalID": 3101, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12122,7 +12122,7 @@ "scope": 0 }, { - "logicalID": 3100, + "logicalID": 3097, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12157,7 +12157,7 @@ "scope": 0 }, { - "logicalID": 3101, + "logicalID": 3096, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12192,7 +12192,7 @@ "scope": 0 }, { - "logicalID": 3102, + "logicalID": 3098, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12227,7 +12227,7 @@ "scope": 0 }, { - "logicalID": 3103, + "logicalID": 3099, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12262,7 +12262,7 @@ "scope": 0 }, { - "logicalID": 3088, + "logicalID": 3090, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12332,7 +12332,7 @@ "scope": 0 }, { - "logicalID": 3090, + "logicalID": 3094, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12402,7 +12402,7 @@ "scope": 0 }, { - "logicalID": 3092, + "logicalID": 3088, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12437,7 +12437,7 @@ "scope": 0 }, { - "logicalID": 3093, + "logicalID": 3095, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12472,7 +12472,7 @@ "scope": 0 }, { - "logicalID": 3094, + "logicalID": 3092, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -12507,7 +12507,7 @@ "scope": 0 }, { - "logicalID": 3095, + "logicalID": 3093, "state": 1, "minFrameSize": 64, "maxFrameSize": 0, @@ -13137,7 +13137,7 @@ "scope": 1 }, { - "intfID": 2066, + "intfID": 18, "routerID": 0, "vlanID": 0, "ipAddresses": [ @@ -13151,7 +13151,7 @@ "scope": 1 }, { - "intfID": 2068, + "intfID": 19, "routerID": 0, "vlanID": 0, "ipAddresses": [ @@ -13163,6 +13163,34 @@ "isStateSyncDisabled": true, "type": 2, "scope": 1 + }, + { + "intfID": 20, + "routerID": 0, + "vlanID": 0, + "ipAddresses": [ + "2402::/64", + "12.0.0.0/24" + ], + "mtu": 9000, + "isVirtual": false, + "isStateSyncDisabled": true, + "type": 2, + "scope": 1 + }, + { + "intfID": 21, + "routerID": 0, + "vlanID": 0, + "ipAddresses": [ + "2403::/64", + "13.0.0.0/24" + ], + "mtu": 9000, + "isVirtual": false, + "isStateSyncDisabled": true, + "type": 2, + "scope": 1 } ], "arpTimeoutSeconds": 60, @@ -13219,6 +13247,56 @@ "actionType": 1, "etherType": 34525 }, + { + "icmpType": 133, + "name": "cpuPolicing-high-ndp-router-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 134, + "name": "cpuPolicing-high-ndp-router-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 135, + "name": "cpuPolicing-high-ndp-neighbor-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 136, + "name": "cpuPolicing-high-ndp-neighbor-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 137, + "name": "cpuPolicing-high-ndp-redirect", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, { "proto": 6, "name": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", @@ -13412,6 +13490,66 @@ } } }, + { + "matcher": "cpuPolicing-high-ndp-router-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-router-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-redirect", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 0, + "setTc": { + "tcValue": 7 + } + } + }, { "matcher": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", "action": { @@ -13559,10 +13697,6 @@ ] }, "rxReasonToQueueOrderedList": [ - { - "rxReason": 8, - "queueId": 7 - }, { "rxReason": 2, "queueId": 2 @@ -13574,10 +13708,6 @@ { "rxReason": 6, "queueId": 0 - }, - { - "rxReason": 14, - "queueId": 0 } ] }, @@ -13862,7 +13992,7 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", "soc_family.BCM8889X": "BCM8889X", diff --git a/fboss/oss/link_test_configs/meru800bia.materialized_JSON b/fboss/oss/link_test_configs/meru800bia.materialized_JSON index 5ffe8161e60ad..fd8f9b650219d 100644 --- a/fboss/oss/link_test_configs/meru800bia.materialized_JSON +++ b/fboss/oss/link_test_configs/meru800bia.materialized_JSON @@ -7337,6 +7337,56 @@ "actionType": 1, "etherType": 34525 }, + { + "icmpType": 133, + "name": "cpuPolicing-high-ndp-router-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 134, + "name": "cpuPolicing-high-ndp-router-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 135, + "name": "cpuPolicing-high-ndp-neighbor-solicit", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 136, + "name": "cpuPolicing-high-ndp-neighbor-advertisement", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, + { + "icmpType": 137, + "name": "cpuPolicing-high-ndp-redirect", + "actionType": 1, + "ttl": { + "value": 255, + "mask": 255 + }, + "etherType": 34525 + }, { "proto": 6, "name": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", @@ -7548,6 +7598,66 @@ } } }, + { + "matcher": "cpuPolicing-high-ndp-router-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-router-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-solicit", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-neighbor-advertisement", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, + { + "matcher": "cpuPolicing-high-ndp-redirect", + "action": { + "sendToQueue": { + "queueId": 7 + }, + "toCpuAction": 1, + "setTc": { + "tcValue": 7 + } + } + }, { "matcher": "cpuPolicing-high-BGPSrcPort-dstLocalIp4", "action": { @@ -7695,10 +7805,6 @@ ] }, "rxReasonToQueueOrderedList": [ - { - "rxReason": 8, - "queueId": 7 - }, { "rxReason": 2, "queueId": 3 @@ -7710,10 +7816,6 @@ { "rxReason": 6, "queueId": 0 - }, - { - "rxReason": 14, - "queueId": 0 } ] }, @@ -7870,9 +7972,6 @@ "fabric_connectivity_based_on_integrity": "0", "fabric_distributed_system_enable": "1", "fail_on_unsupported_attribute": "1", - "fw_auto_isolation_arm_core_to_use.0": "5", - "fw_auto_isolation_image_filename.0": "/tmp/db/jericho3ai_a0/BCM8889X_fi.elf", - "fw_auto_isolation_log_filename.0": "/tmp/edk_fi.log", "l3_ecmp_max_group_size": "512", "lane_to_serdes_map_fabric_lane0.BCM8889X": "rx0:tx5", "lane_to_serdes_map_fabric_lane1.BCM8889X": "rx1:tx3", @@ -8915,7 +9014,7 @@ "sai_pkt_rx_custom_cfg": "1", "sai_pkt_rx_pkt_size": "16512", "sai_recycle_port_lane_base": "440", - "sai_trigger_linkscan_remote_local_faults": "0", + "sai_trigger_linkscan_remote_local_faults": "1", "sai_voq_wm_latency_enable": "1", "sat_enable.BCM8889X_ADAPTER": "1", "soc_family.BCM8889X": "BCM8889X", diff --git a/fboss/oss/link_test_configs/tahan800bc.materialized_JSON b/fboss/oss/link_test_configs/tahan800bc.materialized_JSON index b85b57f569d1b..612627993b6c2 100644 --- a/fboss/oss/link_test_configs/tahan800bc.materialized_JSON +++ b/fboss/oss/link_test_configs/tahan800bc.materialized_JSON @@ -2252,7 +2252,7 @@ }, { "logicalID": 65, - "state": 1, + "state": 2, "minFrameSize": 64, "maxFrameSize": 9412, "parserType": 1, @@ -2272,7 +2272,7 @@ "sFlowEgressRate": 0, "loopbackMode": 0, "expectedLLDPValues": { - + "2": "eth1/33/1" }, "lookupClasses": [ diff --git a/fboss/oss/production_features/asic_production_features.materialized_JSON b/fboss/oss/production_features/asic_production_features.materialized_JSON index eb971bb518ff0..892ad4c64dc8b 100644 --- a/fboss/oss/production_features/asic_production_features.materialized_JSON +++ b/fboss/oss/production_features/asic_production_features.materialized_JSON @@ -27,7 +27,8 @@ 38, 39, 41, - 40 + 40, + 44 ], "jericho2": [ 2, @@ -82,7 +83,8 @@ 39, 41, 40, - 42 + 42, + 45 ], "ramon": [ 1 @@ -112,7 +114,8 @@ 35, 36, 37, - 41 + 41, + 44 ], "tomahawk3": [ 2, @@ -148,7 +151,8 @@ 38, 39, 40, - 42 + 42, + 44 ], "tomahawk4": [ 2, @@ -183,7 +187,8 @@ 39, 40, 42, - 43 + 43, + 44 ], "tomahawk5": [ 2, @@ -216,7 +221,8 @@ 38, 39, 40, - 42 + 42, + 44 ], "yuba": [ 2, @@ -246,7 +252,8 @@ 40, 7, 25, - 42 + 42, + 44 ] }, "asicToFeatureNames": { @@ -277,7 +284,8 @@ "HGRID_DU_ROUTE_SCALE", "HGRID_UU_ROUTE_SCALE", "TH_ALPM_ROUTE_SCALE", - "HUNDRED_THOUSAND_ROUTE_SCALE" + "HUNDRED_THOUSAND_ROUTE_SCALE", + "VLAN" ], "jericho2": [ "CPU_RX_TX", @@ -332,7 +340,8 @@ "HGRID_UU_ROUTE_SCALE", "TH_ALPM_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", - "PFC" + "PFC", + "PORT_MTU_ERROR_TRAP" ], "ramon": [ "FABRIC" @@ -362,7 +371,8 @@ "EGRESS_MIRRORING", "RSW_ROUTE_SCALE", "FSW_ROUTE_SCALE", - "TH_ALPM_ROUTE_SCALE" + "TH_ALPM_ROUTE_SCALE", + "VLAN" ], "tomahawk3": [ "CPU_RX_TX", @@ -398,7 +408,8 @@ "HGRID_DU_ROUTE_SCALE", "HGRID_UU_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", - "PFC" + "PFC", + "VLAN" ], "tomahawk4": [ "CPU_RX_TX", @@ -433,7 +444,8 @@ "HGRID_UU_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", "PFC", - "UDF_WR_IMMEDIATE_ACL" + "UDF_WR_IMMEDIATE_ACL", + "VLAN" ], "tomahawk5": [ "CPU_RX_TX", @@ -466,7 +478,8 @@ "HGRID_DU_ROUTE_SCALE", "HGRID_UU_ROUTE_SCALE", "HUNDRED_THOUSAND_ROUTE_SCALE", - "PFC" + "PFC", + "VLAN" ], "yuba": [ "CPU_RX_TX", @@ -496,7 +509,8 @@ "HUNDRED_THOUSAND_ROUTE_SCALE", "PRBS", "MAC_LEARNING", - "PFC" + "PFC", + "VLAN" ] } } \ No newline at end of file diff --git a/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON b/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON index c755a69dd96c3..1548e15a09c7e 100644 --- a/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON +++ b/fboss/oss/qsfp_known_bad_tests/fboss_qsfp_known_bad_tests.materialized_JSON @@ -257,9 +257,6 @@ }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "PhyIOTest.phyIOStats$" } ], "elbert_8x16Q/physdk-credo-0.8.4/credo-0.8.4": [ @@ -277,9 +274,6 @@ }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "PhyIOTest.phyIOStats$" } ], "fuji_5x16Q/physdk-barchetta2-5.2/barchetta2-5.2": [ @@ -308,7 +302,7 @@ "test_name_regex": "HwXphyPortInfoTest.*$" }, { - "test_name_regex": "HwPortPrbsTest.*$" + "test_name_regex": "HwPortPrbsTest.*._true.SetPrbs$" }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" @@ -499,9 +493,6 @@ { "test_name_regex": "HwTransceiverConfigValidationTest.validateAllActiveTransceivers$" }, - { - "test_name_regex": "HwTest.cmisPageChange$" - }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" } @@ -637,14 +628,8 @@ { "test_name_regex": "HwTransceiverConfigValidationTest.validateAllActiveTransceivers$" }, - { - "test_name_regex": "HwTest_PROFILE_400G_8_PAM4_RS544X2N_COPPER.TestProfile$" - }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "HwTest_PROFILE_10G_1_NRZ_NOFEC_OPTICAL.TestProfile$" } ], "wedge400/physdk-credo-0.8.4/credo-0.8.4": [ @@ -660,14 +645,8 @@ { "test_name_regex": "HwTransceiverConfigValidationTest.validateAllActiveTransceivers$" }, - { - "test_name_regex": "HwTest_PROFILE_400G_8_PAM4_RS544X2N_COPPER.TestProfile$" - }, { "test_name_regex": "HwTransceiverResetTest.verifyResetControl$" - }, - { - "test_name_regex": "HwTest_PROFILE_10G_1_NRZ_NOFEC_OPTICAL.TestProfile$" } ], "wedge400c/physdk-credo-0.7.2/credo-0.7.2": [ diff --git a/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON b/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON index a1d63c78b2d51..bc51bf035ceb5 100644 --- a/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON +++ b/fboss/oss/qsfp_test_configs/janga800bic.materialized_JSON @@ -2,7 +2,8 @@ "defaultCommandLineArgs": { "firmware_upgrade_supported": "true", "mode": "janga800bic", - "multi_npu_platform_mapping": "true" + "multi_npu_platform_mapping": "true", + "remediation_enabled": "false" }, "transceiverConfigOverrides": [ @@ -10,48 +11,598 @@ "qsfpTestConfig": { "cabledPortPairs": [ { - "aPortName": "eth1/45/1", - "zPortName": "eth1/46/1", + "aPortName": "eth1/2/5", + "zPortName": "eth1/1/1", "profileID": 38 }, { - "aPortName": "fab1/3/1", - "zPortName": "fab1/4/1", + "aPortName": "eth1/1/5", + "zPortName": "eth1/2/1", + "profileID": 38 + }, + { + "aPortName": "eth1/41/1", + "zPortName": "eth1/44/1", + "profileID": 22 + }, + { + "aPortName": "fab1/7/1", + "zPortName": "fab1/6/5", + "profileID": 42 + }, + { + "aPortName": "fab1/8/1", + "zPortName": "fab1/7/5", + "profileID": 42 + }, + { + "aPortName": "fab1/9/1", + "zPortName": "fab1/8/5", + "profileID": 42 + }, + { + "aPortName": "fab1/10/1", + "zPortName": "fab1/9/5", + "profileID": 42 + }, + { + "aPortName": "fab1/11/1", + "zPortName": "fab1/10/5", + "profileID": 42 + }, + { + "aPortName": "fab1/12/1", + "zPortName": "fab1/11/5", + "profileID": 42 + }, + { + "aPortName": "fab1/13/1", + "zPortName": "fab1/12/5", + "profileID": 42 + }, + { + "aPortName": "fab1/14/1", + "zPortName": "fab1/13/5", + "profileID": 42 + }, + { + "aPortName": "fab1/15/1", + "zPortName": "fab1/14/5", + "profileID": 42 + }, + { + "aPortName": "fab1/16/1", + "zPortName": "fab1/15/5", + "profileID": 42 + }, + { + "aPortName": "fab1/17/1", + "zPortName": "fab1/16/5", + "profileID": 42 + }, + { + "aPortName": "fab1/18/1", + "zPortName": "fab1/17/5", + "profileID": 42 + }, + { + "aPortName": "fab1/19/1", + "zPortName": "fab1/18/5", + "profileID": 42 + }, + { + "aPortName": "fab1/20/1", + "zPortName": "fab1/19/5", + "profileID": 42 + }, + { + "aPortName": "fab1/21/1", + "zPortName": "fab1/20/5", + "profileID": 42 + }, + { + "aPortName": "fab1/22/1", + "zPortName": "fab1/21/5", + "profileID": 42 + }, + { + "aPortName": "fab1/23/1", + "zPortName": "fab1/22/5", + "profileID": 42 + }, + { + "aPortName": "fab1/24/1", + "zPortName": "fab1/23/5", + "profileID": 42 + }, + { + "aPortName": "fab1/25/1", + "zPortName": "fab1/24/5", + "profileID": 42 + }, + { + "aPortName": "fab1/26/1", + "zPortName": "fab1/25/5", + "profileID": 42 + }, + { + "aPortName": "fab1/27/1", + "zPortName": "fab1/26/5", + "profileID": 42 + }, + { + "aPortName": "fab1/28/1", + "zPortName": "fab1/27/5", + "profileID": 42 + }, + { + "aPortName": "fab1/29/1", + "zPortName": "fab1/28/5", + "profileID": 42 + }, + { + "aPortName": "fab1/30/1", + "zPortName": "fab1/29/5", + "profileID": 42 + }, + { + "aPortName": "fab1/31/1", + "zPortName": "fab1/30/5", + "profileID": 42 + }, + { + "aPortName": "fab1/32/1", + "zPortName": "fab1/31/5", + "profileID": 42 + }, + { + "aPortName": "fab1/33/1", + "zPortName": "fab1/32/5", + "profileID": 42 + }, + { + "aPortName": "fab1/34/1", + "zPortName": "fab1/33/5", + "profileID": 42 + }, + { + "aPortName": "fab1/35/1", + "zPortName": "fab1/34/5", + "profileID": 42 + }, + { + "aPortName": "fab1/7/2", + "zPortName": "fab1/6/6", + "profileID": 42 + }, + { + "aPortName": "fab1/8/2", + "zPortName": "fab1/7/6", + "profileID": 42 + }, + { + "aPortName": "fab1/9/2", + "zPortName": "fab1/8/6", + "profileID": 42 + }, + { + "aPortName": "fab1/10/2", + "zPortName": "fab1/9/6", + "profileID": 42 + }, + { + "aPortName": "fab1/11/2", + "zPortName": "fab1/10/6", + "profileID": 42 + }, + { + "aPortName": "fab1/12/2", + "zPortName": "fab1/11/6", + "profileID": 42 + }, + { + "aPortName": "fab1/13/2", + "zPortName": "fab1/12/6", + "profileID": 42 + }, + { + "aPortName": "fab1/14/2", + "zPortName": "fab1/13/6", + "profileID": 42 + }, + { + "aPortName": "fab1/15/2", + "zPortName": "fab1/14/6", + "profileID": 42 + }, + { + "aPortName": "fab1/16/2", + "zPortName": "fab1/15/6", + "profileID": 42 + }, + { + "aPortName": "fab1/17/2", + "zPortName": "fab1/16/6", + "profileID": 42 + }, + { + "aPortName": "fab1/18/2", + "zPortName": "fab1/17/6", + "profileID": 42 + }, + { + "aPortName": "fab1/19/2", + "zPortName": "fab1/18/6", + "profileID": 42 + }, + { + "aPortName": "fab1/20/2", + "zPortName": "fab1/19/6", + "profileID": 42 + }, + { + "aPortName": "fab1/21/2", + "zPortName": "fab1/20/6", + "profileID": 42 + }, + { + "aPortName": "fab1/22/2", + "zPortName": "fab1/21/6", + "profileID": 42 + }, + { + "aPortName": "fab1/23/2", + "zPortName": "fab1/22/6", + "profileID": 42 + }, + { + "aPortName": "fab1/24/2", + "zPortName": "fab1/23/6", + "profileID": 42 + }, + { + "aPortName": "fab1/25/2", + "zPortName": "fab1/24/6", + "profileID": 42 + }, + { + "aPortName": "fab1/26/2", + "zPortName": "fab1/25/6", + "profileID": 42 + }, + { + "aPortName": "fab1/27/2", + "zPortName": "fab1/26/6", + "profileID": 42 + }, + { + "aPortName": "fab1/28/2", + "zPortName": "fab1/27/6", + "profileID": 42 + }, + { + "aPortName": "fab1/29/2", + "zPortName": "fab1/28/6", + "profileID": 42 + }, + { + "aPortName": "fab1/30/2", + "zPortName": "fab1/29/6", + "profileID": 42 + }, + { + "aPortName": "fab1/31/2", + "zPortName": "fab1/30/6", + "profileID": 42 + }, + { + "aPortName": "fab1/32/2", + "zPortName": "fab1/31/6", + "profileID": 42 + }, + { + "aPortName": "fab1/33/2", + "zPortName": "fab1/32/6", + "profileID": 42 + }, + { + "aPortName": "fab1/34/2", + "zPortName": "fab1/33/6", + "profileID": 42 + }, + { + "aPortName": "fab1/35/2", + "zPortName": "fab1/34/6", + "profileID": 42 + }, + { + "aPortName": "fab1/7/3", + "zPortName": "fab1/6/7", + "profileID": 42 + }, + { + "aPortName": "fab1/8/3", + "zPortName": "fab1/7/7", + "profileID": 42 + }, + { + "aPortName": "fab1/9/3", + "zPortName": "fab1/8/7", + "profileID": 42 + }, + { + "aPortName": "fab1/10/3", + "zPortName": "fab1/9/7", + "profileID": 42 + }, + { + "aPortName": "fab1/11/3", + "zPortName": "fab1/10/7", + "profileID": 42 + }, + { + "aPortName": "fab1/12/3", + "zPortName": "fab1/11/7", + "profileID": 42 + }, + { + "aPortName": "fab1/13/3", + "zPortName": "fab1/12/7", + "profileID": 42 + }, + { + "aPortName": "fab1/14/3", + "zPortName": "fab1/13/7", + "profileID": 42 + }, + { + "aPortName": "fab1/15/3", + "zPortName": "fab1/14/7", + "profileID": 42 + }, + { + "aPortName": "fab1/16/3", + "zPortName": "fab1/15/7", + "profileID": 42 + }, + { + "aPortName": "fab1/17/3", + "zPortName": "fab1/16/7", + "profileID": 42 + }, + { + "aPortName": "fab1/18/3", + "zPortName": "fab1/17/7", + "profileID": 42 + }, + { + "aPortName": "fab1/19/3", + "zPortName": "fab1/18/7", + "profileID": 42 + }, + { + "aPortName": "fab1/20/3", + "zPortName": "fab1/19/7", + "profileID": 42 + }, + { + "aPortName": "fab1/21/3", + "zPortName": "fab1/20/7", + "profileID": 42 + }, + { + "aPortName": "fab1/22/3", + "zPortName": "fab1/21/7", + "profileID": 42 + }, + { + "aPortName": "fab1/23/3", + "zPortName": "fab1/22/7", + "profileID": 42 + }, + { + "aPortName": "fab1/24/3", + "zPortName": "fab1/23/7", + "profileID": 42 + }, + { + "aPortName": "fab1/25/3", + "zPortName": "fab1/24/7", + "profileID": 42 + }, + { + "aPortName": "fab1/26/3", + "zPortName": "fab1/25/7", + "profileID": 42 + }, + { + "aPortName": "fab1/27/3", + "zPortName": "fab1/26/7", + "profileID": 42 + }, + { + "aPortName": "fab1/28/3", + "zPortName": "fab1/27/7", + "profileID": 42 + }, + { + "aPortName": "fab1/29/3", + "zPortName": "fab1/28/7", + "profileID": 42 + }, + { + "aPortName": "fab1/30/3", + "zPortName": "fab1/29/7", + "profileID": 42 + }, + { + "aPortName": "fab1/31/3", + "zPortName": "fab1/30/7", + "profileID": 42 + }, + { + "aPortName": "fab1/32/3", + "zPortName": "fab1/31/7", + "profileID": 42 + }, + { + "aPortName": "fab1/33/3", + "zPortName": "fab1/32/7", + "profileID": 42 + }, + { + "aPortName": "fab1/34/3", + "zPortName": "fab1/33/7", + "profileID": 42 + }, + { + "aPortName": "fab1/35/3", + "zPortName": "fab1/34/7", + "profileID": 42 + }, + { + "aPortName": "fab1/7/4", + "zPortName": "fab1/6/8", + "profileID": 42 + }, + { + "aPortName": "fab1/8/4", + "zPortName": "fab1/7/8", + "profileID": 42 + }, + { + "aPortName": "fab1/9/4", + "zPortName": "fab1/8/8", + "profileID": 42 + }, + { + "aPortName": "fab1/10/4", + "zPortName": "fab1/9/8", + "profileID": 42 + }, + { + "aPortName": "fab1/11/4", + "zPortName": "fab1/10/8", + "profileID": 42 + }, + { + "aPortName": "fab1/12/4", + "zPortName": "fab1/11/8", + "profileID": 42 + }, + { + "aPortName": "fab1/13/4", + "zPortName": "fab1/12/8", + "profileID": 42 + }, + { + "aPortName": "fab1/14/4", + "zPortName": "fab1/13/8", + "profileID": 42 + }, + { + "aPortName": "fab1/15/4", + "zPortName": "fab1/14/8", + "profileID": 42 + }, + { + "aPortName": "fab1/16/4", + "zPortName": "fab1/15/8", + "profileID": 42 + }, + { + "aPortName": "fab1/17/4", + "zPortName": "fab1/16/8", + "profileID": 42 + }, + { + "aPortName": "fab1/18/4", + "zPortName": "fab1/17/8", + "profileID": 42 + }, + { + "aPortName": "fab1/19/4", + "zPortName": "fab1/18/8", + "profileID": 42 + }, + { + "aPortName": "fab1/20/4", + "zPortName": "fab1/19/8", + "profileID": 42 + }, + { + "aPortName": "fab1/21/4", + "zPortName": "fab1/20/8", + "profileID": 42 + }, + { + "aPortName": "fab1/22/4", + "zPortName": "fab1/21/8", + "profileID": 42 + }, + { + "aPortName": "fab1/23/4", + "zPortName": "fab1/22/8", + "profileID": 42 + }, + { + "aPortName": "fab1/24/4", + "zPortName": "fab1/23/8", + "profileID": 42 + }, + { + "aPortName": "fab1/25/4", + "zPortName": "fab1/24/8", + "profileID": 42 + }, + { + "aPortName": "fab1/26/4", + "zPortName": "fab1/25/8", + "profileID": 42 + }, + { + "aPortName": "fab1/27/4", + "zPortName": "fab1/26/8", + "profileID": 42 + }, + { + "aPortName": "fab1/28/4", + "zPortName": "fab1/27/8", "profileID": 42 }, { - "aPortName": "fab1/3/2", - "zPortName": "fab1/4/2", + "aPortName": "fab1/29/4", + "zPortName": "fab1/28/8", "profileID": 42 }, { - "aPortName": "fab1/3/3", - "zPortName": "fab1/4/3", + "aPortName": "fab1/30/4", + "zPortName": "fab1/29/8", "profileID": 42 }, { - "aPortName": "fab1/3/4", - "zPortName": "fab1/4/4", + "aPortName": "fab1/31/4", + "zPortName": "fab1/30/8", "profileID": 42 }, { - "aPortName": "fab1/3/5", - "zPortName": "fab1/4/5", + "aPortName": "fab1/32/4", + "zPortName": "fab1/31/8", "profileID": 42 }, { - "aPortName": "fab1/3/6", - "zPortName": "fab1/4/6", + "aPortName": "fab1/33/4", + "zPortName": "fab1/32/8", "profileID": 42 }, { - "aPortName": "fab1/3/7", - "zPortName": "fab1/4/7", + "aPortName": "fab1/34/4", + "zPortName": "fab1/33/8", "profileID": 42 }, { - "aPortName": "fab1/3/8", - "zPortName": "fab1/4/8", + "aPortName": "fab1/35/4", + "zPortName": "fab1/34/8", "profileID": 42 } ] diff --git a/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON b/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON index c01bde25e8bf8..b052d896a6403 100644 --- a/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON +++ b/fboss/oss/qsfp_test_configs/tahan800bc.materialized_JSON @@ -1,7 +1,8 @@ { "defaultCommandLineArgs": { "firmware_upgrade_supported": "true", - "mode": "tahan800bc" + "mode": "tahan800bc", + "remediation_enabled": "false" }, "transceiverConfigOverrides": [ @@ -28,6 +29,26 @@ "zPortName": "eth1/6/5", "profileID": 38 }, + { + "aPortName": "eth1/13/1", + "zPortName": "eth1/14/1", + "profileID": 38 + }, + { + "aPortName": "eth1/13/5", + "zPortName": "eth1/14/5", + "profileID": 38 + }, + { + "aPortName": "eth1/22/1", + "zPortName": "eth1/23/1", + "profileID": 38 + }, + { + "aPortName": "eth1/22/5", + "zPortName": "eth1/23/5", + "profileID": 38 + }, { "aPortName": "eth1/27/1", "zPortName": "eth1/30/1", @@ -47,6 +68,11 @@ "aPortName": "eth1/31/5", "zPortName": "eth1/32/5", "profileID": 38 + }, + { + "aPortName": "eth1/33/1", + "zPortName": "eth1/33/1", + "profileID": 23 } ] }, diff --git a/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON b/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON index 8f8b4ffd9e4c0..0ea44a616b8b1 100644 --- a/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON +++ b/fboss/oss/qsfp_unsupported_tests/fboss_qsfp_unsupported_tests.materialized_JSON @@ -2392,6 +2392,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "janga800bic/physdk-credo-0.8.4/credo-0.8.4": [ @@ -2565,6 +2568,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "meru400bfu/physdk-credo-0.7.2/credo-0.7.2": [ @@ -3296,6 +3302,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -3475,6 +3484,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -3654,6 +3666,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -3827,6 +3842,9 @@ { "test_name_regex": "PhyIOTest.phyIOStats$" }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" + }, { "test_name_regex": "HwTest_PROFILE_DEFAULT.TestProfile$" }, @@ -4295,6 +4313,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "montblanc/physdk-credo-0.8.4/credo-0.8.4": [ @@ -4465,6 +4486,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "morgan800cc/physdk-credo-0.7.2/credo-0.7.2": [ @@ -4632,6 +4656,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "morgan800cc/physdk-credo-0.8.4/credo-0.8.4": [ @@ -4799,6 +4826,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "tahan800bc/physdk-credo-0.7.2/credo-0.7.2": [ @@ -4895,9 +4925,6 @@ { "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_COPPER.TestProfile$" }, - { - "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_OPTICAL.TestProfile$" - }, { "test_name_regex": "HwTest_PROFILE_200G_4_PAM4_RS544X2N_COPPER.TestProfile$" }, @@ -4972,6 +4999,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "tahan800bc/physdk-credo-0.8.4/credo-0.8.4": [ @@ -5068,9 +5098,6 @@ { "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_COPPER.TestProfile$" }, - { - "test_name_regex": "HwTest_PROFILE_100G_4_NRZ_RS528_OPTICAL.TestProfile$" - }, { "test_name_regex": "HwTest_PROFILE_200G_4_PAM4_RS544X2N_COPPER.TestProfile$" }, @@ -5145,6 +5172,9 @@ }, { "test_name_regex": "HwTest_PROFILE_100G_1_PAM4_NOFEC_COPPER.TestProfile$" + }, + { + "test_name_regex": "HwStateMachineTest.CheckTransceiverRemediated$" } ], "wedge100s/physdk-credo-0.7.2/credo-0.7.2": [ diff --git a/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON b/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON index 0e0a85da15dac..58aff04fb06b8 100644 --- a/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON +++ b/fboss/oss/sai_hw_unsupported_tests/sai_hw_unsupported_tests.materialized_JSON @@ -2009,59 +2009,6 @@ "test_name_regex": "HwAclCounterTest/[01].VerifyCounterBumpOnBthOpcodeHitFrontPanel$" } ], - "leaba/24.6.1_yuba/24.6.1_yuba/graphene200": [ - { - "test_name_regex": "HwFlowletAclCounterTest.*$" - }, - { - "test_name_regex": "HwFlowletSwitching.*$" - }, - { - "test_name_regex": "HwEcmpFlowletSwitching.*$" - }, - { - "test_name_regex": "HwLoadBalancerTestV6Flowlet.*$" - }, - { - "test_name_regex": "HwLoadBalancerTestV6EcmpToFlowlet.*$" - }, - { - "test_name_regex": "AgentFlowletSwitchingTest.*$" - }, - { - "test_name_regex": "HwTeFlowTest.*$" - }, - { - "test_name_regex": "HwTeFlowTrafficTest.*$" - }, - { - "test_name_regex": "HwUdfAcl.*$" - }, - { - "test_name_regex": "roundtrip.trunk_2_preprod_2_trunk.*HwTest_PROFILE_400G_8_PAM4_RS544X2N_COPPER" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*SaiQPHRollbackTest.rollback" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentQueuePerHostTest/[0123].*" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentQueuePerHostRouteTest/[01].*" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentQueuePerHostL2Test.*" - }, - { - "test_name_regex": "roundtrip.preprod_2_trunk_2_preprod.*AgentAclPriorityTest/[0].*" - }, - { - "test_name_regex": "HwAclCounterTest/[01].*$" - }, - { - "test_name_regex": "HwAclCounterTest/[01].VerifyCounterBumpOnBthOpcodeHitFrontPanel$" - } - ], "leaba/24.8.3001/24.8.3001/gibraltar": [ { "test_name_regex": "HwFlowletAclCounterTest.*$" diff --git a/fboss/oss/scripts/docker-build.py b/fboss/oss/scripts/docker-build.py index d18267d735ed1..dc7a98adb74d0 100755 --- a/fboss/oss/scripts/docker-build.py +++ b/fboss/oss/scripts/docker-build.py @@ -17,13 +17,14 @@ OPT_ARG_NO_DOCKER_OUTPUT = "--no-docker-output" OPT_ARG_NO_SYSTEM_DEPS = "--no-system-deps" OPT_ARG_ADD_BUILD_ENV_VAR = "--env-var" +OPT_ARG_LOCAL = "--local" FBOSS_IMAGE_NAME = "fboss_image" FBOSS_CONTAINER_NAME = "FBOSS_BUILD_CONTAINER" CONTAINER_SCRATCH_PATH = "/var/FBOSS/tmp_bld_dir" -def get_linux_type() -> tuple[str | None, str | None, str | None]: +def get_linux_type() -> tuple[Optional[str], Optional[str], Optional[str]]: try: with open("/etc/os-release") as f: data = f.read() @@ -138,6 +139,13 @@ def parse_args(): "This is particularly useful as some CMake targets are hidden behind flags, e.g. BUILD_SAI_FAKE=1" ), ) + parser.add_argument( + OPT_ARG_LOCAL, + required=False, + help="Compiles using the local clone of the FBOSS git repository. By default, a separate clone of the repository with the head commit is used.", + default=False, + action="store_true", + ) return parser.parse_args() @@ -162,8 +170,18 @@ def build_docker_image(docker_dir_path: str): f"Attempting to build docker image from {docker_dir_path}/Dockerfile. You can run `sudo tail -f {log_path}` in order to follow along." ) with os.fdopen(fd, "w") as output: + dockerfile_path = os.path.join(docker_dir_path, "Dockerfile") cp = subprocess.run( - ["sudo", "docker", "build", docker_dir_path, "-t", FBOSS_IMAGE_NAME], + [ + "sudo", + "docker", + "build", + ".", + "-t", + FBOSS_IMAGE_NAME, + "-f", + dockerfile_path, + ], stdout=output, stderr=subprocess.STDOUT, ) @@ -175,10 +193,11 @@ def build_docker_image(docker_dir_path: str): def run_fboss_build( scratch_path: str, - target: str | None, + target: Optional[str], docker_output: bool, use_system_deps: bool, env_vars: list[str], + use_local: bool, ): cmd_args = ["sudo", "docker", "run"] # Add build environment variables, if any. @@ -216,6 +235,8 @@ def run_fboss_build( if target is not None: build_cmd.append("--cmake-target") build_cmd.append(target) + if use_local: + build_cmd.extend(["--src-dir", "."]) build_cmd.append("fboss") cmd_args.extend(build_cmd) build_cp = subprocess.run(cmd_args) @@ -267,6 +288,7 @@ def main(): args.docker_output, args.use_system_deps, args.env_vars, + args.local, ) cleanup_fboss_build_container() diff --git a/fboss/oss/scripts/github_actions/docker-unittest.py b/fboss/oss/scripts/github_actions/docker-unittest.py index 7a7d201c7a06c..0e3ce4f733723 100755 --- a/fboss/oss/scripts/github_actions/docker-unittest.py +++ b/fboss/oss/scripts/github_actions/docker-unittest.py @@ -35,8 +35,18 @@ def build_docker_image(docker_dir_path: str): f"Attempting to build docker image from {docker_dir_path}/Dockerfile. You can run `sudo tail -f {log_path}` in order to follow along." ) with os.fdopen(fd, "w") as output: + dockerfile_path = os.path.join(docker_dir_path, "Dockerfile") cp = subprocess.run( - ["sudo", "docker", "build", docker_dir_path, "-t", FBOSS_IMAGE_NAME], + [ + "sudo", + "docker", + "build", + ".", + "-t", + FBOSS_IMAGE_NAME, + "-f", + dockerfile_path, + ], stdout=output, stderr=subprocess.STDOUT, ) diff --git a/fboss/oss/scripts/package-fboss.py b/fboss/oss/scripts/package-fboss.py index 4b1342aa8f4af..8889208e76a6d 100755 --- a/fboss/oss/scripts/package-fboss.py +++ b/fboss/oss/scripts/package-fboss.py @@ -4,6 +4,7 @@ import argparse import glob import os +import pathlib import shutil import subprocess import tempfile @@ -90,8 +91,28 @@ def _get_dir_for(self, name, location): .split("\n")[-1] ) + def get_fboss_subdirectory(self, path_suffix: str) -> str: + candidate = os.path.join(self.git_path, path_suffix) + # Check if this directory exists. Under certain conditions, this + # directory might be missing, such as cases where the build was done + # from a local checkout of the code. + if not os.path.isdir(candidate): + # If the run_scripts_path does not exist, attempt to locate the run + # scripts via a relative path based on location of package-fboss.py + # fboss/oss/scripts/package-fboss.py four parents up should take us + # to the root of the repository + fboss_root_path = pathlib.Path( + __file__ + ).parent.parent.parent.parent.resolve() + candidate = os.path.join(fboss_root_path, path_suffix) + if os.path.isdir(candidate): + return candidate + else: + raise RuntimeError(f"Could not find directory for {path_suffix}") + def _copy_run_scripts(self, tmp_dir_name): - run_scripts_path = os.path.join(self.git_path, "fboss/oss/scripts/run_scripts") + run_scripts_path = self.get_fboss_subdirectory("fboss/oss/scripts/run_scripts") + src_files = os.listdir(run_scripts_path) for file_name in src_files: full_file_name = os.path.join(run_scripts_path, file_name) @@ -100,7 +121,8 @@ def _copy_run_scripts(self, tmp_dir_name): shutil.copy(full_file_name, script_pkg_path) def _copy_run_configs(self, tmp_dir_name): - run_configs_path = os.path.join(self.git_path, "fboss/oss/scripts/run_configs") + run_configs_path = self.get_fboss_subdirectory("fboss/oss/scripts/run_configs") + src_files = os.listdir(run_configs_path) for file_name in src_files: full_file_name = os.path.join(run_configs_path, file_name) diff --git a/fboss/oss/scripts/run_configs/j3b/fruid.json b/fboss/oss/scripts/run_configs/j3b/fruid.json new file mode 100644 index 0000000000000..3ae1a335499df --- /dev/null +++ b/fboss/oss/scripts/run_configs/j3b/fruid.json @@ -0,0 +1,28 @@ +{ + "Resources": [], + "Actions": [], + "Information": { + "CRC8": "0x0", + "Product Part Number": "", + "PCB Manufacturer": "", + "Product Sub-Version": "3", + "Facebook PCB Part Number": "", + "Product Name": "Meru800biab", + "Local MAC": "80:A2:35:F4:FE:5B", + "Facebook PCBA Part Number": "", + "Extended MAC Address Size": "138", + "Location on Fabric": "", + "ODM PCBA Part Number": "", + "Assembled At": "", + "System Assembly Part Number": "", + "Version": "3", + "Product Version": "6", + "System Manufacturing Date": "06-21-19", + "Product Serial Number": "", + "ODM PCBA Serial Number": "", + "Extended MAC Base": "80:A2:35:F4:FE:5C", + "System Manufacturer": "", + "Product Production State": "4", + "Product Asset Tag": "" + } +} diff --git a/fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz b/fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz new file mode 100644 index 0000000000000..0723a27338505 Binary files /dev/null and b/fboss/oss/stable_commits/github_hashes_10212024_124153.tar.gz differ diff --git a/fboss/oss/stable_commits/latest_stable_hashes.tar.gz b/fboss/oss/stable_commits/latest_stable_hashes.tar.gz index e9d686058287d..cb0961ecaffed 120000 --- a/fboss/oss/stable_commits/latest_stable_hashes.tar.gz +++ b/fboss/oss/stable_commits/latest_stable_hashes.tar.gz @@ -1 +1 @@ -github_hashes_09102024_085602.tar.gz \ No newline at end of file +github_hashes_10212024_124153.tar.gz \ No newline at end of file diff --git a/fboss/platform/BUILD_MODE.bzl b/fboss/platform/BUILD_MODE.bzl deleted file mode 100644 index 09b603dc92448..0000000000000 --- a/fboss/platform/BUILD_MODE.bzl +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2004-present, Facebook, Inc. - -""" build mode definitions for fboss/platform """ - -load("@fbcode_macros//build_defs:create_build_mode.bzl", "create_build_mode") - -_extra_asan_options = { - "detect_leaks": "1", -} - -_mode = create_build_mode( - asan_options = _extra_asan_options, -) - -_modes = { - "dbg": _mode, - "dbgo": _mode, - "dev": _mode, - "opt": _mode, -} - -def get_modes(): - """ Return modes for this hierarchy """ - return _modes diff --git a/fboss/platform/bsp_tests/tests/test_i2c.py b/fboss/platform/bsp_tests/tests/test_i2c.py index 82c434e610fdf..9c7ec04276c4a 100644 --- a/fboss/platform/bsp_tests/tests/test_i2c.py +++ b/fboss/platform/bsp_tests/tests/test_i2c.py @@ -141,6 +141,7 @@ def run_i2c_test_transactions_concurrent(device: I2CDevice, busNum: int) -> None def run_i2c_dump_test(device: I2CDevice, busNum: int) -> None: if not device.testData: return + # pyre-fixme[16]: Optional type has no attribute `i2cDumpData`. for tc in device.testData.i2cDumpData: output = run_cmd( [ @@ -161,6 +162,7 @@ def run_i2c_dump_test(device: I2CDevice, busNum: int) -> None: def run_i2c_get_test(device: I2CDevice, busNum: int) -> None: if not device.testData: return + # pyre-fixme[16]: Optional type has no attribute `i2cGetData`. for tc in device.testData.i2cGetData: output = i2cget(str(busNum), device.address, tc.reg) assert ( @@ -171,6 +173,7 @@ def run_i2c_get_test(device: I2CDevice, busNum: int) -> None: def run_i2c_set_test(device: I2CDevice, busNum: int) -> None: if not device.testData: return + # pyre-fixme[16]: Optional type has no attribute `i2cSetData`. for tc in device.testData.i2cSetData: original = i2cget(str(busNum), device.address, tc.reg) diff --git a/fboss/platform/bsp_tests/tests/test_xcvr.py b/fboss/platform/bsp_tests/tests/test_xcvr.py index 0429b1736ddb0..166d201582fff 100644 --- a/fboss/platform/bsp_tests/tests/test_xcvr.py +++ b/fboss/platform/bsp_tests/tests/test_xcvr.py @@ -21,6 +21,8 @@ def test_xcvr_names(platform_fpgas) -> None: def test_xcvr_creates_sysfs_files(platform_fpgas, platform_config) -> None: platform = platform_config.platform if platform == "meru800bfa" or platform == "meru800bia": + # pyre-fixme[29]: `_WithException[typing.Any, + # typing.Type[_pytest.outcomes.Skipped]]` is not a function. pytest.skip("DSF fails xcvr test currently.") fpgaDirMap = find_fpga_dirs(platform_fpgas) for fpga in platform_fpgas: diff --git a/fboss/platform/config_lib/BUCK b/fboss/platform/config_lib/BUCK index 1b1ef130e7fde..f8adfe1394f9b 100644 --- a/fboss/platform/config_lib/BUCK +++ b/fboss/platform/config_lib/BUCK @@ -14,10 +14,10 @@ cpp_binary( "//fboss/platform/data_corral_service/if:led_manager-cpp2-types", "//fboss/platform/fan_service:utils", "//fboss/platform/fan_service/if:fan_service-cpp2-types", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-types", "//fboss/platform/fw_util/if:fw_util_config-cpp2-types", "//fboss/platform/platform_manager:config_validator", "//fboss/platform/platform_manager:platform_manager_config-cpp2-types", + "//fboss/platform/sensor_service:config_validator", "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", "//fboss/platform/weutil/if:weutil_config-cpp2-types", "//folly:file_util", diff --git a/fboss/platform/config_lib/ConfigLib.cpp b/fboss/platform/config_lib/ConfigLib.cpp index 599d49afa74da..fea567ee2e371 100644 --- a/fboss/platform/config_lib/ConfigLib.cpp +++ b/fboss/platform/config_lib/ConfigLib.cpp @@ -71,18 +71,6 @@ std::string ConfigLib::getSensorServiceConfig( #endif } -std::string ConfigLib::getFbdevdConfig( - const std::optional& platformName) const { - if (auto configJson = getConfigFromFile()) { - return *configJson; - } -#ifndef IS_OSS - return configs::fbdevd.at(getPlatformName(platformName)); -#else - throw std::runtime_error("config_file must be specified in OSS"); -#endif -} - std::string ConfigLib::getFanServiceConfig( const std::optional& platformName) const { if (auto configJson = getConfigFromFile()) { diff --git a/fboss/platform/config_lib/ConfigLib.h b/fboss/platform/config_lib/ConfigLib.h index b4f7cad48a94d..8b68895be9213 100644 --- a/fboss/platform/config_lib/ConfigLib.h +++ b/fboss/platform/config_lib/ConfigLib.h @@ -17,9 +17,6 @@ class ConfigLib { virtual std::string getSensorServiceConfig( const std::optional& platformName = std::nullopt) const; - virtual std::string getFbdevdConfig( - const std::optional& platformName = std::nullopt) const; - virtual std::string getFanServiceConfig( const std::optional& platformName = std::nullopt) const; diff --git a/fboss/platform/configs/darwin/fbdevd.json b/fboss/platform/configs/darwin/fbdevd.json deleted file mode 100644 index 67a7a3c6998a3..0000000000000 --- a/fboss/platform/configs/darwin/fbdevd.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "platformName": "Darwin", - "kmods": [ - "scd", - "scd-smbus" - ], - "bootstrap": { - "actions": [] - }, - "i2cClients": [ - { - "bus": "ROOK_SMBUS3_CH0", - "address": 96, - "deviceName": "tehama_cpld" - }, - { - "bus": "ROOK_SMBUS2_CH0", - "address": 35, - "deviceName": "blackhawk_cpld" - }, - { - "bus": "SCD_SMBUS1_CH0", - "address": 77, - "deviceName": "max6581" - }, - { - "bus": "ROOK_SMBUS0_CH0", - "address": 76, - "deviceName": "max6658" - }, - { - "bus": "ROOK_SMBUS0_CH1", - "address": 78, - "deviceName": "ucd90160" - }, - { - "bus": "ROOK_SMBUS0_CH2", - "address": 33, - "deviceName": "pmbus" - }, - { - "bus": "ROOK_SMBUS2_CH2", - "address": 17, - "deviceName": "ucd90320" - }, - { - "bus": "ROOK_SMBUS3_CH2", - "address": 72, - "deviceName": "lm73" - } - ], - "fruList": [ - { - "fruName": "PEM", - "fruState": { - "condType": 2, - "device": { - "sysfsHandle": { - "sysfsPath": "/run/devmap/fpgas/SCD_FPGA/pem_present", - "desiredValue": "0x1" - } - } - }, - "initOps": { - "actions": [] - }, - "cleanupOps": [], - "i2cClients": [ - { - "bus": "SCD_SMBUS1_CH3", - "address": 54, - "deviceName": "max11645" - }, - { - "bus": "SCD_SMBUS1_CH3", - "address": 58, - "deviceName": "amax5970" - }, - { - "bus": "SCD_SMBUS1_CH3", - "address": 76, - "deviceName": "max6658" - }, - { - "bus": "SCD_SMBUS1_CH3", - "address": 80, - "deviceName": "24c512" - } - ], - "childFruList": [] - }, - { - "fruName": "FanSpinner", - "fruState": { - "condType": 2, - "device": { - "sysfsHandle": { - "sysfsPath": "/run/devmap/fpgas/SCD_FPGA/rackmon_present", - "desiredValue": "0x1" - } - } - }, - "initOps": { - "actions": [] - }, - "cleanupOps": [], - "i2cClients": [ - { - "bus": "SCD_SMBUS1_CH4", - "address": 8, - "deviceName": "aslg4f4527" - }, - { - "bus": "SCD_SMBUS1_CH4", - "address": 80, - "deviceName": "24c512" - }, - { - "bus": "SCD_SMBUS1_CH4", - "address": 82, - "deviceName": "24c512" - }, - { - "bus": "SCD_SMBUS1_CH4", - "address": 116, - "deviceName": "pca9539" - } - ], - "childFruList": [] - } - ] - } diff --git a/fboss/platform/configs/darwin/led_manager.json b/fboss/platform/configs/darwin/led_manager.json index 55f47817a227d..e7090b64eefd9 100644 --- a/fboss/platform/configs/darwin/led_manager.json +++ b/fboss/platform/configs/darwin/led_manager.json @@ -23,32 +23,62 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan5_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan5_present", + "desiredValue": 1 + } + } }, { "fruName": "PEM1", "fruType": "PEM", - "presenceSysfsPath": "/run/devmap/fpgas/SCD_FPGA/pem_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/SCD_FPGA/pem_present", + "desiredValue": 1 + } + } } ] } diff --git a/fboss/platform/configs/darwin/sensor_service.json b/fboss/platform/configs/darwin/sensor_service.json index 1c22e1cd15796..983a207fc5e2d 100644 --- a/fboss/platform/configs/darwin/sensor_service.json +++ b/fboss/platform/configs/darwin/sensor_service.json @@ -1,7 +1,7 @@ { "pmUnitSensorsList": [ { - "slotPath": "", + "slotPath": "/", "pmUnitName": "CPU_CARD", "sensors": [ { @@ -311,8 +311,8 @@ ] }, { - "slotPath": "", - "pmUnitName": "FAN1", + "slotPath": "/FAN_SLOT@0", + "pmUnitName": "FAN", "sensors": [ { "name": "FAN1_RPM", @@ -322,13 +322,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN2", - "sensors": [ + }, { "name": "FAN2_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", @@ -337,13 +331,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN3", - "sensors": [ + }, { "name": "FAN3_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", @@ -352,13 +340,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN4", - "sensors": [ + }, { "name": "FAN4_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", @@ -367,13 +349,7 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } - } - ] - }, - { - "slotPath": "", - "pmUnitName": "FAN5", - "sensors": [ + }, { "name": "FAN5_RPM", "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan5_input", @@ -382,11 +358,20 @@ "upperCriticalVal": 25500, "lowerCriticalVal": 2600 } + }, + { + "name": "FS_FAN_RPM", + "sysfsPath": "/run/devmap/sensors/FS_FAN_SLG4F4527/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 29500, + "lowerCriticalVal": 2600 + } } ] }, { - "slotPath": "", + "slotPath": "/SCM_SLOT@0", "pmUnitName": "SWITCH_CARD", "sensors": [ { @@ -446,7 +431,7 @@ ] }, { - "slotPath": "", + "slotPath": "/PSU_SLOT@0", "pmUnitName": "PEM", "sensors": [ { @@ -535,21 +520,6 @@ "compute": "@/1000.0" } ] - }, - { - "slotPath": "", - "pmUnitName": "FanSpiner", - "sensors": [ - { - "name": "FS_FAN_RPM", - "sysfsPath": "/run/devmap/sensors/FS_FAN_SLG4F4527/fan1_input", - "type": 4, - "thresholds": { - "upperCriticalVal": 29500, - "lowerCriticalVal": 2600 - } - } - ] } ] } diff --git a/fboss/platform/configs/janga800bic/fan_service.json b/fboss/platform/configs/janga800bic/fan_service.json index da8d1e891b79c..7d0dfc60b044e 100644 --- a/fboss/platform/configs/janga800bic/fan_service.json +++ b/fboss/platform/configs/janga800bic/fan_service.json @@ -114,7 +114,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -128,7 +127,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -142,7 +140,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -156,7 +153,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -170,7 +166,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -184,7 +179,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -198,7 +192,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -212,7 +205,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -226,7 +218,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -240,7 +231,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -254,7 +244,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -268,7 +257,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -282,7 +270,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -296,7 +283,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -310,7 +296,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -324,7 +309,6 @@ "rpmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, diff --git a/fboss/platform/configs/janga800bic/sensor_service.json b/fboss/platform/configs/janga800bic/sensor_service.json index 9bb82aecaec5b..d03314e4ce6ee 100644 --- a/fboss/platform/configs/janga800bic/sensor_service.json +++ b/fboss/platform/configs/janga800bic/sensor_service.json @@ -93,93 +93,7 @@ "upperCriticalVal": 100 }, "compute": "@/1000" - } - ] - }, - { - "slotPath": "/PDB_SLOT@0", - "pmUnitName": "PDB", - "sensors": [ - { - "name": "PDB_PS1_12V_IOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 120, - "upperCriticalVal": 130 - }, - "compute": "@/1000.0" }, - { - "name": "PDB_PS1_12V_VOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 13.5, - "minAlarmVal": 10.5, - "upperCriticalVal": 14, - "lowerCriticalVal": 10 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS1_12V_TEMP", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS2_12V_IOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 120, - "upperCriticalVal": 130 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS2_12V_VOUT", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 13.2, - "minAlarmVal": 10.8, - "upperCriticalVal": 14, - "lowerCriticalVal": 10 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_PS2_12V_TEMP", - "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, - { - "name": "PDB_U1_LM75_TEMP", - "sysfsPath": "/run/devmap/sensors/PDB_U1_LM75B/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 55, - "upperCriticalVal": 60 - }, - "compute": "@/1000.0" - } - ] - }, - { - "slotPath": "/", - "pmUnitName": "SMB", - "sensors": [ { "name": "SMB_E1S_SSD_TEMP", "sysfsPath": "/run/devmap/sensors/SMB_E1S_SSD_TEMP/temp1_input", @@ -220,48 +134,6 @@ }, "compute": "@/1000.0" }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 850, - "upperCriticalVal": 870 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 0.814, - "minAlarmVal": 0.736, - "upperCriticalVal": 0.95, - "lowerCriticalVal": 0.7 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", - "type": 0, - "thresholds": { - "maxAlarmVal": 660, - "upperCriticalVal": 680 - }, - "compute": "@/1000000.0" - }, - { - "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, { "name": "SMB_U17_INNER_RIGHT_LM75_TEMP", "sysfsPath": "/run/devmap/sensors/SMB_U17_LM75B_1/temp1_input", @@ -394,48 +266,6 @@ }, "compute": "@/1000.0" }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", - "type": 2, - "thresholds": { - "maxAlarmVal": 850, - "upperCriticalVal": 870 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", - "type": 1, - "thresholds": { - "maxAlarmVal": 0.814, - "minAlarmVal": 0.736, - "upperCriticalVal": 0.95, - "lowerCriticalVal": 0.7 - }, - "compute": "@/1000.0" - }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", - "type": 0, - "thresholds": { - "maxAlarmVal": 660, - "upperCriticalVal": 680 - }, - "compute": "@/1000000.0" - }, - { - "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", - "type": 3, - "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 - }, - "compute": "@/1000.0" - }, { "name": "SMB_U353_XP12R0V_VOLT", "sysfsPath": "/run/devmap/sensors/SMB_U353_ADC128D818_3/in0_input", @@ -1176,7 +1006,92 @@ }, "compute": "(1000/3650)*@/1000.0" } - ], + ] + }, + { + "slotPath": "/PDB_SLOT@0", + "pmUnitName": "PDB", + "sensors": [ + { + "name": "PDB_PS1_12V_IOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 120, + "upperCriticalVal": 130 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS1_12V_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS1_12V_TEMP", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS2_12V_IOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 120, + "upperCriticalVal": 130 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS2_12V_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.2, + "minAlarmVal": 10.8, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_PS2_12V_TEMP", + "sysfsPath": "/run/devmap/sensors/PDB_PMBUS_BRICK_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "PDB_U1_LM75_TEMP", + "sysfsPath": "/run/devmap/sensors/PDB_U1_LM75B/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 55, + "upperCriticalVal": 60 + }, + "compute": "@/1000.0" + } + ] + }, + { + "slotPath": "/SMB_FRU_SLOT@0", + "pmUnitName": "SMB", + "sensors": [], "versionedSensors": [ { "sensors": [ @@ -1771,6 +1686,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -2298,62 +2333,174 @@ "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_1V2_HBM_1_2_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in3_input", + "name": "SMB_U347_J3B_1V2_HBM_1_2_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in3_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 1.26, + "minAlarmVal": 1.14, + "upperCriticalVal": 1.3, + "lowerCriticalVal": 1.1 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_1V2_HBM_1_2_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power3_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 50, + "upperCriticalVal": 55 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/curr4_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 51, + "upperCriticalVal": 55 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in4_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.95, + "minAlarmVal": 0.85, + "upperCriticalVal": 1, + "lowerCriticalVal": 0.8 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power4_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 63, + "upperCriticalVal": 68 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U347_J3B_1V2_HBM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp2_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", "type": 1, "thresholds": { - "maxAlarmVal": 1.26, - "minAlarmVal": 1.14, - "upperCriticalVal": 1.3, - "lowerCriticalVal": 1.1 + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 }, "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_1V2_HBM_1_2_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power3_input", + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", "type": 0, - "thresholds": { - "maxAlarmVal": 50, - "upperCriticalVal": 55 - }, "compute": "@/1000000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_IOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/curr4_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", "type": 2, "thresholds": { - "maxAlarmVal": 51, - "upperCriticalVal": 55 + "maxAlarmVal": 850, + "upperCriticalVal": 870 }, "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_VOUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/in4_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", "type": 1, "thresholds": { - "maxAlarmVal": 0.95, - "minAlarmVal": 0.85, - "upperCriticalVal": 1, - "lowerCriticalVal": 0.8 + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 }, "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_POUT", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/power4_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", "type": 0, "thresholds": { - "maxAlarmVal": 63, - "upperCriticalVal": 68 + "maxAlarmVal": 660, + "upperCriticalVal": 680 }, "compute": "@/1000000.0" }, { - "name": "SMB_U347_J3B_1V2_HBM1_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp1_input", + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", "type": 3, "thresholds": { "maxAlarmVal": 115, @@ -2362,14 +2509,22 @@ "compute": "@/1000.0" }, { - "name": "SMB_U347_J3B_XP0R9V_SW_TRVDD1_B_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_U347_XDPE12284_2/temp2_input", - "type": 3, + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, "thresholds": { - "maxAlarmVal": 115, - "upperCriticalVal": 125 + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -2969,6 +3124,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -3568,6 +3843,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -4107,6 +4502,126 @@ "upperCriticalVal": 125 }, "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_IOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U337_J3B_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U337_PMBUS_1/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_IOUT_", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/curr1_input", + "type": 2, + "thresholds": { + "maxAlarmVal": 850, + "upperCriticalVal": 870 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VOUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in2_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 0.814, + "minAlarmVal": 0.736, + "upperCriticalVal": 0.95, + "lowerCriticalVal": 0.7 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_POUT", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power2_input", + "type": 0, + "thresholds": { + "maxAlarmVal": 660, + "upperCriticalVal": 680 + }, + "compute": "@/1000000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 115, + "upperCriticalVal": 125 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/in1_input", + "type": 1, + "thresholds": { + "maxAlarmVal": 13.5, + "minAlarmVal": 10.5, + "upperCriticalVal": 14, + "lowerCriticalVal": 10 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_U177_J3A_XP0R75V_VDD_CORE_PIN", + "sysfsPath": "/run/devmap/sensors/SMB_U177_PMBUS_2/power1_input", + "type": 0, + "compute": "@/1000000.0" } ], "productProductionState": 2, @@ -5052,7 +5567,7 @@ }, { "slotPath": "/RUNBMC_SLOT@0", - "pmUnitName": "RUNBMC", + "pmUnitName": "MINERVA_BMC", "sensors": [ { "name": "BMC_U9_Thermal_Sensor_TMP1075_TEMP", diff --git a/fboss/platform/configs/meru800bfa/fw_util.json b/fboss/platform/configs/meru800bfa/fw_util.json index ef7f14e403a16..373893bda4a3c 100644 --- a/fboss/platform/configs/meru800bfa/fw_util.json +++ b/fboss/platform/configs/meru800bfa/fw_util.json @@ -53,21 +53,21 @@ }, "fan_cpld0": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable && echo 5 > /run/devmap/cplds/MERU800BFA_SMB_CPLD/jtag_mux_sel", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN0_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN0_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN0_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld0_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" }, "fan_cpld1": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable && echo 6 > /run/devmap/cplds/MERU800BFA_SMB_CPLD/jtag_mux_sel", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN1_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN1_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN1_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld1_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" }, "fan_cpld2": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable && echo 7 > /run/devmap/cplds/MERU800BFA_SMB_CPLD/jtag_mux_sel", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN2_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN2_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN2_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld2_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" diff --git a/fboss/platform/configs/meru800bfa/led_manager.json b/fboss/platform/configs/meru800bfa/led_manager.json index 06aaedc3b5319..003a552b0e9c5 100644 --- a/fboss/platform/configs/meru800bfa/led_manager.json +++ b/fboss/platform/configs/meru800bfa/led_manager.json @@ -23,82 +23,162 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD0/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN6", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN7", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN8", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD1/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN9", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN10", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN11", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN12", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD2/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU1", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu1_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu1_prsnt", + "desiredValue": 1 + } + } }, { "fruName": "PSU2", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu2_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu2_prsnt", + "desiredValue": 1 + } + } }, { "fruName": "PSU3", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu3_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu3_prsnt", + "desiredValue": 1 + } + } }, { "fruName": "PSU4", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu4_prsnt" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BFA_SMB_FPGA0/psu4_prsnt", + "desiredValue": 1 + } + } } ] -} \ No newline at end of file +} diff --git a/fboss/platform/configs/meru800bfa/sensor_service.json b/fboss/platform/configs/meru800bfa/sensor_service.json index a6047f75e5b90..7117f80eae5db 100644 --- a/fboss/platform/configs/meru800bfa/sensor_service.json +++ b/fboss/platform/configs/meru800bfa/sensor_service.json @@ -1,1259 +1,1406 @@ { - "sensorMapList": { - "SCM": { - "CPU_PACKAGE_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE0_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE1_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE2_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE3_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE4_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE5_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE6_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE7_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_ECB_VIN": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_VOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_IOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "SCM_VRM1_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_VCCIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_1V8_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM1_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_VIN": { - "path": "/run/devmap/sensors/CPU_PXE1211/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V2_VDDQ": { - "path": "/run/devmap/sensors/CPU_PXE1211/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_VNN_NAC": { - "path": "/run/devmap/sensors/CPU_PXE1211/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V0_CPU": { - "path": "/run/devmap/sensors/CPU_PXE1211/in6_input", - "thresholds": { - "upperCriticalVal": 1.2, - "lowerCriticalVal": 0.8 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_1V05_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", - "thresholds": { - "upperCriticalVal": 1.272, - "lowerCriticalVal": 0.848 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_VNN_PCH": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - } + "pmUnitSensorsList": [ + { + "slotPath": "/", + "pmUnitName": "SCM", + "sensors": [ + { + "name": "CPU_PACKAGE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_ECB_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_VOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_IOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_VCCIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_1V8_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V2_VDDQ", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_VNN_NAC", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V0_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in6_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.2, + "lowerCriticalVal": 0.8 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_1V05_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.272, + "lowerCriticalVal": 0.848 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_VNN_PCH", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + } + ] }, - "SMB": { - "SMB_BOARD_TOP_CENTER_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "R3_0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp2_input", - "thresholds": { - "upperCriticalVal": 125.0, - "maxAlarmVal": 110.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "R3_1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp3_input", - "thresholds": { - "upperCriticalVal": 125.0, - "maxAlarmVal": 110.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_REAR_RIGHT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp5_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_FRONT_RIGHT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp6_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_REAR_LEFT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp7_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_FRONT_LEFT_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp8_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_INLET_TEMP": { - "path": "/run/devmap/sensors/SMB_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_CORE_VIN": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_CORE_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in3_input", - "thresholds": { - "upperCriticalVal": 1.008, - "lowerCriticalVal": 0.504 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_CORE_TEMP": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG0_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_VOUT_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG0_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG0_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG0_TEMP_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG1_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_VOUT_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in5_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R0_ANLG1_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG1_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R0_ANLG1_TEMP_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_CORE_VIN": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_CORE_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in3_input", - "thresholds": { - "upperCriticalVal": 1.008, - "lowerCriticalVal": 0.504 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_CORE_TEMP": { - "path": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG0_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_VOUT_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG0_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG0_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG0_TEMP_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG1_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_VOUT_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_VOUT_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_VOUT_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_R3R1_ANLG1_TEMP_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG1_TEMP_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_R3R1_ANLG1_TEMP_1V8": { - "path": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_TL_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TL_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TL_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_TR_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TR_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_TR_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_BL_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BL_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BL_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM_OSFP_BR_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BR_VOUT_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM_OSFP_BR_TEMP_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_DPM_12V": { - "path": "/run/devmap/sensors/SMB_UCD90320/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_3V3_DKR": { - "path": "/run/devmap/sensors/SMB_UCD90320/in2_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_1V9_DKR": { - "path": "/run/devmap/sensors/SMB_UCD90320/in3_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_1V2_DKR": { - "path": "/run/devmap/sensors/SMB_UCD90320/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_3V3": { - "path": "/run/devmap/sensors/SMB_UCD90320/in7_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_DPM_5V0": { - "path": "/run/devmap/sensors/SMB_UCD90320/in8_input", - "thresholds": { - "upperCriticalVal": 6.0, - "lowerCriticalVal": 4.0 - }, - "compute": "@/1000.0", - "type": 1 - }, - "FAN_BOARD0_TEMP": { - "path": "/run/devmap/sensors/FAN0_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "FAN_BOARD1_TEMP": { - "path": "/run/devmap/sensors/FAN1_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "FAN_BOARD2_TEMP": { - "path": "/run/devmap/sensors/FAN2_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 95.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - } + { + "slotPath": "/SMB_SLOT@0", + "pmUnitName": "SMB", + "sensors": [ + { + "name": "SMB_BOARD_TOP_CENTER_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "R3_0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 125.0, + "maxAlarmVal": 110.0 + }, + "compute": "@/1000.0" + }, + { + "name": "R3_1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 125.0, + "maxAlarmVal": 110.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_RIGHT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_FRONT_RIGHT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_LEFT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_FRONT_LEFT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_INLET_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_CORE_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.008, + "lowerCriticalVal": 0.504 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R0_CORE/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_VOUT_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG0_TEMP_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG0/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_VOUT_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R0_ANLG1_TEMP_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R0_ANLG1/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_CORE_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_CORE_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.008, + "lowerCriticalVal": 0.504 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_R3R1_CORE/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_VOUT_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG0_TEMP_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG0/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VOUT_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VOUT_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_VOUT_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_TEMP_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_TEMP_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_R3R1_ANLG1_TEMP_1V8", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_R3R1_ANLG1/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TL_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TL_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TL_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TL/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TR_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TR_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_TR_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_TR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BL_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BL_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BL_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BL/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BR_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BR_VOUT_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM_OSFP_BR_TEMP_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OSFP_BR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_12V", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_3V3_DKR", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_1V9_DKR", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_1V2_DKR", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in7_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_DPM_5V0", + "sysfsPath": "/run/devmap/sensors/SMB_UCD90320/in8_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 6.0, + "lowerCriticalVal": 4.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD0_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN0_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD1_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN1_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD2_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN2_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 95.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN3_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN4_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD0/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN5_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN6_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN7_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN8_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD1/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN9_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN10_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN11_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN12_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD2/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + } + ] }, - "FAN1": { - "FAN1_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@0", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU1_VIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU1_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_PIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU1_POUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN2": { - "FAN2_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@1", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU2_VIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU2_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_PIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU2_POUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN3": { - "FAN3_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@2", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU3_VIN", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU3_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU3_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU3_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU3_IIN", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU3_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU3_PIN", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU3_POUT", + "sysfsPath": "/run/devmap/sensors/PSU3_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN4": { - "FAN4_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD0/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN5": { - "FAN5_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN6": { - "FAN6_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN7": { - "FAN7_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN8": { - "FAN8_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD1/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN9": { - "FAN9_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN10": { - "FAN10_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN11": { - "FAN11_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN12": { - "FAN12_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD2/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "PSU1": { - "PSU1_VIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_VOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_TEMP1": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP2": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP3": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_IIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_IOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_PIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU1_POUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU2": { - "PSU2_VIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_VOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_TEMP1": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP2": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP3": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_IIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_IOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_PIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU2_POUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU3": { - "PSU3_VIN": { - "path": "/run/devmap/sensors/PSU3_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU3_VOUT": { - "path": "/run/devmap/sensors/PSU3_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU3_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU3_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU3_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU3_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU3_TEMP1": { - "path": "/run/devmap/sensors/PSU3_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU3_TEMP2": { - "path": "/run/devmap/sensors/PSU3_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU3_TEMP3": { - "path": "/run/devmap/sensors/PSU3_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU3_IIN": { - "path": "/run/devmap/sensors/PSU3_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU3_IOUT": { - "path": "/run/devmap/sensors/PSU3_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU3_PIN": { - "path": "/run/devmap/sensors/PSU3_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU3_POUT": { - "path": "/run/devmap/sensors/PSU3_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU4": { - "PSU4_VIN": { - "path": "/run/devmap/sensors/PSU4_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU4_VOUT": { - "path": "/run/devmap/sensors/PSU4_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU4_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU4_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU4_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU4_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU4_TEMP1": { - "path": "/run/devmap/sensors/PSU4_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU4_TEMP2": { - "path": "/run/devmap/sensors/PSU4_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU4_TEMP3": { - "path": "/run/devmap/sensors/PSU4_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU4_IIN": { - "path": "/run/devmap/sensors/PSU4_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU4_IOUT": { - "path": "/run/devmap/sensors/PSU4_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU4_PIN": { - "path": "/run/devmap/sensors/PSU4_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU4_POUT": { - "path": "/run/devmap/sensors/PSU4_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@3", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU4_VIN", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU4_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU4_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU4_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU4_IIN", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU4_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU4_PIN", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU4_POUT", + "sysfsPath": "/run/devmap/sensors/PSU4_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] } - } + ] } diff --git a/fboss/platform/configs/meru800bia/fw_util.json b/fboss/platform/configs/meru800bia/fw_util.json index 09bce8a2de335..0ef146deb642b 100644 --- a/fboss/platform/configs/meru800bia/fw_util.json +++ b/fboss/platform/configs/meru800bia/fw_util.json @@ -11,21 +11,21 @@ }, "scm_cpld": { "preUpgradeCmd": "", - "getVersionCmd": "cpu_cpld_ver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_ver`));cpu_cpld_subver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_sub_ver`));echo $cpu_cpld_ver'.'$cpu_cpld_subver", + "getVersionCmd": "cat /run/devmap/fpgas/MERU_SCM_CPLD/fw_ver", "priority": 3, "upgradeCmd": "cpu_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);jam -aprogram -fmeru_cpu_cpld -v $cpu_cpld_filename", "postUpgradeCmd": "" }, "smb_fpga": { "preUpgradeCmd": "printf '0:3FFFFF image' > /home/smb_fpga_layout;modprobe spidev;fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);echo 'spidev' > /sys/bus/spi/devices/spi$fpga_spidev/driver_override;echo spi$fpga_spidev > /sys/bus/spi/drivers/spidev/bind;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev > /home/flashrom_output;(grep 'MT25QL256' /home/flashrom_output && echo 'MT25QL256' > /home/flash_chip_name) || (grep 'MX25L25635F' /home/flashrom_output && echo 'MX25L25635F/MX25L25645G' > /home/flash_chip_name) || echo 'NONE' > /home/flash_chip_name", - "getVersionCmd": "smb_fpga_ver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_ver`));smb_fpga_subver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_sub_ver`));echo $smb_fpga_ver'.'$smb_fpga_subver", + "getVersionCmd": "cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fw_ver", "priority": 2, "upgradeCmd": "smb_fpga_binary_name=$(head -n 1 /home/smb_fpga_filename.txt);fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);chip=$(head -n 1 /home/flash_chip_name);if [ $chip = 'NONE' ];then cmd_chip_option='' cmd_chip_name='';else cmd_chip_option='-c' cmd_chip_name=$chip;fi;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev $cmd_chip_option $cmd_chip_name -l /home/smb_fpga_layout -i image -w $smb_fpga_binary_name", "postUpgradeCmd": "rm /home/smb_fpga_layout; rm /home/flash_chip_name" }, "fan_cpld": { "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable", - "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/fw_ver", "priority": 1, "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", "postUpgradeCmd": "" diff --git a/fboss/platform/configs/meru800bia/led_manager.json b/fboss/platform/configs/meru800bia/led_manager.json index d48510147511f..cb6cfa2e3960a 100644 --- a/fboss/platform/configs/meru800bia/led_manager.json +++ b/fboss/platform/configs/meru800bia/led_manager.json @@ -23,32 +23,62 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU1", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU2", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present", + "desiredValue": 1 + } + } } ] -} \ No newline at end of file +} diff --git a/fboss/platform/configs/meru800bia/sensor_service.json b/fboss/platform/configs/meru800bia/sensor_service.json index 5d12ee3beee53..1d243224c56c1 100644 --- a/fboss/platform/configs/meru800bia/sensor_service.json +++ b/fboss/platform/configs/meru800bia/sensor_service.json @@ -1,679 +1,766 @@ { - "sensorMapList": { - "SCM": { - "CPU_PACKAGE_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE0_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE1_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE2_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE3_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE4_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE5_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE6_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "CPU_CORE7_TEMP": { - "path": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", - "thresholds": { - "upperCriticalVal": 100.0, - "maxAlarmVal": 90.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_ECB_VIN": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_VOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/32000.0", - "type": 1 - }, - "SCM_ECB_IOUT": { - "path": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "SCM_VRM1_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_VCCIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_VOUT_1V8_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", - "thresholds": { - "upperCriticalVal": 2.16, - "lowerCriticalVal": 1.44 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM1_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM1_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_VIN": { - "path": "/run/devmap/sensors/CPU_PXE1211/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V2_VDDQ": { - "path": "/run/devmap/sensors/CPU_PXE1211/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_VNN_NAC": { - "path": "/run/devmap/sensors/CPU_PXE1211/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_VOUT_1V0_CPU": { - "path": "/run/devmap/sensors/CPU_PXE1211/in6_input", - "thresholds": { - "upperCriticalVal": 1.2, - "lowerCriticalVal": 0.8 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM2_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM2_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXE1211/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_VIN": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_1V05_CPU": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", - "thresholds": { - "upperCriticalVal": 1.272, - "lowerCriticalVal": 0.848 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_VOUT_VNN_PCH": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.48 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SCM_VRM3_TEMP1": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SCM_VRM3_TEMP2": { - "path": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", - "thresholds": { - "upperCriticalVal": 110.0, - "maxAlarmVal": 105.0 - }, - "compute": "@/1000.0", - "type": 3 - } + "pmUnitSensorsList": [ + { + "slotPath": "/", + "pmUnitName": "SCM", + "sensors": [ + { + "name": "CPU_PACKAGE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_ECB_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_VOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_IOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_VCCIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_VOUT_1V8_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 2.16, + "lowerCriticalVal": 1.44 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM1_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_1/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V2_VDDQ", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_VNN_NAC", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_VOUT_1V0_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/in6_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.2, + "lowerCriticalVal": 0.8 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXE1211/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_1V05_CPU", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.272, + "lowerCriticalVal": 0.848 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_VOUT_VNN_PCH", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.48 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP1", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_VRM3_TEMP2", + "sysfsPath": "/run/devmap/sensors/CPU_PXM1310_2/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 110.0, + "maxAlarmVal": 105.0 + }, + "compute": "@/1000.0" + } + ] }, - "SMB": { - "SMB_BOARD_FRONT_TEMP": { - "path": "/run/devmap/sensors/SMB_TMP75_FRONT/temp1_input", - "thresholds": { - "upperCriticalVal": 85.0, - "maxAlarmVal": 80.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_BOARD_REAR_TEMP": { - "path": "/run/devmap/sensors/SMB_TMP75_REAR/temp1_input", - "thresholds": { - "upperCriticalVal": 85.0, - "maxAlarmVal": 80.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_BOARD_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp1_input", - "thresholds": { - "upperCriticalVal": 90.0, - "maxAlarmVal": 85.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_CORE_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp2_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_FAB0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp3_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_FAB1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp4_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_NIF0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp5_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_NIF1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp6_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_HBM0_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp7_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_J3_DIODE_HBM1_TEMP": { - "path": "/run/devmap/sensors/SMB_MAX6581/temp8_input", - "thresholds": { - "upperCriticalVal": 135.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "FAN_BOARD_TEMP": { - "path": "/run/devmap/sensors/FAN_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 85.0, - "maxAlarmVal": 80.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM1_VIN": { - "path": "/run/devmap/sensors/SMB_RAA228926_J3/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM1_VOUT_J3_0V85_CORE": { - "path": "/run/devmap/sensors/SMB_RAA228926_J3/in3_input", - "thresholds": { - "upperCriticalVal": 0.93, - "lowerCriticalVal": 0.62 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM1_TEMP": { - "path": "/run/devmap/sensors/SMB_RAA228926_J3/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM2_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_VOUT_J3_0V9": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in3_input", - "thresholds": { - "upperCriticalVal": 1.08, - "lowerCriticalVal": 0.72 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_VOUT_J3_0V75": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in4_input", - "thresholds": { - "upperCriticalVal": 0.9, - "lowerCriticalVal": 0.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_VOUT_J3_1V2": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/in5_input", - "thresholds": { - "upperCriticalVal": 1.44, - "lowerCriticalVal": 0.96 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM2_TEMP1": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM2_TEMP2": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/temp2_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM2_TEMP3": { - "path": "/run/devmap/sensors/SMB_ISL68226_J3/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_VRM3_VIN": { - "path": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in1_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM3_VOUT_OPTICS_3V3": { - "path": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in3_input", - "thresholds": { - "upperCriticalVal": 3.96, - "lowerCriticalVal": 2.64 - }, - "compute": "@/1000.0", - "type": 1 - }, - "SMB_VRM3_TEMP": { - "path": "/run/devmap/sensors/SMB_ISL68226_OPTICS/temp1_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 115.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "SMB_MGMT_INLET_TEMP": { - "path": "/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input", - "thresholds": { - "upperCriticalVal": 75.0, - "maxAlarmVal": 70.0 - }, - "compute": "@/1000.0", - "type": 3 - } + { + "slotPath": "/SMB_SLOT@0", + "pmUnitName": "SMB", + "sensors": [ + { + "name": "SMB_BOARD_FRONT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_FRONT/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_REAR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 90.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VOUT_J3_0V85_CORE", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.93, + "lowerCriticalVal": 0.62 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VOUT_OPTICS_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_MGMT_INLET_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 75.0, + "maxAlarmVal": 70.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN3_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN4_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + } + ] }, - "FAN1": { - "FAN1_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan1_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@0", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU1_VIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU1_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_PIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU1_POUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] }, - "FAN2": { - "FAN2_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan2_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN3": { - "FAN3_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan3_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "FAN4": { - "FAN4_RPM": { - "path": "/run/devmap/sensors/FAN_CPLD/fan4_input", - "thresholds": { - "upperCriticalVal": 14900.0, - "lowerCriticalVal": 1100.0 - }, - "type": 4 - } - }, - "PSU1": { - "PSU1_VIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_VOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU1_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU1_TEMP1": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP2": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_TEMP3": { - "path": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU1_IIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_IOUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU1_PIN": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU1_POUT": { - "path": "/run/devmap/sensors/PSU1_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } - }, - "PSU2": { - "PSU2_VIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in1_input", - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_VOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/in3_input", - "thresholds": { - "upperCriticalVal": 14.4, - "lowerCriticalVal": 9.6 - }, - "compute": "@/1000.0", - "type": 1 - }, - "PSU2_FAN1_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_FAN2_RPM": { - "path": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", - "thresholds": { - "upperCriticalVal": 25500.0, - "lowerCriticalVal": 0.0 - }, - "type": 4 - }, - "PSU2_TEMP1": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", - "thresholds": { - "upperCriticalVal": 70.0, - "maxAlarmVal": 65.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP2": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", - "thresholds": { - "upperCriticalVal": 130.0, - "maxAlarmVal": 120.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_TEMP3": { - "path": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", - "thresholds": { - "upperCriticalVal": 120.0, - "maxAlarmVal": 112.0 - }, - "compute": "@/1000.0", - "type": 3 - }, - "PSU2_IIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_IOUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", - "compute": "@/1000.0", - "type": 2 - }, - "PSU2_PIN": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power1_input", - "compute": "@/1000000.0", - "type": 0 - }, - "PSU2_POUT": { - "path": "/run/devmap/sensors/PSU2_PMBUS/power2_input", - "compute": "@/1000000.0", - "type": 0 - } + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@1", + "pmUnitName": "PSU", + "sensors": [ + { + "name": "PSU2_VIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU2_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_PIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU2_POUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] } - } + ] } diff --git a/fboss/platform/configs/meru800biab/fan_service.json b/fboss/platform/configs/meru800biab/fan_service.json new file mode 100644 index 0000000000000..aea2824093afc --- /dev/null +++ b/fboss/platform/configs/meru800biab/fan_service.json @@ -0,0 +1,124 @@ +{ + "pwmBoostOnNumDeadFan": 1, + "pwmBoostOnNumDeadSensor": 0, + "pwmBoostOnNoQsfpAfterInSec": 0, + "pwmBoostValue": 60, + "pwmTransitionValue": 50, + "pwmLowerThreshold": 30, + "pwmUpperThreshold": 100, + "optics" : [ + { + "opticName" : "osfp_group_1", + "access" : { + "accessType" : "ACCESS_TYPE_QSFP" + }, + "portList" : [], + "aggregationType" : "OPTIC_AGGREGATION_TYPE_MAX", + "tempToPwmMaps" : { + "OPTIC_TYPE_800_GENERIC" : { + "5": 43, + "69": 56, + "70": 73, + "71": 100 + } + } + } + ], + "sensors": [ + { + "sensorName": "SMB_BOARD_FRONT_TEMP", + "access": { + "accessType": "ACCESS_TYPE_THRIFT" + }, + "pwmCalcType": "SENSOR_PWM_CALC_TYPE_FOUR_LINEAR_TABLE", + "scale": 1, + "normalUpTable": { + "15": 30, + "110": 100 + }, + "normalDownTable": { + "15": 30, + "110": 100 + }, + "failUpTable": { + "15": 30, + "110": 100 + }, + "failDownTable": { + "15": 30, + "110": 100 + } + } + ], + "fans": [ + { + "fanName": "fan_1", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm1", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "ledSysfsPath": "/sys/class/leds/fan1::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + }, + { + "fanName": "fan_2", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm2", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "ledSysfsPath": "/sys/class/leds/fan2::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + }, + { + "fanName": "fan_3", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm3", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "ledSysfsPath": "/sys/class/leds/fan3::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + }, + { + "fanName": "fan_4", + "rpmSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", + "pwmSysfsPath": "/run/devmap/sensors/FAN_CPLD/pwm4", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "ledSysfsPath": "/sys/class/leds/fan4::status/brightness", + "pwmMin": 1, + "pwmMax": 255, + "fanPresentVal": 1, + "fanMissingVal": 0, + "fanGoodLedVal": 1, + "fanFailLedVal": 2 + } + ], + "zones": [ + { + "zoneType": "ZONE_TYPE_MAX", + "zoneName": "zone1", + "sensorNames": [ + "SMB_BOARD_FRONT_TEMP", + "osfp_group_1" + ], + "fanNames": [ + "fan_1", + "fan_2", + "fan_3", + "fan_4" + ], + "slope": 3 + } + ] +} diff --git a/fboss/platform/configs/meru800biab/fw_util.json b/fboss/platform/configs/meru800biab/fw_util.json new file mode 100644 index 0000000000000..09bce8a2de335 --- /dev/null +++ b/fboss/platform/configs/meru800biab/fw_util.json @@ -0,0 +1,34 @@ +{ + "fwConfigs": { + "bios": { + "preUpgradeCmd": "printf '3000000:3FFFFFF image' > /home/bios_spi_layout", + "getVersionCmd": "cat /sys/devices/virtual/dmi/id/bios_version", + "priority": 4, + "upgradeCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -w $bios_filename", + "postUpgradeCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -v $bios_filename;rm /home/bios_spi_layout", + "verifyFwCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -v $bios_filename;rm /home/bios_spi_layout", + "readFwCmd": "bios_filename=$(head -n 1 /home/bios_filename.txt); flashrom -p internal -l /home/bios_spi_layout -i image --noverify-all -r $bios_filename;rm /home/bios_spi_layout" + }, + "scm_cpld": { + "preUpgradeCmd": "", + "getVersionCmd": "cpu_cpld_ver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_ver`));cpu_cpld_subver=$((`cat /run/devmap/fpgas/MERU_SCM_CPLD/fpga_sub_ver`));echo $cpu_cpld_ver'.'$cpu_cpld_subver", + "priority": 3, + "upgradeCmd": "cpu_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);jam -aprogram -fmeru_cpu_cpld -v $cpu_cpld_filename", + "postUpgradeCmd": "" + }, + "smb_fpga": { + "preUpgradeCmd": "printf '0:3FFFFF image' > /home/smb_fpga_layout;modprobe spidev;fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);echo 'spidev' > /sys/bus/spi/devices/spi$fpga_spidev/driver_override;echo spi$fpga_spidev > /sys/bus/spi/drivers/spidev/bind;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev > /home/flashrom_output;(grep 'MT25QL256' /home/flashrom_output && echo 'MT25QL256' > /home/flash_chip_name) || (grep 'MX25L25635F' /home/flashrom_output && echo 'MX25L25635F/MX25L25645G' > /home/flash_chip_name) || echo 'NONE' > /home/flash_chip_name", + "getVersionCmd": "smb_fpga_ver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_ver`));smb_fpga_subver=$((`cat /run/devmap/fpgas/MERU800BIA_SMB_FPGA/fpga_sub_ver`));echo $smb_fpga_ver'.'$smb_fpga_subver", + "priority": 2, + "upgradeCmd": "smb_fpga_binary_name=$(head -n 1 /home/smb_fpga_filename.txt);fpga_spidev=$(echo $(ls /run/devmap/fpgas/MERU800BIA_SMB_FPGA/*spi*/spi_master/spi* | grep spi*.*) | cut -c 4-);chip=$(head -n 1 /home/flash_chip_name);if [ $chip = 'NONE' ];then cmd_chip_option='' cmd_chip_name='';else cmd_chip_option='-c' cmd_chip_name=$chip;fi;flashrom -p linux_spi:dev=/dev/spidev$fpga_spidev $cmd_chip_option $cmd_chip_name -l /home/smb_fpga_layout -i image -w $smb_fpga_binary_name", + "postUpgradeCmd": "rm /home/smb_fpga_layout; rm /home/flash_chip_name" + }, + "fan_cpld": { + "preUpgradeCmd": "echo 1 > /run/devmap/fpgas/MERU_SCM_CPLD/switch_jtag_enable", + "getVersionCmd": "fan_cpld_ver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_ver`));fan_cpld_subver=$((10#`cat /run/devmap/cplds/FAN_CPLD/hwmon/hwmon*/cpld_sub_ver`));echo $fan_cpld_ver'.'$fan_cpld_subver", + "priority": 1, + "upgradeCmd": "fan_cpld_filename=$(head -n 1 /home/fan_cpld_filename.txt);jam -aprogram -fmeru_fan_cpld -v $fan_cpld_filename", + "postUpgradeCmd": "" + } + } +} diff --git a/fboss/platform/configs/meru800biab/led_manager.json b/fboss/platform/configs/meru800biab/led_manager.json new file mode 100644 index 0000000000000..168f6746fd5d5 --- /dev/null +++ b/fboss/platform/configs/meru800biab/led_manager.json @@ -0,0 +1,54 @@ +{ + "systemLedConfig": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/sys_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/sys_led:red:status/brightness" + }, + "fruTypeLedConfigs": { + "FAN": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/fan_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/fan_led:red:status/brightness" + }, + "PSU": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/psu_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/psu_led:red:status/brightness" + } + }, + "fruConfigs": [ + { + "fruName": "FAN1", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" + }, + { + "fruName": "FAN2", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" + }, + { + "fruName": "FAN3", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" + }, + { + "fruName": "FAN4", + "fruType": "FAN", + "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" + }, + { + "fruName": "PSU1", + "fruType": "PSU", + "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present" + }, + { + "fruName": "PSU2", + "fruType": "PSU", + "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present" + } + ] + } \ No newline at end of file diff --git a/fboss/platform/configs/meru800biab/platform_manager.json b/fboss/platform/configs/meru800biab/platform_manager.json new file mode 100644 index 0000000000000..34be9158862bc --- /dev/null +++ b/fboss/platform/configs/meru800biab/platform_manager.json @@ -0,0 +1,1599 @@ +{ + "platformName": "meru800biab", + "rootPmUnitName": "SCM", + "rootSlotType": "SCM_SLOT", + "slotTypeConfigs": { + "SCM_SLOT": { + "numOutgoingI2cBuses": 0, + "idpromConfig": { + "busName": "SMBus I801 adapter at 1000", + "address": "0x50", + "kernelDeviceName": "24c512", + "offset": 15360 + }, + "pmUnitName": "SCM" + }, + "SMB_SLOT": { + "numOutgoingI2cBuses": 3, + "idpromConfig": { + "busName": "INCOMING@0", + "address": "0x50", + "kernelDeviceName": "24c512", + "offset": 15360 + }, + "pmUnitName": "SMB" + }, + "PSU_SLOT": { + "numOutgoingI2cBuses": 1, + "pmUnitName": "PSU" + }, + "FAN_SLOT": { + "numOutgoingI2cBuses": 0, + "pmUnitName": "FAN" + } + }, + "pmUnitConfigs": { + "SCM": { + "pluggedInSlotType": "SCM_SLOT", + "i2cDeviceConfigs": [ + { + "busName": "SCM_I2C_MASTER0@0", + "address": "0x40", + "kernelDeviceName": "pmbus", + "pmUnitScopedName": "SCM_MPS_PMBUS" + } + ], + "outgoingSlotConfigs": { + "SMB_SLOT@0": { + "slotType": "SMB_SLOT", + "outgoingI2cBusNames": [ + "SCM_I2C_MASTER1@0", + "SCM_I2C_MASTER1@2", + "SCM_I2C_MASTER1@3" + ] + } + }, + "pciDeviceConfigs": [ + { + "pmUnitScopedName": "SCM_FPGA", + "vendorId": "0x3475", + "deviceId": "0x0001", + "subSystemVendorId": "0x3475", + "subSystemDeviceId": "0x0008", + "i2cAdapterConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SCM_I2C_MASTER0", + "deviceName": "i2c_master", + "csrOffset": "0x8000" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SCM_I2C_MASTER1", + "deviceName": "i2c_master", + "csrOffset": "0x8080" + }, + "numberOfAdapters": 8 + } + ], + "spiMasterConfigs": [], + "ledCtrlConfigs": [], + "xcvrCtrlConfigs": [] + } + ], + "embeddedSensorConfigs": [ + { + "pmUnitScopedName": "CPU_CORE_TEMP", + "sysfsPath": "/sys/bus/platform/devices/coretemp.0" + }, + { + "pmUnitScopedName": "NVME_TEMP", + "sysfsPath": "/sys/class/nvme/nvme0" + } + ] + }, + "SMB": { + "pluggedInSlotType": "SMB_SLOT", + "i2cDeviceConfigs": [ + { + "busName": "INCOMING@0", + "address": "0x74", + "kernelDeviceName": "pca9539", + "pmUnitScopedName": "SMB_PCA", + "isGpioChip": true + }, + { + "busName": "INCOMING@1", + "address": "0x49", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "SMB_TMP75_FRONT", + "initRegSettings": [ + { + "regOffset": 3, + "ioBuf": [95] + } + ] + }, + { + "busName": "INCOMING@1", + "address": "0x4a", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "SMB_TMP75_REAR", + "initRegSettings": [ + { + "regOffset": 3, + "ioBuf": [95] + } + ] + }, + { + "busName": "INCOMING@1", + "address": "0x4d", + "kernelDeviceName": "max6581", + "pmUnitScopedName": "SMB_MAX6581", + "initRegSettings": [ + { + "regOffset": 32, + "ioBuf": [110] + }, + { + "regOffset": 33, + "ioBuf": [-121] + }, + { + "regOffset": 34, + "ioBuf": [-121] + }, + { + "regOffset": 35, + "ioBuf": [-121] + }, + { + "regOffset": 36, + "ioBuf": [-121] + }, + { + "regOffset": 37, + "ioBuf": [-121] + }, + { + "regOffset": 38, + "ioBuf": [-121] + }, + { + "regOffset": 39, + "ioBuf": [-121] + } + ] + }, + { + "busName": "INCOMING@2", + "address": "0x48", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "FAN_TMP75", + "initRegSettings": [ + { + "regOffset": 3, + "ioBuf": [95] + } + ] + }, + { + "busName": "INCOMING@2", + "address": "0x60", + "kernelDeviceName": "pali2_cpld", + "pmUnitScopedName": "FAN_CPLD" + }, + { + "busName": "SMB_I2C_MASTER0@0", + "address": "0x45", + "kernelDeviceName": "raa228228", + "pmUnitScopedName": "SMB_RAA228926_J3" + }, + { + "busName": "SMB_I2C_MASTER0@0", + "address": "0x54", + "kernelDeviceName": "isl68226", + "pmUnitScopedName": "SMB_ISL68226_J3" + }, + { + "busName": "SMB_I2C_MASTER0@0", + "address": "0x55", + "kernelDeviceName": "isl68226", + "pmUnitScopedName": "SMB_ISL68226_OPTICS" + }, + { + "busName": "SMB_I2C_MASTER0@2", + "address": "0x48", + "kernelDeviceName": "lm75", + "pmUnitScopedName": "SMB_MGMT_TMP75" + } + ], + "outgoingSlotConfigs": { + "PSU_SLOT@0": { + "slotType": "PSU_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[SMB_FPGA]", + "presenceFileName": "psu1_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [ + "SMB_I2C_MASTER0@5" + ] + }, + "PSU_SLOT@1": { + "slotType": "PSU_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[SMB_FPGA]", + "presenceFileName": "psu2_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [ + "SMB_I2C_MASTER0@6" + ] + }, + "FAN_SLOT@0": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan1_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + }, + "FAN_SLOT@1": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan2_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + }, + "FAN_SLOT@2": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan3_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + }, + "FAN_SLOT@3": { + "slotType": "FAN_SLOT", + "presenceDetection": { + "sysfsFileHandle": { + "devicePath": "/SMB_SLOT@0/[FAN_CPLD]", + "presenceFileName": "fan4_present", + "desiredValue": 1 + } + }, + "outgoingI2cBusNames": [] + } + }, + "pciDeviceConfigs": [ + { + "pmUnitScopedName": "SMB_FPGA", + "vendorId": "0x3475", + "deviceId": "0x0001", + "subSystemVendorId": "0x3475", + "subSystemDeviceId": "0x0003", + "i2cAdapterConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER0", + "deviceName": "i2c_master", + "csrOffset": "0x8000" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER1", + "deviceName": "i2c_master", + "csrOffset": "0x8080" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER2", + "deviceName": "i2c_master", + "csrOffset": "0x8100" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER3", + "deviceName": "i2c_master", + "csrOffset": "0x8180" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER4", + "deviceName": "i2c_master", + "csrOffset": "0x8200" + }, + "numberOfAdapters": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_I2C_MASTER5", + "deviceName": "i2c_master", + "csrOffset": "0x8280" + }, + "numberOfAdapters": 8 + } + ], + "spiMasterConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_SPI_MASTER0", + "deviceName": "spi_master", + "csrOffset": "0x7900" + }, + "spiDeviceConfigs": [ + { + "pmUnitScopedName": "SMB_SPI_MASTER0_DEVICE1", + "chipSelect": 0, + "modalias": "spidev", + "maxSpeedHz": 25000000 + } + ] + } + ], + "ledCtrlConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT1_LED1", + "deviceName": "port_led", + "csrOffset": "0x6100" + }, + "portNumber": 1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT1_LED2", + "deviceName": "port_led", + "csrOffset": "0x6110" + }, + "portNumber": 1, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT2_LED1", + "deviceName": "port_led", + "csrOffset": "0x6120" + }, + "portNumber": 2, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT2_LED2", + "deviceName": "port_led", + "csrOffset": "0x6130" + }, + "portNumber": 2, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT3_LED1", + "deviceName": "port_led", + "csrOffset": "0x6140" + }, + "portNumber": 3, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT3_LED2", + "deviceName": "port_led", + "csrOffset": "0x6150" + }, + "portNumber": 3, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT4_LED1", + "deviceName": "port_led", + "csrOffset": "0x6160" + }, + "portNumber": 4, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT4_LED2", + "deviceName": "port_led", + "csrOffset": "0x6170" + }, + "portNumber": 4, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT5_LED1", + "deviceName": "port_led", + "csrOffset": "0x6180" + }, + "portNumber": 5, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT5_LED2", + "deviceName": "port_led", + "csrOffset": "0x6190" + }, + "portNumber": 5, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT6_LED1", + "deviceName": "port_led", + "csrOffset": "0x61a0" + }, + "portNumber": 6, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT6_LED2", + "deviceName": "port_led", + "csrOffset": "0x61b0" + }, + "portNumber": 6, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT7_LED1", + "deviceName": "port_led", + "csrOffset": "0x61c0" + }, + "portNumber": 7, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT7_LED2", + "deviceName": "port_led", + "csrOffset": "0x61d0" + }, + "portNumber": 7, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT8_LED1", + "deviceName": "port_led", + "csrOffset": "0x61e0" + }, + "portNumber": 8, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT8_LED2", + "deviceName": "port_led", + "csrOffset": "0x61f0" + }, + "portNumber": 8, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT9_LED1", + "deviceName": "port_led", + "csrOffset": "0x6200" + }, + "portNumber": 9, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT9_LED2", + "deviceName": "port_led", + "csrOffset": "0x6210" + }, + "portNumber": 9, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT10_LED1", + "deviceName": "port_led", + "csrOffset": "0x6220" + }, + "portNumber": 10, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT10_LED2", + "deviceName": "port_led", + "csrOffset": "0x6230" + }, + "portNumber": 10, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT11_LED1", + "deviceName": "port_led", + "csrOffset": "0x6240" + }, + "portNumber": 11, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT11_LED2", + "deviceName": "port_led", + "csrOffset": "0x6250" + }, + "portNumber": 11, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT12_LED1", + "deviceName": "port_led", + "csrOffset": "0x6260" + }, + "portNumber": 12, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT12_LED2", + "deviceName": "port_led", + "csrOffset": "0x6270" + }, + "portNumber": 12, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT13_LED1", + "deviceName": "port_led", + "csrOffset": "0x6280" + }, + "portNumber": 13, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT13_LED2", + "deviceName": "port_led", + "csrOffset": "0x6290" + }, + "portNumber": 13, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT14_LED1", + "deviceName": "port_led", + "csrOffset": "0x62a0" + }, + "portNumber": 14, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT14_LED2", + "deviceName": "port_led", + "csrOffset": "0x62b0" + }, + "portNumber": 14, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT15_LED1", + "deviceName": "port_led", + "csrOffset": "0x62c0" + }, + "portNumber": 15, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT15_LED2", + "deviceName": "port_led", + "csrOffset": "0x62d0" + }, + "portNumber": 15, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT16_LED1", + "deviceName": "port_led", + "csrOffset": "0x62e0" + }, + "portNumber": 16, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT16_LED2", + "deviceName": "port_led", + "csrOffset": "0x62f0" + }, + "portNumber": 16, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT17_LED1", + "deviceName": "port_led", + "csrOffset": "0x6300" + }, + "portNumber": 17, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT17_LED2", + "deviceName": "port_led", + "csrOffset": "0x6310" + }, + "portNumber": 17, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT18_LED1", + "deviceName": "port_led", + "csrOffset": "0x6320" + }, + "portNumber": 18, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT18_LED2", + "deviceName": "port_led", + "csrOffset": "0x6330" + }, + "portNumber": 18, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT19_LED1", + "deviceName": "port_led", + "csrOffset": "0x6340" + }, + "portNumber": 19, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT19_LED2", + "deviceName": "port_led", + "csrOffset": "0x6350" + }, + "portNumber": 19, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT20_LED1", + "deviceName": "port_led", + "csrOffset": "0x6360" + }, + "portNumber": 20, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT20_LED2", + "deviceName": "port_led", + "csrOffset": "0x6370" + }, + "portNumber": 20, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT21_LED1", + "deviceName": "port_led", + "csrOffset": "0x6380" + }, + "portNumber": 21, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT21_LED2", + "deviceName": "port_led", + "csrOffset": "0x6390" + }, + "portNumber": 21, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT22_LED1", + "deviceName": "port_led", + "csrOffset": "0x63a0" + }, + "portNumber": 22, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT22_LED2", + "deviceName": "port_led", + "csrOffset": "0x63b0" + }, + "portNumber": 22, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT23_LED1", + "deviceName": "port_led", + "csrOffset": "0x63c0" + }, + "portNumber": 23, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT23_LED2", + "deviceName": "port_led", + "csrOffset": "0x63d0" + }, + "portNumber": 23, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT24_LED1", + "deviceName": "port_led", + "csrOffset": "0x63e0" + }, + "portNumber": 24, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT24_LED2", + "deviceName": "port_led", + "csrOffset": "0x63f0" + }, + "portNumber": 24, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT25_LED1", + "deviceName": "port_led", + "csrOffset": "0x6400" + }, + "portNumber": 25, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT25_LED2", + "deviceName": "port_led", + "csrOffset": "0x6410" + }, + "portNumber": 25, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT26_LED1", + "deviceName": "port_led", + "csrOffset": "0x6420" + }, + "portNumber": 26, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT26_LED2", + "deviceName": "port_led", + "csrOffset": "0x6430" + }, + "portNumber": 26, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT27_LED1", + "deviceName": "port_led", + "csrOffset": "0x6440" + }, + "portNumber": 27, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT27_LED2", + "deviceName": "port_led", + "csrOffset": "0x6450" + }, + "portNumber": 27, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT28_LED1", + "deviceName": "port_led", + "csrOffset": "0x6460" + }, + "portNumber": 28, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT28_LED2", + "deviceName": "port_led", + "csrOffset": "0x6470" + }, + "portNumber": 28, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT29_LED1", + "deviceName": "port_led", + "csrOffset": "0x6480" + }, + "portNumber": 29, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT29_LED2", + "deviceName": "port_led", + "csrOffset": "0x6490" + }, + "portNumber": 29, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT30_LED1", + "deviceName": "port_led", + "csrOffset": "0x64a0" + }, + "portNumber": 30, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT30_LED2", + "deviceName": "port_led", + "csrOffset": "0x64b0" + }, + "portNumber": 30, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT31_LED1", + "deviceName": "port_led", + "csrOffset": "0x64c0" + }, + "portNumber": 31, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT31_LED2", + "deviceName": "port_led", + "csrOffset": "0x64d0" + }, + "portNumber": 31, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT32_LED1", + "deviceName": "port_led", + "csrOffset": "0x64e0" + }, + "portNumber": 32, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT32_LED2", + "deviceName": "port_led", + "csrOffset": "0x64f0" + }, + "portNumber": 32, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT33_LED1", + "deviceName": "port_led", + "csrOffset": "0x6500" + }, + "portNumber": 33, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT33_LED2", + "deviceName": "port_led", + "csrOffset": "0x6510" + }, + "portNumber": 33, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT34_LED1", + "deviceName": "port_led", + "csrOffset": "0x6520" + }, + "portNumber": 34, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT34_LED2", + "deviceName": "port_led", + "csrOffset": "0x6530" + }, + "portNumber": 34, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT35_LED1", + "deviceName": "port_led", + "csrOffset": "0x6540" + }, + "portNumber": 35, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT35_LED2", + "deviceName": "port_led", + "csrOffset": "0x6550" + }, + "portNumber": 35, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT36_LED1", + "deviceName": "port_led", + "csrOffset": "0x6560" + }, + "portNumber": 36, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT36_LED2", + "deviceName": "port_led", + "csrOffset": "0x6570" + }, + "portNumber": 36, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT37_LED1", + "deviceName": "port_led", + "csrOffset": "0x6580" + }, + "portNumber": 37, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT37_LED2", + "deviceName": "port_led", + "csrOffset": "0x6590" + }, + "portNumber": 37, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT38_LED1", + "deviceName": "port_led", + "csrOffset": "0x65a0" + }, + "portNumber": 38, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT38_LED2", + "deviceName": "port_led", + "csrOffset": "0x65b0" + }, + "portNumber": 38, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED1", + "deviceName": "port_led", + "csrOffset": "0x65c0" + }, + "portNumber": 39, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED2", + "deviceName": "port_led", + "csrOffset": "0x65d0" + }, + "portNumber": 39, + "ledId": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED3", + "deviceName": "port_led", + "csrOffset": "0x65e0" + }, + "portNumber": 39, + "ledId": 3 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_LED4", + "deviceName": "port_led", + "csrOffset": "0x65f0" + }, + "portNumber": 39, + "ledId": 4 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SYSTEM_STATUS_LED", + "deviceName": "sys_led", + "csrOffset": "0x6050" + }, + "portNumber": -1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "FAN_STATUS_LED", + "deviceName": "fan_led", + "csrOffset": "0x6060" + }, + "portNumber": -1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "PSU_STATUS_LED", + "deviceName": "psu_led", + "csrOffset": "0x6070" + }, + "portNumber": -1, + "ledId": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "SMB_STATUS_LED", + "deviceName": "smb_led", + "csrOffset": "0x6090" + }, + "portNumber": -1, + "ledId": 1 + } + ], + "xcvrCtrlConfigs": [ + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT1_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa010" + }, + "portNumber": 1 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT2_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa020" + }, + "portNumber": 2 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT3_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa030" + }, + "portNumber": 3 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT4_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa040" + }, + "portNumber": 4 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT5_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa050" + }, + "portNumber": 5 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT6_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa060" + }, + "portNumber": 6 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT7_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa070" + }, + "portNumber": 7 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT8_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa080" + }, + "portNumber": 8 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT9_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa090" + }, + "portNumber": 9 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT10_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0a0" + }, + "portNumber": 10 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT11_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0b0" + }, + "portNumber": 11 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT12_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0c0" + }, + "portNumber": 12 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT13_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0d0" + }, + "portNumber": 13 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT14_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0e0" + }, + "portNumber": 14 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT15_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa0f0" + }, + "portNumber": 15 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT16_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa100" + }, + "portNumber": 16 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT17_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa110" + }, + "portNumber": 17 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT18_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa120" + }, + "portNumber": 18 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT19_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa130" + }, + "portNumber": 19 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT20_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa140" + }, + "portNumber": 20 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT21_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa150" + }, + "portNumber": 21 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT22_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa160" + }, + "portNumber": 22 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT23_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa170" + }, + "portNumber": 23 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT24_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa180" + }, + "portNumber": 24 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT25_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa190" + }, + "portNumber": 25 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT26_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1a0" + }, + "portNumber": 26 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT27_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1b0" + }, + "portNumber": 27 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT28_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1c0" + }, + "portNumber": 28 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT29_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1d0" + }, + "portNumber": 29 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT30_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1e0" + }, + "portNumber": 30 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT31_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa1f0" + }, + "portNumber": 31 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT32_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa200" + }, + "portNumber": 32 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT33_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa210" + }, + "portNumber": 33 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT34_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa220" + }, + "portNumber": 34 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT35_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa230" + }, + "portNumber": 35 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT36_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa240" + }, + "portNumber": 36 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT37_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa250" + }, + "portNumber": 37 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "OSFP_PORT38_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa260" + }, + "portNumber": 38 + }, + { + "fpgaIpBlockConfig": { + "pmUnitScopedName": "QSFP_PORT39_XCVR", + "deviceName": "xcvr_ctrl", + "csrOffset": "0xa290" + }, + "portNumber": 39 + } + ] + } + ] + }, + "PSU": { + "pluggedInSlotType": "PSU_SLOT", + "i2cDeviceConfigs": [ + { + "busName": "INCOMING@0", + "address": "0x58", + "kernelDeviceName": "pmbus", + "pmUnitScopedName": "PSU_PMBUS" + } + ], + "outgoingSlotConfigs": {}, + "pciDeviceConfigs": [] + }, + "FAN": { + "pluggedInSlotType": "FAN_SLOT", + "i2cDeviceConfigs": [], + "outgoingSlotConfigs": {}, + "pciDeviceConfigs": [] + } + }, + "i2cAdaptersFromCpu": [ + "SMBus I801 adapter at 1000" + ], + "symbolicLinkToDevicePath": { + "/run/devmap/fpgas/MERU_SCM_CPLD": "/[SCM_FPGA]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH0": "/[SCM_I2C_MASTER0@0]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH1": "/[SCM_I2C_MASTER0@1]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH2": "/[SCM_I2C_MASTER0@2]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH3": "/[SCM_I2C_MASTER0@3]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH4": "/[SCM_I2C_MASTER0@4]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH5": "/[SCM_I2C_MASTER0@5]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH6": "/[SCM_I2C_MASTER0@6]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS0_CH7": "/[SCM_I2C_MASTER0@7]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH0": "/[SCM_I2C_MASTER1@0]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH1": "/[SCM_I2C_MASTER1@1]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH2": "/[SCM_I2C_MASTER1@2]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH3": "/[SCM_I2C_MASTER1@3]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH4": "/[SCM_I2C_MASTER1@4]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH5": "/[SCM_I2C_MASTER1@5]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH6": "/[SCM_I2C_MASTER1@6]", + "/run/devmap/i2c-busses/MERU_SCM_CPLD_SMBUS1_CH7": "/[SCM_I2C_MASTER1@7]", + "/run/devmap/eeproms/MERU800BIA_SMB_EEPROM": "/SMB_SLOT@0/[IDPROM]", + "/run/devmap/sensors/CPU_MPS_PMBUS": "/[SCM_MPS_PMBUS]", + "/run/devmap/sensors/CPU_CORE_TEMP": "/[CPU_CORE_TEMP]", + "/run/devmap/sensors/NVME_TEMP": "/[NVME_TEMP]", + "/run/devmap/fpgas/MERU800BIA_SMB_FPGA": "/SMB_SLOT@0/[SMB_FPGA]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER0@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER0@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER0@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER0@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER0@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER0@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER0@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS0_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER0@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER1@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER1@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER1@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER1@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER1@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER1@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER1@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS1_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER1@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER2@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER2@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER2@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER2@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER2@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER2@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER2@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS2_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER2@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER3@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER3@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER3@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER3@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER3@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER3@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER3@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS3_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER3@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER4@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER4@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER4@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER4@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER4@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER4@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER4@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS4_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER4@7]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH0": "/SMB_SLOT@0/[SMB_I2C_MASTER5@0]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH1": "/SMB_SLOT@0/[SMB_I2C_MASTER5@1]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH2": "/SMB_SLOT@0/[SMB_I2C_MASTER5@2]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH3": "/SMB_SLOT@0/[SMB_I2C_MASTER5@3]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH4": "/SMB_SLOT@0/[SMB_I2C_MASTER5@4]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH5": "/SMB_SLOT@0/[SMB_I2C_MASTER5@5]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH6": "/SMB_SLOT@0/[SMB_I2C_MASTER5@6]", + "/run/devmap/i2c-busses/MERU800BIA_SMB_FPGA_SMBUS5_CH7": "/SMB_SLOT@0/[SMB_I2C_MASTER5@7]", + "/run/devmap/gpiochips/SMB_PCA": "/SMB_SLOT@0/[SMB_PCA]", + "/run/devmap/sensors/SMB_TMP75_FRONT": "/SMB_SLOT@0/[SMB_TMP75_FRONT]", + "/run/devmap/sensors/SMB_TMP75_REAR": "/SMB_SLOT@0/[SMB_TMP75_REAR]", + "/run/devmap/sensors/SMB_MAX6581": "/SMB_SLOT@0/[SMB_MAX6581]", + "/run/devmap/sensors/FAN_TMP75": "/SMB_SLOT@0/[FAN_TMP75]", + "/run/devmap/cplds/FAN_CPLD": "/SMB_SLOT@0/[FAN_CPLD]", + "/run/devmap/sensors/FAN_CPLD": "/SMB_SLOT@0/[FAN_CPLD]", + "/run/devmap/sensors/SMB_RAA228926_J3": "/SMB_SLOT@0/[SMB_RAA228926_J3]", + "/run/devmap/sensors/SMB_ISL68226_J3": "/SMB_SLOT@0/[SMB_ISL68226_J3]", + "/run/devmap/sensors/SMB_ISL68226_OPTICS": "/SMB_SLOT@0/[SMB_ISL68226_OPTICS]", + "/run/devmap/sensors/SMB_MGMT_TMP75": "/SMB_SLOT@0/[SMB_MGMT_TMP75]", + "/run/devmap/xcvrs/xcvr_1": "/SMB_SLOT@0/[OSFP_PORT1_XCVR]", + "/run/devmap/xcvrs/xcvr_2": "/SMB_SLOT@0/[OSFP_PORT2_XCVR]", + "/run/devmap/xcvrs/xcvr_3": "/SMB_SLOT@0/[OSFP_PORT3_XCVR]", + "/run/devmap/xcvrs/xcvr_4": "/SMB_SLOT@0/[OSFP_PORT4_XCVR]", + "/run/devmap/xcvrs/xcvr_5": "/SMB_SLOT@0/[OSFP_PORT5_XCVR]", + "/run/devmap/xcvrs/xcvr_6": "/SMB_SLOT@0/[OSFP_PORT6_XCVR]", + "/run/devmap/xcvrs/xcvr_7": "/SMB_SLOT@0/[OSFP_PORT7_XCVR]", + "/run/devmap/xcvrs/xcvr_8": "/SMB_SLOT@0/[OSFP_PORT8_XCVR]", + "/run/devmap/xcvrs/xcvr_9": "/SMB_SLOT@0/[OSFP_PORT9_XCVR]", + "/run/devmap/xcvrs/xcvr_10": "/SMB_SLOT@0/[OSFP_PORT10_XCVR]", + "/run/devmap/xcvrs/xcvr_11": "/SMB_SLOT@0/[OSFP_PORT11_XCVR]", + "/run/devmap/xcvrs/xcvr_12": "/SMB_SLOT@0/[OSFP_PORT12_XCVR]", + "/run/devmap/xcvrs/xcvr_13": "/SMB_SLOT@0/[OSFP_PORT13_XCVR]", + "/run/devmap/xcvrs/xcvr_14": "/SMB_SLOT@0/[OSFP_PORT14_XCVR]", + "/run/devmap/xcvrs/xcvr_15": "/SMB_SLOT@0/[OSFP_PORT15_XCVR]", + "/run/devmap/xcvrs/xcvr_16": "/SMB_SLOT@0/[OSFP_PORT16_XCVR]", + "/run/devmap/xcvrs/xcvr_17": "/SMB_SLOT@0/[OSFP_PORT17_XCVR]", + "/run/devmap/xcvrs/xcvr_18": "/SMB_SLOT@0/[OSFP_PORT18_XCVR]", + "/run/devmap/xcvrs/xcvr_19": "/SMB_SLOT@0/[OSFP_PORT19_XCVR]", + "/run/devmap/xcvrs/xcvr_20": "/SMB_SLOT@0/[OSFP_PORT20_XCVR]", + "/run/devmap/xcvrs/xcvr_21": "/SMB_SLOT@0/[OSFP_PORT21_XCVR]", + "/run/devmap/xcvrs/xcvr_22": "/SMB_SLOT@0/[OSFP_PORT22_XCVR]", + "/run/devmap/xcvrs/xcvr_23": "/SMB_SLOT@0/[OSFP_PORT23_XCVR]", + "/run/devmap/xcvrs/xcvr_24": "/SMB_SLOT@0/[OSFP_PORT24_XCVR]", + "/run/devmap/xcvrs/xcvr_25": "/SMB_SLOT@0/[OSFP_PORT25_XCVR]", + "/run/devmap/xcvrs/xcvr_26": "/SMB_SLOT@0/[OSFP_PORT26_XCVR]", + "/run/devmap/xcvrs/xcvr_27": "/SMB_SLOT@0/[OSFP_PORT27_XCVR]", + "/run/devmap/xcvrs/xcvr_28": "/SMB_SLOT@0/[OSFP_PORT28_XCVR]", + "/run/devmap/xcvrs/xcvr_29": "/SMB_SLOT@0/[OSFP_PORT29_XCVR]", + "/run/devmap/xcvrs/xcvr_30": "/SMB_SLOT@0/[OSFP_PORT30_XCVR]", + "/run/devmap/xcvrs/xcvr_31": "/SMB_SLOT@0/[OSFP_PORT31_XCVR]", + "/run/devmap/xcvrs/xcvr_32": "/SMB_SLOT@0/[OSFP_PORT32_XCVR]", + "/run/devmap/xcvrs/xcvr_33": "/SMB_SLOT@0/[OSFP_PORT33_XCVR]", + "/run/devmap/xcvrs/xcvr_34": "/SMB_SLOT@0/[OSFP_PORT34_XCVR]", + "/run/devmap/xcvrs/xcvr_35": "/SMB_SLOT@0/[OSFP_PORT35_XCVR]", + "/run/devmap/xcvrs/xcvr_36": "/SMB_SLOT@0/[OSFP_PORT36_XCVR]", + "/run/devmap/xcvrs/xcvr_37": "/SMB_SLOT@0/[OSFP_PORT37_XCVR]", + "/run/devmap/xcvrs/xcvr_38": "/SMB_SLOT@0/[OSFP_PORT38_XCVR]", + "/run/devmap/xcvrs/xcvr_39": "/SMB_SLOT@0/[QSFP_PORT39_XCVR]", + "/run/devmap/flashes/SMB_SPI_MASTER0_DEVICE1": "/SMB_SLOT@0/[SMB_SPI_MASTER0_DEVICE1]", + "/run/devmap/sensors/PSU1_PMBUS": "/SMB_SLOT@0/PSU_SLOT@0/[PSU_PMBUS]", + "/run/devmap/sensors/PSU2_PMBUS": "/SMB_SLOT@0/PSU_SLOT@1/[PSU_PMBUS]" + }, + "bspKmodsRpmName": "arista_bsp_kmods", + "bspKmodsRpmVersion": "0.7.5-1", + "bspKmodsToReload": [ + "scd-xcvr", + "scd-spi", + "scd-leds", + "scd-smbus", + "dsf-fan-cpld" + ], + "sharedKmodsToReload": [ + "scd" + ], + "upstreamKmodsToLoad": [ + "spidev", + "i2c-i801" + ] +} diff --git a/fboss/platform/configs/meru800biab/sensor_service.json b/fboss/platform/configs/meru800biab/sensor_service.json new file mode 100644 index 0000000000000..650fd657af768 --- /dev/null +++ b/fboss/platform/configs/meru800biab/sensor_service.json @@ -0,0 +1,615 @@ +{ + "pmUnitSensorsList": [ + { + "slotPath": "/", + "pmUnitName": "SCM", + "sensors": [ + { + "name": "CPU_PACKAGE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100.0, + "maxAlarmVal": 90.0 + }, + "compute": "@/1000.0" + }, + { + "name": "NVME_COMPOSITE_TEMP", + "sysfsPath": "/run/devmap/sensors/NVME_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SCM_ECB_VIN", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_VOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/in2_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/32000.0" + }, + { + "name": "SCM_ECB_IOUT", + "sysfsPath": "/run/devmap/sensors/CPU_MPS_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + } + ] + }, + { + "slotPath": "/SMB_SLOT@0", + "pmUnitName": "SMB", + "sensors": [ + { + "name": "SMB_BOARD_FRONT_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_FRONT/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_BOARD_REAR_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_TMP75_REAR/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 90.0, + "maxAlarmVal": 85.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_CORE_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_FAB1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_NIF1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM0_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_J3_DIODE_HBM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MAX6581/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 135.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN_BOARD_TEMP", + "sysfsPath": "/run/devmap/sensors/FAN_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 85.0, + "maxAlarmVal": 80.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_VOUT_J3_0V85_CORE", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.93, + "lowerCriticalVal": 0.62 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM1_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_RAA228926_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V9", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.08, + "lowerCriticalVal": 0.72 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_0V75", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in4_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 0.9, + "lowerCriticalVal": 0.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_VOUT_J3_1V2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/in5_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 1.44, + "lowerCriticalVal": 0.96 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP1", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP2", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM2_TEMP3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_J3/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VIN", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in1_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_VOUT_OPTICS_3V3", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 3.96, + "lowerCriticalVal": 2.64 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_VRM3_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_ISL68226_OPTICS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 115.0 + }, + "compute": "@/1000.0" + }, + { + "name": "SMB_MGMT_INLET_TEMP", + "sysfsPath": "/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 75.0, + "maxAlarmVal": 70.0 + }, + "compute": "@/1000.0" + }, + { + "name": "FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN3_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + }, + { + "name": "FAN4_RPM", + "sysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 14900.0, + "lowerCriticalVal": 1100.0 + } + } + ] + }, + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@0", + "pmUnitName": "PSU1", + "sensors": [ + { + "name": "PSU1_VIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU1_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU1_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU1_PIN", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU1_POUT", + "sysfsPath": "/run/devmap/sensors/PSU1_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] + }, + { + "slotPath": "/SMB_SLOT@0/PSU_SLOT@1", + "pmUnitName": "PSU2", + "sensors": [ + { + "name": "PSU2_VIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in1_input", + "type": 1, + "compute": "@/1000.0" + }, + { + "name": "PSU2_VOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 14.4, + "lowerCriticalVal": 9.6 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_FAN1_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan1_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_FAN2_RPM", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/fan2_input", + "type": 4, + "thresholds": { + "upperCriticalVal": 25500.0, + "lowerCriticalVal": 0.0 + } + }, + { + "name": "PSU2_TEMP1", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 70.0, + "maxAlarmVal": 65.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP2", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 130.0, + "maxAlarmVal": 120.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_TEMP3", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 120.0, + "maxAlarmVal": 112.0 + }, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr1_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_IOUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/curr2_input", + "type": 2, + "compute": "@/1000.0" + }, + { + "name": "PSU2_PIN", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power1_input", + "type": 0, + "compute": "@/1000000.0" + }, + { + "name": "PSU2_POUT", + "sysfsPath": "/run/devmap/sensors/PSU2_PMBUS/power2_input", + "type": 0, + "compute": "@/1000000.0" + } + ] + } + ] +} diff --git a/fboss/platform/configs/meru800biab/weutil.json b/fboss/platform/configs/meru800biab/weutil.json new file mode 100644 index 0000000000000..fa77f00222efe --- /dev/null +++ b/fboss/platform/configs/meru800biab/weutil.json @@ -0,0 +1,13 @@ +{ + "chassisEepromName": "SMB", + "fruEepromList": { + "SCM": { + "path": "/run/devmap/eeproms/MERU_SCM_EEPROM", + "offset": 15360 + }, + "SMB": { + "path": "/run/devmap/eeproms/MERU800BIA_SMB_EEPROM", + "offset": 15360 + } + } +} diff --git a/fboss/platform/configs/montblanc/fw_util.json b/fboss/platform/configs/montblanc/fw_util.json index 05b775f740242..9a7b2f1de2bb4 100644 --- a/fboss/platform/configs/montblanc/fw_util.json +++ b/fboss/platform/configs/montblanc/fw_util.json @@ -8,7 +8,7 @@ "postUpgradeCmd": "echo -e '\\x16' | dd of=/dev/port bs=1 seek=$((0xb2)) count=1" }, "iob_fpga": { - "getVersionCmd": "iob_fpga_ver=$((`cat /run/devmap/fpgas/MCB_IOB_INFO_ROM/fpga_ver`));echo 0.$iob_fpga_ver", + "getVersionCmd": "cat /run/devmap/fpgas/MCB_IOB_INFO_ROM/fw_ver", "priority": 2, "upgradeCmd": "iob_fpga_filename=$(head -n 1 /home/iob_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1;flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -w $iob_fpga_filename -c N25Q128..3E", "verifyFwCmd": "iob_fpga_filename=$(head -n 1 /home/iob_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1;flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_1_DEVICE_1 -v $iob_fpga_filename -c N25Q128..3E", @@ -16,7 +16,7 @@ }, "dom1_fpga": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 9=1", - "getVersionCmd": "dom1_fpga_ver=$((`cat /run/devmap/fpgas/SMB_DOM1_INFO_ROM/fpga_ver`));echo 0.$dom1_fpga_ver", + "getVersionCmd": "cat /run/devmap/fpgas/SMB_DOM1_INFO_ROM/fw_ver", "priority": 3, "upgradeCmd": "dom1_fpga_filename=$(head -n 1 /home/dom1_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_2_DEVICE_1 -w $dom1_fpga_filename -c N25Q128..3E", "verifyFwCmd": "dom1_fpga_filename=$(head -n 1 /home/dom1_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_2_DEVICE_1 -v $dom1_fpga_filename -c N25Q128..3E", @@ -25,7 +25,7 @@ }, "dom2_fpga": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 10=1", - "getVersionCmd": "dom2_fpga_ver=$((`cat /run/devmap/fpgas/SMB_DOM2_INFO_ROM/fpga_ver`));echo 0.$dom2_fpga_ver", + "getVersionCmd": "cat /run/devmap/fpgas/SMB_DOM2_INFO_ROM/fw_ver", "priority": 4, "upgradeCmd": "dom2_fpga_filename=$(head -n 1 /home/dom2_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_3_DEVICE_1 -w $dom2_fpga_filename -c N25Q128..3E", "verifyFwCmd": "dom2_fpga_filename=$(head -n 1 /home/dom2_fpga_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_3_DEVICE_1 -v $dom2_fpga_filename -c N25Q128..3E", @@ -34,7 +34,7 @@ }, "mcb_cpld": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 3=1", - "getVersionCmd": "mcb_cpld_ver=$((`cat /run/devmap/cplds/MCB_CPLD/cpld_ver`));mcb_cpld_subver=$((`cat /run/devmap/cplds/MCB_CPLD/cpld_minor_ver`));echo $mcb_cpld_ver'.'$mcb_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/MCB_CPLD/fw_ver", "priority": 5, "upgradeCmd": "mcb_cpld_filename=$(head -n 1 /home/mcb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_4_DEVICE_1 -w $mcb_cpld_filename -c W25X20", "verifyFwCmd": "mcb_cpld_filename=$(head -n 1 /home/mcb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_4_DEVICE_1 -v $mcb_cpld_filename -c W25X20", @@ -43,7 +43,7 @@ }, "smb_cpld": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 7=1", - "getVersionCmd": "smb_cpld_ver=$((`cat /run/devmap/cplds/SMB_CPLD/cpld_ver`));smb_cpld_subver=$((`cat /run/devmap/cplds/SMB_CPLD/cpld_minor_ver`));echo $smb_cpld_ver'.'$smb_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/SMB_CPLD/fw_ver", "priority": 6, "upgradeCmd": "smb_cpld_filename=$(head -n 1 /home/smb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_5_DEVICE_1 -w $smb_cpld_filename -c W25X20", "verifyFwCmd": "smb_cpld_filename=$(head -n 1 /home/smb_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_5_DEVICE_1 -v $smb_cpld_filename -c W25X20", @@ -52,7 +52,7 @@ }, "scm_cpld": { "preUpgradeCmd": "gpioset $(gpiodetect | grep -E 'fboss_iob_pci.gpiochip.*' | awk '{print $1}') 1=1", - "getVersionCmd": "scm_cpld_ver=$((`cat /run/devmap/cplds/SCM_CPLD/cpld_ver`));scm_cpld_subver=$((`cat /run/devmap/cplds/SCM_CPLD/cpld_minor_ver`));echo $scm_cpld_ver'.'$scm_cpld_subver", + "getVersionCmd": "cat /run/devmap/cplds/SCM_CPLD/fw_ver", "priority": 7, "upgradeCmd": "scm_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_7_DEVICE_1 -w $scm_cpld_filename -c W25X20", "verifyFwCmd": "scm_cpld_filename=$(head -n 1 /home/scm_cpld_filename.txt);flashrom -p linux_spi:dev=/run/devmap/flashes/MCB_SPI_MASTER_7_DEVICE_1 -v $scm_cpld_filename -c W25X20", diff --git a/fboss/platform/configs/montblanc/led_manager.json b/fboss/platform/configs/montblanc/led_manager.json index 9cfe474ac4058..645e23dc3bc49 100644 --- a/fboss/platform/configs/montblanc/led_manager.json +++ b/fboss/platform/configs/montblanc/led_manager.json @@ -29,57 +29,112 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan1_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan2_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan3_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan4_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan5_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan5_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN6", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan6_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan6_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN7", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan7_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan7_present", + "desiredValue": 1 + } + } }, { "fruName": "FAN8", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_CPLD/fan8_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_CPLD/fan8_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU_L", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/cplds/MCB_CPLD/psu_l_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/cplds/MCB_CPLD/psu_l_present", + "desiredValue": 1 + } + } }, { "fruName": "PSU_R", "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/cplds/MCB_CPLD/psu_r_present" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/cplds/MCB_CPLD/psu_r_present", + "desiredValue": 1 + } + } }, { "fruName": "SMB", "fruType": "SMB", - "presenceSysfsPath": "/run/devmap/cplds/MCB_CPLD/smb_pwrok" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/cplds/MCB_CPLD/smb_pwrok", + "desiredValue": 1 + } + } } ] } diff --git a/fboss/platform/configs/montblanc/sensor_service.json b/fboss/platform/configs/montblanc/sensor_service.json index 93788da5b0856..90edbb3be68a4 100644 --- a/fboss/platform/configs/montblanc/sensor_service.json +++ b/fboss/platform/configs/montblanc/sensor_service.json @@ -599,7 +599,27 @@ "pmUnitName": "NETLAKE", "sensors": [ { - "name": "COMe_PU31_TDA38640_PVNN_PCH_VIN", + "name": "COME_U18_INLET_SENSOR_TMP75_TEMP", + "sysfsPath": "/run/devmap/sensors/COME_TSENSOR1/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 60, + "upperCriticalVal": 65 + }, + "compute": "@/1000" + }, + { + "name": "COME_U39_OUTLET_SENSOR_TMP75_TEMP", + "sysfsPath": "/run/devmap/sensors/COME_TSENSOR2/temp1_input", + "type": 3, + "thresholds": { + "maxAlarmVal": 60, + "upperCriticalVal": 65 + }, + "compute": "@/1000" + }, + { + "name": "COME_PU31_TDA38640_PVNN_PCH_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/in1_input", "type": 1, "thresholds": { @@ -608,7 +628,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_VOUT", + "name": "COME_PU31_TDA38640_PVNN_PCH_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/in2_input", "type": 1, "thresholds": { @@ -618,7 +638,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_TEMP", + "name": "COME_PU31_TDA38640_PVNN_PCH_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/temp1_input", "type": 3, "thresholds": { @@ -628,25 +648,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_PIN", + "name": "COME_PU31_TDA38640_PVNN_PCH_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/power1_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_POUT", + "name": "COME_PU31_TDA38640_PVNN_PCH_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_IIN", + "name": "COME_PU31_TDA38640_PVNN_PCH_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU31_TDA38640_PVNN_PCH_IOUT", + "name": "COME_PU31_TDA38640_PVNN_PCH_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR1/curr2_input", "type": 2, "thresholds": { @@ -655,7 +675,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_VIN", + "name": "COME_PU32_TDA38640_P1V05_STBY_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/in1_input", "type": 1, "thresholds": { @@ -664,7 +684,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_VOUT", + "name": "COME_PU32_TDA38640_P1V05_STBY_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/in2_input", "type": 1, "thresholds": { @@ -674,7 +694,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_TEMP", + "name": "COME_PU32_TDA38640_P1V05_STBY_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/temp1_input", "type": 3, "thresholds": { @@ -684,25 +704,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_PIN", + "name": "COME_PU32_TDA38640_P1V05_STBY_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/power1_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_POUT", + "name": "COME_PU32_TDA38640_P1V05_STBY_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_IIN", + "name": "COME_PU32_TDA38640_P1V05_STBY_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU32_TDA38640_P1V05_STBY_IOUT", + "name": "COME_PU32_TDA38640_P1V05_STBY_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR2/curr2_input", "type": 2, "thresholds": { @@ -711,7 +731,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/in1_input", "type": 1, "thresholds": { @@ -720,7 +740,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/in2_input", "type": 1, "thresholds": { @@ -730,7 +750,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/temp1_input", "type": 3, "thresholds": { @@ -740,25 +760,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", + "name": "COME_PU41_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/power1_input", "type": 0, "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_P1V05_STBY_POUT", + "name": "COME_PU41_TDA38640_P1V05_STBY_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU41_TDA38640_P1V05_STBY_IIN", + "name": "COME_PU41_TDA38640_P1V05_STBY_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU41_TDA38640_P1V05_STBY_IOUT", + "name": "COME_PU41_TDA38640_P1V05_STBY_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR3/curr2_input", "type": 2, "thresholds": { @@ -767,7 +787,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/in1_input", "type": 1, "thresholds": { @@ -776,7 +796,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/in2_input", "type": 1, "thresholds": { @@ -786,7 +806,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/temp1_input", "type": 3, "thresholds": { @@ -796,25 +816,25 @@ "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", + "name": "COME_PU42_TDA38640_1V2_PVDDQ_ABC_CPU_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/power1_input", "type": 0, "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_P1V05_STBY_POUT", + "name": "COME_PU42_TDA38640_P1V05_STBY_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/power2_input", "type": 0, "compute": "@/1000000" }, { - "name": "COMe_PU42_TDA38640_P1V05_STBY_IIN", + "name": "COME_PU42_TDA38640_P1V05_STBY_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/curr1_input", "type": 2, "compute": "@/1000" }, { - "name": "COMe_PU42_TDA38640_P1V05_STBY_IOUT", + "name": "COME_PU42_TDA38640_P1V05_STBY_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR4/curr2_input", "type": 2, "thresholds": { @@ -823,7 +843,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_VIN", + "name": "COME_PU4_XDPE15284_PVCCIN_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in1_input", "type": 1, "thresholds": { @@ -834,7 +854,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_TEMP", + "name": "COME_PU4_XDPE15284_PVCCIN_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/temp1_input", "type": 3, "thresholds": { @@ -844,7 +864,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_TEMP", + "name": "COME_PU4_XDPE15284_P1V8_TEMP", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/temp2_input", "type": 3, "thresholds": { @@ -854,16 +874,16 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_PIN", + "name": "COME_PU4_XDPE15284_PVCCIN_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power1_input", "type": 0, "thresholds": { - "maxAlarmVal": 1024 + "maxAlarmVal": 225 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_IIN", + "name": "COME_PU4_XDPE15284_PVCCIN_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr1_input", "type": 2, "thresholds": { @@ -877,7 +897,7 @@ { "sensors": [ { - "name": "COMe_PU4_XDPE15284_P1V8_VIN", + "name": "COME_PU4_XDPE15284_P1V8_VIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in2_input", "type": 1, "thresholds": { @@ -888,7 +908,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_VOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in3_input", "type": 1, "thresholds": { @@ -899,7 +919,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_VOUT", + "name": "COME_PU4_XDPE15284_P1V8_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in4_input", "type": 1, "thresholds": { @@ -910,34 +930,34 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_PIN", + "name": "COME_PU4_XDPE15284_P1V8_PIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power2_input", "type": 0, "thresholds": { - "maxAlarmVal": 4096 + "maxAlarmVal": 52.5 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_POUT", + "name": "COME_PU4_XDPE15284_PVCCIN_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power3_input", "type": 0, "thresholds": { - "maxAlarmVal": 1024 + "maxAlarmVal": 318.5 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_POUT", + "name": "COME_PU4_XDPE15284_P1V8_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power4_input", "type": 0, "thresholds": { - "maxAlarmVal": 125 + "maxAlarmVal": 15 }, "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_IIN", + "name": "COME_PU4_XDPE15284_P1V8_IIN", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr2_input", "type": 2, "thresholds": { @@ -947,7 +967,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_IOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr3_input", "type": 2, "thresholds": { @@ -957,7 +977,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_IOUT", + "name": "COME_PU4_XDPE15284_P1V8_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr4_input", "type": 2, "thresholds": { @@ -974,7 +994,7 @@ { "sensors": [ { - "name": "COMe_PU4_XDPE15284_PVCCIN_VOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in2_input", "type": 1, "thresholds": { @@ -985,7 +1005,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_VOUT", + "name": "COME_PU4_XDPE15284_P1V8_VOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/in3_input", "type": 1, "thresholds": { @@ -996,7 +1016,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_POUT", + "name": "COME_PU4_XDPE15284_PVCCIN_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power2_input", "type": 0, "thresholds": { @@ -1005,7 +1025,7 @@ "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_POUT", + "name": "COME_PU4_XDPE15284_P1V8_POUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/power3_input", "type": 0, "thresholds": { @@ -1014,7 +1034,7 @@ "compute": "@/1000000" }, { - "name": "COMe_PU4_XDPE15284_PVCCIN_IOUT", + "name": "COME_PU4_XDPE15284_PVCCIN_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr2_input", "type": 2, "thresholds": { @@ -1024,7 +1044,7 @@ "compute": "@/1000" }, { - "name": "COMe_PU4_XDPE15284_P1V8_IOUT", + "name": "COME_PU4_XDPE15284_P1V8_IOUT", "sysfsPath": "/run/devmap/sensors/COME_VOLTAGE_MONITOR5/curr3_input", "type": 2, "thresholds": { @@ -1119,7 +1139,7 @@ "compute": "@/1000" }, { - "name": "PSU1_L_12V_VOUT", + "name": "PSU1_L_12V_MAIN_VOUT", "sysfsPath": "/run/devmap/sensors/PDB_L_PMBUS/in2_input", "type": 1, "thresholds": { @@ -1130,6 +1150,18 @@ }, "compute": "@/1000" }, + { + "name": "PSU1_L_12V_STBY_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_L_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 13.2, + "maxAlarmVal": 12.6, + "minAlarmVal": 11.4, + "lowerCriticalVal": 10.8 + }, + "compute": "@/1000" + }, { "name": "PSU1_L_IIN", "sysfsPath": "/run/devmap/sensors/PDB_L_PMBUS/curr1_input", @@ -1243,7 +1275,7 @@ "compute": "@/1000" }, { - "name": "PSU2_R_12V_VOUT", + "name": "PSU2_R_12V_MAIN_VOUT", "sysfsPath": "/run/devmap/sensors/PDB_R_PMBUS/in2_input", "type": 1, "thresholds": { @@ -1254,6 +1286,18 @@ }, "compute": "@/1000" }, + { + "name": "PSU2_L_12V_STBY_VOUT", + "sysfsPath": "/run/devmap/sensors/PDB_R_PMBUS/in3_input", + "type": 1, + "thresholds": { + "upperCriticalVal": 13.2, + "maxAlarmVal": 12.6, + "minAlarmVal": 11.4, + "lowerCriticalVal": 10.8 + }, + "compute": "@/1000" + }, { "name": "PSU2_R_IIN", "sysfsPath": "/run/devmap/sensors/PDB_R_PMBUS/curr1_input", @@ -1627,7 +1671,7 @@ "sensors": [ { "name": "SMB_LEFT_U51_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR1/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR5/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -1657,7 +1701,7 @@ }, { "name": "SMB_RIGHT_U182_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR4/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR6/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -1768,7 +1812,7 @@ "thresholds": { "upperCriticalVal": 1.98, "maxAlarmVal": 1.89, - "minAlarmVal": 1.7955, + "minAlarmVal": 1.71, "lowerCriticalVal": 1.62 }, "compute": "@/1000" @@ -1780,7 +1824,7 @@ "thresholds": { "upperCriticalVal": 1.21, "maxAlarmVal": 1.155, - "minAlarmVal": 1.09725, + "minAlarmVal": 1.045, "lowerCriticalVal": 0.99 }, "compute": "@/1000" @@ -1792,7 +1836,7 @@ "thresholds": { "upperCriticalVal": 0.99, "maxAlarmVal": 0.945, - "minAlarmVal": 0.89775, + "minAlarmVal": 0.855, "lowerCriticalVal": 0.81 }, "compute": "@/1000" @@ -1804,7 +1848,7 @@ "thresholds": { "upperCriticalVal": 2.75, "maxAlarmVal": 2.625, - "minAlarmVal": 2.49375, + "minAlarmVal": 2.375, "lowerCriticalVal": 2.25 }, "compute": "@/1000" @@ -1816,7 +1860,7 @@ "thresholds": { "upperCriticalVal": 0.88, "maxAlarmVal": 0.84, - "minAlarmVal": 0.798, + "minAlarmVal": 0.76, "lowerCriticalVal": 0.72 }, "compute": "@/1000" @@ -1828,7 +1872,7 @@ "thresholds": { "upperCriticalVal": 1.65, "maxAlarmVal": 1.575, - "minAlarmVal": 1.49625, + "minAlarmVal": 1.425, "lowerCriticalVal": 1.35 }, "compute": "@/1000" @@ -1840,7 +1884,7 @@ "thresholds": { "upperCriticalVal": 1.32, "maxAlarmVal": 1.26, - "minAlarmVal": 1.197, + "minAlarmVal": 1.14, "lowerCriticalVal": 1.08 }, "compute": "@/1000" @@ -1852,7 +1896,7 @@ "thresholds": { "upperCriticalVal": 0.99, "maxAlarmVal": 0.945, - "minAlarmVal": 0.89775, + "minAlarmVal": 0.855, "lowerCriticalVal": 0.81 }, "compute": "@/1000" @@ -3526,7 +3570,7 @@ "sensors": [ { "name": "SMB_3V3_L_U8_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR5/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR1/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -3566,7 +3610,7 @@ "minAlarmVal": 3.135, "lowerCriticalVal": 2.97 }, - "compute": "@/1000" + "compute": "3*@/1000" }, { "name": "SMB_3V3_L_VRM_TEMP", @@ -3854,7 +3898,7 @@ "sensors": [ { "name": "SMB_3V3_R_U8_TEMP", - "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR6/temp1_input", + "sysfsPath": "/run/devmap/sensors/SMB_TSENSOR4/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 85, @@ -3863,7 +3907,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_PIN", + "name": "SMB_3V3_R_VRM_PIN", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power1_input", "type": 0, "thresholds": { @@ -3873,7 +3917,7 @@ "compute": "@/1000000" }, { - "name": "SMB_3V3_L_VRM_VIN", + "name": "SMB_3V3_R_VRM_VIN", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/in1_input", "type": 1, "thresholds": { @@ -3885,7 +3929,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_VOUT", + "name": "SMB_3V3_R_VRM_VOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/in2_input", "type": 1, "thresholds": { @@ -3894,10 +3938,10 @@ "minAlarmVal": 3.135, "lowerCriticalVal": 2.97 }, - "compute": "@/1000" + "compute": "3*@/1000" }, { - "name": "SMB_3V3_L_VRM_TEMP", + "name": "SMB_3V3_R_VRM_TEMP", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/temp1_input", "type": 3, "compute": "@/1000" @@ -3907,7 +3951,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3917,7 +3961,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -3934,7 +3978,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3944,7 +3988,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -3961,7 +4005,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3971,7 +4015,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -3988,7 +4032,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -3998,7 +4042,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { @@ -4015,7 +4059,7 @@ { "sensors": [ { - "name": "SMB_3V3_L_VRM_IOUT", + "name": "SMB_3V3_R_VRM_IOUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/curr3_input", "type": 2, "thresholds": { @@ -4025,7 +4069,7 @@ "compute": "@/1000" }, { - "name": "SMB_3V3_L_VRM_POUT", + "name": "SMB_3V3_R_VRM_POUT", "sysfsPath": "/run/devmap/sensors/3V3_R_MONITOR/power3_input", "type": 0, "thresholds": { diff --git a/fboss/platform/configs/morgan800cc/led_manager.json b/fboss/platform/configs/morgan800cc/led_manager.json index 516dcd3807c28..33e6951796bb2 100644 --- a/fboss/platform/configs/morgan800cc/led_manager.json +++ b/fboss/platform/configs/morgan800cc/led_manager.json @@ -17,42 +17,82 @@ { "fruName": "FAN1", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan1_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan1_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN2", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan2_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan2_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN3", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan3_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan3_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN4", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan4_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan4_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN5", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan5_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan5_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN6", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan6_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan6_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN7", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan7_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan7_presence", + "desiredValue": 1 + } + } }, { "fruName": "FAN8", "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/MCB_FAN_PWM/fan8_presence" + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/MCB_FAN_PWM/fan8_presence", + "desiredValue": 1 + } + } } ] } diff --git a/fboss/platform/configs/morgan800cc/sensor_service.json b/fboss/platform/configs/morgan800cc/sensor_service.json index 487f724b9258a..f74bb75612a91 100644 --- a/fboss/platform/configs/morgan800cc/sensor_service.json +++ b/fboss/platform/configs/morgan800cc/sensor_service.json @@ -433,7 +433,7 @@ }, { "name": "CPU_CORE_TEMP_0", - "sysfsPath": "/sys/bus/platform/devices/coretemp.0/hwmon/hwmon1/temp1_input", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 105, @@ -443,7 +443,7 @@ }, { "name": "SSD", - "sysfsPath": "/sys/block/nvme0n1/device/hwmon0/temp1_input", + "sysfsPath": "/run/devmap/sensors/NVME/temp1_input", "type": 3, "thresholds": { "upperCriticalVal": 83, diff --git a/fboss/platform/configs/tahan800bc/fan_service.json b/fboss/platform/configs/tahan800bc/fan_service.json index adfa780d468ed..f435222c5a3c0 100644 --- a/fboss/platform/configs/tahan800bc/fan_service.json +++ b/fboss/platform/configs/tahan800bc/fan_service.json @@ -114,7 +114,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -128,7 +127,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -142,7 +140,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -156,7 +153,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -170,7 +166,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -184,7 +179,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -198,7 +192,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -212,7 +205,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -226,7 +218,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan1_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -240,7 +231,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan2_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan1_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan1:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -254,7 +244,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan3_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -268,7 +257,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan4_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan2_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan2:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -282,7 +270,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan5_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -296,7 +283,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan6_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan3_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan3:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -310,7 +296,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan7_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, @@ -324,7 +309,6 @@ "rpmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/fan8_input", "pwmSysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD_2/pwm3", "presenceSysfsPath": "/run/devmap/sensors/BCB_FAN_2/fan4_present", - "ledSysfsPath": "/run/devmap/sensors/BCB_FAN_2/leds/fan4:blue:status/brightness", "pwmMin": 1, "pwmMax": 255, "fanPresentVal": 1, diff --git a/fboss/platform/configs/tahan800bc/sensor_service.json b/fboss/platform/configs/tahan800bc/sensor_service.json index 19aa4daef05ef..8cbf96c9705de 100644 --- a/fboss/platform/configs/tahan800bc/sensor_service.json +++ b/fboss/platform/configs/tahan800bc/sensor_service.json @@ -1,101 +1,5 @@ { "pmUnitSensorsList": [ - { - "slotPath": "/", - "pmUnitName": "CPU_CARD", - "sensors": [ - { - "name": "CPU_UNCORE_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE0_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE1_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE2_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE3_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE4_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE5_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE6_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - }, - { - "name": "CPU_CORE7_TEMP", - "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", - "type": 3, - "thresholds": { - "upperCriticalVal": 100, - "maxAlarmVal": 90 - }, - "compute": "@/1000" - } - ] - }, { "slotPath": "/PDB_SLOT@0", "pmUnitName": "PDB_CARD", @@ -202,8 +106,98 @@ }, { "slotPath": "/", - "pmUnitName": "FCB_CARD", + "pmUnitName": "TAHAN", "sensors": [ + { + "name": "CPU_UNCORE_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp1_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE0_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp2_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE1_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp3_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE2_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp4_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE3_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp5_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE4_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp6_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE5_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp7_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE6_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp8_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, + { + "name": "CPU_CORE7_TEMP", + "sysfsPath": "/run/devmap/sensors/CPU_CORE_TEMP/temp9_input", + "type": 3, + "thresholds": { + "upperCriticalVal": 100, + "maxAlarmVal": 90 + }, + "compute": "@/1000" + }, { "name": "FCB_FANTRAY1_PWM3", "sysfsPath": "/run/devmap/sensors/SMB_BCB_FAN_CPLD/pwm3", @@ -397,13 +391,7 @@ "minAlarmVal": 2900, "lowerCriticalVal": 1500 } - } - ] - }, - { - "slotPath": "/", - "pmUnitName": "SMB_CARD", - "sensors": [ + }, { "name": "SMB_E1S_SSD_TEMP", "sysfsPath": "/run/devmap/sensors/SMB_E1S_SSD_TEMP/temp1_input", diff --git a/fboss/platform/data_corral_service/BUCK b/fboss/platform/data_corral_service/BUCK index d112d4df56b1c..1bfd2aea11f57 100644 --- a/fboss/platform/data_corral_service/BUCK +++ b/fboss/platform/data_corral_service/BUCK @@ -31,6 +31,7 @@ cpp_library( "//fb303:service_data", "//fboss/lib:common_file_utils", "//fboss/platform/data_corral_service/if:led_manager-cpp2-types", + "//fboss/platform/platform_manager:utils", "//folly:string", "//folly/logging:logging", ], diff --git a/fboss/platform/data_corral_service/ConfigValidator.cpp b/fboss/platform/data_corral_service/ConfigValidator.cpp index a1ff889cae4f5..1a69364ee2474 100644 --- a/fboss/platform/data_corral_service/ConfigValidator.cpp +++ b/fboss/platform/data_corral_service/ConfigValidator.cpp @@ -50,8 +50,8 @@ bool ConfigValidator::isValidFruConfig( XLOG(ERR) << "FruName cannot be empty"; return false; } - if (fruConfig.presenceSysfsPath()->empty()) { - XLOG(ERR) << "PresenceSysfsPath cannot be empty"; + if (!isValidPresenceConfig(*fruConfig.presenceDetection())) { + XLOG(ERR) << "PresenceDetection is invalid"; return false; } return true; @@ -80,4 +80,46 @@ bool ConfigValidator::isValidFruConfigs( return true; } +bool ConfigValidator::isValidPresenceConfig(const PresenceDetection& config) { + // Both cannot be present + if (config.sysfsFileHandle() && config.gpioLineHandle()) { + XLOG(ERR) + << "Only one of GpioLineHandle or SysfsFileHandle must be set for PresenceDetection"; + return false; + } + if (!config.sysfsFileHandle() && !config.gpioLineHandle()) { + XLOG(ERR) + << "GpioLineHandle or SysfsFileHandle must be set for PresenceDetection"; + return false; + } + + if (config.sysfsFileHandle()) { + if (config.sysfsFileHandle()->presenceFilePath()->empty()) { + XLOG(ERR) << "Sysfs path cannot be empty"; + return false; + } + if (config.sysfsFileHandle()->desiredValue() < 0) { + XLOG(ERR) + << "desiredValue for SysfsFileHandle cannot be < 0. Typically 0 or 1"; + return false; + } + } + if (config.gpioLineHandle()) { + if (config.gpioLineHandle()->charDevPath()->empty()) { + XLOG(ERR) << "charDevPath for GpioLineHandle cannot be empty"; + return false; + } + if (config.gpioLineHandle()->desiredValue() < 0) { + XLOG(ERR) + << "desiredValue for GpioLineHandle cannot be < 0. Typically 0 or 1"; + return false; + } + if (config.gpioLineHandle()->lineIndex() < 0) { + XLOG(ERR) << "lineIndex for GpioLineHandle cannot be < 0."; + return false; + } + } + return true; +} + } // namespace facebook::fboss::platform::data_corral_service diff --git a/fboss/platform/data_corral_service/ConfigValidator.h b/fboss/platform/data_corral_service/ConfigValidator.h index be343738d8fbe..3026c60d61569 100644 --- a/fboss/platform/data_corral_service/ConfigValidator.h +++ b/fboss/platform/data_corral_service/ConfigValidator.h @@ -18,5 +18,6 @@ class ConfigValidator { bool isValidFruConfigs( const std::vector& fruConfigs, const std::map& fruTypeLedConfigs); + bool isValidPresenceConfig(const PresenceDetection& presenceConfig); }; } // namespace facebook::fboss::platform::data_corral_service diff --git a/fboss/platform/data_corral_service/FruPresenceExplorer.cpp b/fboss/platform/data_corral_service/FruPresenceExplorer.cpp index 1678472abd017..20813a619b9dd 100644 --- a/fboss/platform/data_corral_service/FruPresenceExplorer.cpp +++ b/fboss/platform/data_corral_service/FruPresenceExplorer.cpp @@ -8,7 +8,9 @@ #include #include "fboss/lib/CommonFileUtils.h" +#include "fboss/platform/platform_manager/Utils.h" +using namespace facebook::fboss::platform; namespace { auto constexpr kFruPresence = "fru_presence_explorer.{}.presence"; auto constexpr kSystem = "SYSTEM"; @@ -25,13 +27,21 @@ void FruPresenceExplorer::detectFruPresence() { XLOG(INFO) << "Detecting presence of FRUs"; fruTypePresence_.clear(); for (const auto& fruConfig : fruConfigs_) { + bool present = false; auto fruType = *fruConfig.fruType(); try { - auto value = std::stoi( - readSysfs(*fruConfig.presenceSysfsPath()).c_str(), - nullptr, - 0 /*determine base by format*/); - auto present = value > 0 ? true : false; + // ConfigValidator guarantees one of these must be present + if (fruConfig.presenceDetection()->sysfsFileHandle()) { + XLOG(INFO) << "Detecting presence of " << *fruConfig.fruName() + << " (via sysfs)"; + present = detectFruSysfsPresence( + *fruConfig.presenceDetection()->sysfsFileHandle()); + } else if (fruConfig.presenceDetection()->gpioLineHandle()) { + XLOG(INFO) << "Detecting presence of " << *fruConfig.fruName() + << " (via gpio)"; + present = detectFruGpioPresence( + *fruConfig.presenceDetection()->gpioLineHandle()); + } if (fruTypePresence_.find(fruType) == fruTypePresence_.end()) { fruTypePresence_[fruType] = present; } else { @@ -62,6 +72,21 @@ void FruPresenceExplorer::detectFruPresence() { ledManager_->programSystemLed(allFrusPresent); } +bool FruPresenceExplorer::detectFruSysfsPresence( + const SysfsFileHandle& handle) { + auto value = std::stoi( + readSysfs(*handle.presenceFilePath()).c_str(), + nullptr, + 0 /*determine base by format*/); + return value == *handle.desiredValue(); +} + +bool FruPresenceExplorer::detectFruGpioPresence(const GpioLineHandle& handle) { + auto value = platform_manager::Utils().getGpioLineValue( + handle.charDevPath()->c_str(), *handle.lineIndex()); + return value == *handle.desiredValue(); +} + bool FruPresenceExplorer::isPresent(const std::string& fruType) const { if (fruTypePresence_.find(fruType) == fruTypePresence_.end()) { return false; diff --git a/fboss/platform/data_corral_service/FruPresenceExplorer.h b/fboss/platform/data_corral_service/FruPresenceExplorer.h index a1ba131ff976f..f0909abcc202b 100644 --- a/fboss/platform/data_corral_service/FruPresenceExplorer.h +++ b/fboss/platform/data_corral_service/FruPresenceExplorer.h @@ -27,6 +27,9 @@ class FruPresenceExplorer { bool isAllPresent() const; private: + bool detectFruSysfsPresence(const SysfsFileHandle& handle); + bool detectFruGpioPresence(const GpioLineHandle& handle); + const std::vector fruConfigs_; const std::shared_ptr ledManager_; std::unordered_map fruTypePresence_; diff --git a/fboss/platform/data_corral_service/if/led_manager_config.thrift b/fboss/platform/data_corral_service/if/led_manager_config.thrift index 2c8de18de0e62..3e1d3d0e1bb33 100644 --- a/fboss/platform/data_corral_service/if/led_manager_config.thrift +++ b/fboss/platform/data_corral_service/if/led_manager_config.thrift @@ -30,11 +30,39 @@ struct LedConfig { // // `fruType`: Type of FRU. E.g FAN, PEM, PSU // -// `presenceSysfsPath`: Sysfs path to detect presence of this FRU. +// `presenceDetection`: Sysfs path or Gpio line to detect presence of this FRU. struct FruConfig { 1: string fruName; 2: string fruType; - 3: string presenceSysfsPath; + 3: PresenceDetection presenceDetection; +} + +// `presenceFileName`: The path of the file which will contain the presence +// information. +// +// `desiredValue`: The value which will indicate that the device is present. +struct SysfsFileHandle { + 1: string presenceFilePath; + 2: i16 desiredValue; +} + +// `charDevPath`: Filepath of the gpiochip +// +// `lineIndex`: The gpio line number which will indicate the presence of the +// device. +// +// `desiredValue`: The value which will indicate that the device is present. +struct GpioLineHandle { + 1: string charDevPath; + 2: i32 lineIndex; + 3: i16 desiredValue; +} + +// The presence detection can be based on GPIO registers or sysfs paths. Only +// one of them should be populated +struct PresenceDetection { + 1: optional GpioLineHandle gpioLineHandle; + 2: optional SysfsFileHandle sysfsFileHandle; } // Main struct to support generic LED programming for presence. diff --git a/fboss/platform/data_corral_service/tests/BUCK b/fboss/platform/data_corral_service/tests/BUCK index ab4b6b794e70a..b91adb0ab438a 100644 --- a/fboss/platform/data_corral_service/tests/BUCK +++ b/fboss/platform/data_corral_service/tests/BUCK @@ -25,6 +25,7 @@ cpp_unittest( deps = [ "//fboss/platform/config_lib:config_lib", "//fboss/platform/data_corral_service:config_validator", + "//folly/logging:logging", "//thrift/lib/cpp2/protocol:protocol", ], ) diff --git a/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp b/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp index c3cf8b3a3de02..ec0e26734dc9b 100644 --- a/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp +++ b/fboss/platform/data_corral_service/tests/ConfigValidatorTest.cpp @@ -1,3 +1,4 @@ +#include #include #include @@ -28,11 +29,28 @@ LedConfig getValidLedConfig() { return ledConfig; } +PresenceDetection getValidSysfsPresenceDetection() { + auto presenceDetection = PresenceDetection(); + presenceDetection.sysfsFileHandle() = SysfsFileHandle(); + presenceDetection.sysfsFileHandle()->presenceFilePath() = + "/sys/class/present/0"; + return presenceDetection; +} + +PresenceDetection getValidGpioPresenceDetection() { + auto presenceDetection = PresenceDetection(); + presenceDetection.gpioLineHandle() = GpioLineHandle(); + presenceDetection.gpioLineHandle()->charDevPath() = "/dev/gpiochip0"; + presenceDetection.gpioLineHandle()->lineIndex() = 0; + presenceDetection.gpioLineHandle()->desiredValue() = 1; + return presenceDetection; +} + FruConfig getValidFruConfig() { auto fruConfig = FruConfig(); fruConfig.fruName() = "fru1"; fruConfig.fruType() = "type1"; - fruConfig.presenceSysfsPath() = "/sys/class/present"; + fruConfig.presenceDetection() = getValidSysfsPresenceDetection(); return fruConfig; } @@ -70,7 +88,13 @@ TEST(ConfigValidatorTest, InvalidFruConfig) { EXPECT_FALSE(ConfigValidator().isValid(config)); config = getValidLedManagerConfig(); - config.fruConfigs()->at(0).presenceSysfsPath() = ""; + config.fruConfigs()->at(0).presenceDetection() = + getValidGpioPresenceDetection(); + config.fruConfigs() + ->at(0) + .presenceDetection() + ->gpioLineHandle() + ->lineIndex() = -1; EXPECT_FALSE(ConfigValidator().isValid(config)); config = getValidLedManagerConfig(); @@ -85,6 +109,24 @@ TEST(ConfigValidatorTest, InvalidFruTypeLedConfig) { EXPECT_FALSE(ConfigValidator().isValid(config)); } +TEST(ConfigValidatorTest, InvalidPresenceDetection) { + auto config = getValidSysfsPresenceDetection(); + config.sysfsFileHandle()->presenceFilePath() = ""; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); + + config = getValidGpioPresenceDetection(); + config.gpioLineHandle()->charDevPath() = ""; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); + + config = getValidGpioPresenceDetection(); + config.gpioLineHandle()->desiredValue() = -1; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); + + config = getValidGpioPresenceDetection(); + config.gpioLineHandle()->lineIndex() = -1; + EXPECT_FALSE(ConfigValidator().isValidPresenceConfig(config)); +} + TEST(ConfigValidatorTest, RealConfigsValid) { for (const auto& platform : {kDarwin, @@ -94,6 +136,7 @@ TEST(ConfigValidatorTest, RealConfigsValid) { kMontblanc, kMorgan800cc, kTahan800bc}) { + XLOG(INFO) << "Validating config for " << platform; LedManagerConfig config; auto configJson = facebook::fboss::platform::ConfigLib().getLedManagerConfig(platform); diff --git a/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp b/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp index f544eaa776194..0ae6744f28137 100644 --- a/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp +++ b/fboss/platform/data_corral_service/tests/FruPresenceExplorerTests.cpp @@ -29,17 +29,29 @@ class FruPresenceExplorerTests : public Test { auto fan1 = FruConfig(); fan1.fruName() = "FAN1"; fan1.fruType() = "FAN"; - fan1.presenceSysfsPath() = TemporaryFile().path().string(); + fan1.presenceDetection() = PresenceDetection(); + fan1.presenceDetection()->sysfsFileHandle() = SysfsFileHandle(); + fan1.presenceDetection()->sysfsFileHandle()->presenceFilePath() = + TemporaryFile().path().string(); + fan1.presenceDetection()->sysfsFileHandle()->desiredValue() = 1; auto fan2 = FruConfig(); fan2.fruName() = "FAN2"; fan2.fruType() = "FAN"; - fan2.presenceSysfsPath() = TemporaryFile().path().string(); + fan2.presenceDetection() = PresenceDetection(); + fan2.presenceDetection()->sysfsFileHandle() = SysfsFileHandle(); + fan2.presenceDetection()->sysfsFileHandle()->presenceFilePath() = + TemporaryFile().path().string(); + fan2.presenceDetection()->sysfsFileHandle()->desiredValue() = 1; auto pem1 = FruConfig(); pem1.fruName() = "PEM1"; pem1.fruType() = "PEM"; - pem1.presenceSysfsPath() = TemporaryFile().path().string(); + pem1.presenceDetection() = PresenceDetection(); + pem1.presenceDetection()->sysfsFileHandle() = SysfsFileHandle(); + pem1.presenceDetection()->sysfsFileHandle()->presenceFilePath() = + TemporaryFile().path().string(); + pem1.presenceDetection()->sysfsFileHandle()->desiredValue() = 1; fruConfigs_ = std::vector{fan1, fan2, pem1}; } @@ -53,9 +65,24 @@ class FruPresenceExplorerTests : public Test { }; TEST_F(FruPresenceExplorerTests, FrusAllPresent) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", true)) .WillOnce(Return(true)); @@ -69,9 +96,24 @@ TEST_F(FruPresenceExplorerTests, FrusAllPresent) { } TEST_F(FruPresenceExplorerTests, FrusNotAllPresent) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "0")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", false)) .WillOnce(Return(true)); @@ -85,9 +127,20 @@ TEST_F(FruPresenceExplorerTests, FrusNotAllPresent) { } TEST_F(FruPresenceExplorerTests, PresenceDetectionFail) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "1")); - fruConfigs_[1].presenceSysfsPath() = "INVALID_PATH"; - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); + fruConfigs_[1].presenceDetection()->sysfsFileHandle()->presenceFilePath() = + "INVALID_PATH"; + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "1")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", false)) .WillOnce(Return(true)); @@ -101,9 +154,24 @@ TEST_F(FruPresenceExplorerTests, PresenceDetectionFail) { } TEST_F(FruPresenceExplorerTests, PresenceDetectionHexadecimal) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "0x1")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "0x01")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "0x001")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x1")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x01")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x001")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", true)) .WillOnce(Return(true)); @@ -117,9 +185,24 @@ TEST_F(FruPresenceExplorerTests, PresenceDetectionHexadecimal) { } TEST_F(FruPresenceExplorerTests, AbsenceDetectionHexadecimal) { - EXPECT_TRUE(writeSysfs(*fruConfigs_[0].presenceSysfsPath(), "0x0")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[1].presenceSysfsPath(), "0x00")); - EXPECT_TRUE(writeSysfs(*fruConfigs_[2].presenceSysfsPath(), "0x000")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[0] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x0")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[1] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x00")); + EXPECT_TRUE(writeSysfs( + *fruConfigs_[2] + .presenceDetection() + ->sysfsFileHandle() + ->presenceFilePath(), + "0x000")); EXPECT_CALL(*mockLedManager_, programFruLed("FAN", false)) .WillOnce(Return(true)); diff --git a/fboss/platform/fbdevd/BUCK b/fboss/platform/fbdevd/BUCK deleted file mode 100644 index 6861a1f40b1e1..0000000000000 --- a/fboss/platform/fbdevd/BUCK +++ /dev/null @@ -1,60 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") - -oncall("fboss_platform") - -cpp_library( - name = "fbdevd_impl", - srcs = [ - "FbdevdImpl.cpp", - ], - headers = [ - "FbdevdImpl.h", - ], - exported_deps = [ - "//fboss/platform/config_lib:config_lib", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-types", - "//folly:synchronized", - "//folly/logging:logging", - "//thrift/lib/cpp2/protocol:protocol", - ], -) - -cpp_library( - name = "i2c_utils", - srcs = [ - "I2cController.cpp", - ], - exported_deps = [ - "fbsource//third-party/fmt:fmt", - "//fboss/lib:common_file_utils", - "//fboss/lib:devmap", - ], -) - -cpp_library( - name = "fru_manager", - srcs = [ - "FruManager.cpp", - ], - exported_deps = [ - ":i2c_utils", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-services", - ], -) - -cpp_binary( - name = "fbdevd", - srcs = [ - "Main.cpp", - ], - deps = [ - ":fbdevd_impl", - "//fb303:logging", - "//fboss/platform/fbdevd/if:fbdevd-cpp2-services", - "//fboss/platform/helpers:init", - "//folly/executors:function_scheduler", - "//folly/logging:init", - "//folly/logging:logging", - ], -) diff --git a/fboss/platform/fbdevd/FbdevdImpl.cpp b/fboss/platform/fbdevd/FbdevdImpl.cpp deleted file mode 100644 index d016f0e660e8e..0000000000000 --- a/fboss/platform/fbdevd/FbdevdImpl.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "fboss/platform/fbdevd/FbdevdImpl.h" - -#include -#include - -#include "fboss/platform/config_lib/ConfigLib.h" -#include "folly/Synchronized.h" - -namespace facebook::fboss::platform::fbdevd { -using namespace facebook::fboss::platform::fbdevd; - -void FbdevdImpl::initPlatformConfig() { - std::string fbdevdConfJson = ConfigLib().getFbdevdConfig(); - apache::thrift::SimpleJSONSerializer::deserialize( - fbdevdConfJson, fbdevdConfig_); - - XLOG(DBG2) << apache::thrift::SimpleJSONSerializer::serialize( - fbdevdConfig_); -} - -FbdevdImpl::~FbdevdImpl() = default; - -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/FbdevdImpl.h b/fboss/platform/fbdevd/FbdevdImpl.h deleted file mode 100644 index 6305cdc3a05fe..0000000000000 --- a/fboss/platform/fbdevd/FbdevdImpl.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include "fboss/platform/fbdevd/if/gen-cpp2/fbdevd_types.h" - -namespace facebook::fboss::platform::fbdevd { - -using namespace facebook::fboss::platform::fbdevd; - -class FbdevdImpl { - public: - ~FbdevdImpl(); - explicit FbdevdImpl() { - initPlatformConfig(); - } - - private: - FbdevdConfig fbdevdConfig_; - - void initPlatformConfig(); -}; - -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/FruManager.cpp b/fboss/platform/fbdevd/FruManager.cpp deleted file mode 100644 index c9f514edda225..0000000000000 --- a/fboss/platform/fbdevd/FruManager.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#include - -#include "fboss/platform/fbdevd/FruManager.h" -#include "fboss/platform/fbdevd/I2cController.h" - -namespace facebook::fboss::platform::fbdevd { - -FruManager::FruManager(const FruModule& fru) { - // TODO: store FruModule(thrift) structure for future reference. - - // Process FRU hotplug event for the first time. - processEvents(); -} - -bool FruManager::isPresent() { - // TODO: determine if the FRU is plugged/removed by reading FruModule - // "fruState" config. - return true; -} - -void FruManager::processEvents() { - bool curState = isPresent(); - - if (curState != isPresent_) { - if (curState) { - // Handle newly-plugged FRU - // TODO: - // 1. trigger FruModule.initOps - // 2. create i2c client devices - } else { - // Handle FRU removal event - // TODO: - // 1. remove i2c client devices - // 2. trigger FruModule.cleanupOps - } - - isPresent_ = curState; - } -} -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/FruManager.h b/fboss/platform/fbdevd/FruManager.h deleted file mode 100644 index 66e6c197edb7f..0000000000000 --- a/fboss/platform/fbdevd/FruManager.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#pragma once - -#include - -#include "fboss/platform/fbdevd/if/gen-cpp2/FbdevManager.h" - -namespace facebook::fboss::platform::fbdevd { - -class FruManager { - public: - explicit FruManager(const FruModule& fru); - ~FruManager() = default; - - // Test if the FRU is present/connected or not. - bool isPresent(); - - // processEvents() function need to be triggered periodically to detect - // and handle FRU hotplug events. - void processEvents(); - - private: - bool isPresent_ = false; // Assume FRU is unplugged at "fbdevd" starts. -}; -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/I2cController.cpp b/fboss/platform/fbdevd/I2cController.cpp deleted file mode 100644 index db327dcc888a7..0000000000000 --- a/fboss/platform/fbdevd/I2cController.cpp +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#include - -#include "fboss/lib/CommonFileUtils.h" -#include "fboss/lib/DevMap.h" -#include "fboss/platform/fbdevd/I2cController.h" - -namespace fs = std::filesystem; - -namespace facebook::fboss::platform::fbdevd { - -bool I2cController::isDeviceCreated(uint16_t addr) { - return createdDevices_.find(addr) != createdDevices_.end(); -} - -void I2cController::newDevice(uint16_t addr, const std::string& name) { - if (isDeviceCreated(addr)) { - return; - } - - // Send "name address" string to the sysfs file to initiate device - // creation. - std::string inStr = name + " " + std::to_string(addr); - if (!facebook::fboss::writeSysfs(sysI2cNewDevice_.string(), inStr)) { - throw std::runtime_error(fmt::format( - "I2C bus {}: failed to create device at address {}", busName_, addr)); - } - - createdDevices_.insert(addr); -} - -void I2cController::deleteDevice(uint16_t addr) { - if (!isDeviceCreated(addr)) { - return; - } - - // Send "address" string to the sysfs file to delete the I2C device. - std::string addrStr = std::to_string(addr); - if (!facebook::fboss::writeSysfs(sysI2cDelDevice_.string(), addrStr)) { - throw std::runtime_error(fmt::format( - "I2C bus {}: failed to delete device at address {}", busName_, addr)); - } - - createdDevices_.erase(addr); -} - -I2cController::I2cController(const std::string& busName) { - busName_ = busName; - sysI2cBusDir_ = facebook::fboss::resolveI2cSysfs(busName); - if (!fs::exists(sysI2cBusDir_)) { - throw std::runtime_error(busName + " sysfs/i2c path does not exist"); - } - - // Initialize "createdDevices_" set by looking for device entries in - // "sysI2cBusDir_" whose name starts with "-". - // - "sysI2cBusDir" format: /sys/bus/i2c/devices/i2c- - // - device entries under "sysI2cBusDir": -<4-byte-hex-addr> - std::string busId = sysI2cBusDir_.filename().string(); - std::string busPrefix = "i2c-"; - std::string devPrefix = busId.substr(busPrefix.length()) + "-"; - for (auto const& dirEntry : fs::directory_iterator(sysI2cBusDir_)) { - std::string fileName = dirEntry.path().filename().string(); - if (fileName.find(devPrefix) == 0) { - std::string addrStr = fileName.substr(devPrefix.length()); - uint16_t addr = std::stoul(addrStr, nullptr, 16); - createdDevices_.insert(addr); - } - } - - // Store below 2 files for easier reference in new|deleteDevice(). - sysI2cNewDevice_ = sysI2cBusDir_ / "new_device"; - sysI2cDelDevice_ = sysI2cBusDir_ / "delete_device"; -} -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/I2cController.h b/fboss/platform/fbdevd/I2cController.h deleted file mode 100644 index c2af0161eefe3..0000000000000 --- a/fboss/platform/fbdevd/I2cController.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#pragma once - -#include -#include -#include - -// This file contains APIs to create/delete I2C client devices via the -// Linux sysfs interface. For details, please refer to: -// https://www.kernel.org/doc/Documentation/i2c/instantiating-devices - -namespace facebook::fboss::platform::fbdevd { - -class I2cController { - public: - explicit I2cController(const std::string& busName); - ~I2cController() = default; - - // Test if I2C client device at given "addr" was already created. - bool isDeviceCreated(uint16_t addr); - - // Create I2C client device at "addr" with given "name". - void newDevice(uint16_t addr, const std::string& name); - - // Remove the I2C client device at "addr" from the bus. - void deleteDevice(uint16_t addr); - - private: - std::string busName_{}; - std::filesystem::path sysI2cBusDir_{}; - std::filesystem::path sysI2cNewDevice_{}; - std::filesystem::path sysI2cDelDevice_{}; - std::set createdDevices_ = {}; -}; - -} // namespace facebook::fboss::platform::fbdevd diff --git a/fboss/platform/fbdevd/Main.cpp b/fboss/platform/fbdevd/Main.cpp deleted file mode 100644 index 4af93fcc111a9..0000000000000 --- a/fboss/platform/fbdevd/Main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -#include -#include -#include -#include - -#include "fboss/platform/fbdevd/FbdevdImpl.h" -#include "fboss/platform/fbdevd/if/gen-cpp2/FbdevManager.h" -#include "fboss/platform/helpers/Init.h" - -using namespace facebook; -using namespace facebook::fboss::platform; -using namespace facebook::fboss::platform::fbdevd; - -FOLLY_INIT_LOGGING_CONFIG("fboss=DBG2; default:async=true"); - -int main(int argc, char** argv) { - fb303::registerFollyLoggingOptionHandlers(); - helpers::init(&argc, &argv); - - auto serviceImpl = std::make_shared(); - - // Set up scheduler. - folly::FunctionScheduler scheduler; - scheduler.start(); - - return 0; -} diff --git a/fboss/platform/fbdevd/if/BUCK b/fboss/platform/fbdevd/if/BUCK deleted file mode 100644 index 2dc5f5131fd40..0000000000000 --- a/fboss/platform/fbdevd/if/BUCK +++ /dev/null @@ -1,39 +0,0 @@ -load("@fbcode_macros//build_defs:thrift_library.bzl", "thrift_library") - -oncall("fboss_platform") - -thrift_library( - name = "gpio", - languages = [ - "cpp2", - "rust", - ], - thrift_cpp2_options = "json", - thrift_rust_options = ["deprecated_default_enum_min_i32"], - thrift_srcs = {"gpio.thrift": []}, -) - -thrift_library( - name = "i2c", - languages = [ - "cpp2", - "rust", - ], - thrift_cpp2_options = "json", - thrift_srcs = {"i2c.thrift": []}, -) - -thrift_library( - name = "fbdevd", - languages = [ - "cpp2", - "rust", - ], - thrift_cpp2_options = "json", - thrift_rust_options = ["deprecated_default_enum_min_i32"], - thrift_srcs = {"fbdevd.thrift": ["FbdevManager"]}, - deps = [ - ":gpio", - ":i2c", - ], -) diff --git a/fboss/platform/fbdevd/if/fbdevd.thrift b/fboss/platform/fbdevd/if/fbdevd.thrift deleted file mode 100644 index 29c66aac979c1..0000000000000 --- a/fboss/platform/fbdevd/if/fbdevd.thrift +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -namespace cpp2 facebook.fboss.platform.fbdevd - -include "fboss/platform/fbdevd/if/gpio.thrift" -include "fboss/platform/fbdevd/if/i2c.thrift" - -// This file contains data types for describing the hardware components -// and device topology of FBOSS switches. - -// "SysfsFileHandle" is designed for reading/writing sysfs files. -// - "sysfsPath" must be an absolute path, or a symlink to an absolute -// path. -// - If "isWrite" is true, "desiredValue" will be written to the sysfs -// entry. -// - If "isWrite" is false (default), it will trigger file read, and -// callers may compare the return data with "desiredValue". -// -// Please refer to below URLs for Linux sysfs interface: -// - https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt -// - https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html -struct SysfsFileHandle { - 1: string sysfsPath; - 2: string desiredValue; - 3: bool isWrite = false; -} - -// "SimpleIO" in this context refers to a simple (one-line) instruction, -// such as toggling a GPIO line, reading/writing a sysfs file, etc. -// Such instructions are widely used in FBOSS environment to configure -// hardware and/or determine the states of hardware components. -// Currently, only 2 operations are supported in "SimpleIO": -// - SIO_GPIO : setting/getting a GPIO line. -// - SIO_SYSFS: reading/writing a string from/to SYSFS file. -enum SimpleIoDeviceType { - SIO_GPIO = 1, - SIO_SYSFS = 2, -} - -union SimpleIoDevice { - 1: gpio.GpioLineHandle gpioHandle; - 2: SysfsFileHandle sysfsHandle; -} - -struct SimpleIoHandle { - 1: SimpleIoDeviceType ioType; - 2: SimpleIoDevice device; - - // If "delayMS" is set to a positive value, the corresponding delay ( - // in milliseconds) will be introduced after the SimpleIO. Otherwise, - // the field is ignored. - 3: i32 delayMs; -} - -enum ConditionType { - COND_GPIO_MATCH = 1, - COND_SYSFS_MATCH = 2, -} - -// "ConditionMatch" is used to define conditional statement, to test if -// a certain GPIO line or sysfs file reports desired value. -struct ConditionMatch { - 1: ConditionType condType; - 2: SimpleIoDevice device; -} - -// Trigger a list of SimpleIO when a certain condition is met. -struct ConditionalSimpleIo { - 1: list actions; - 2: optional ConditionMatch isRequired; -} - -// "FruModule" is used to describe a FRU (Field Replaceable Unit). -struct FruModule { - 1: string fruName; - - // Check if a FRU is plugged/removed by testing if the given GPIO line - // or sysfs file reports the desired value. - 2: ConditionMatch fruState; - - // Instructions to initialize the FRU when it's plugged. - // It's normal to keep the lists empty. - 3: ConditionalSimpleIo initOps; - - // Instructions to clean up resources when the FRU is unplugged. - // It's normal to keep the lists empty. - 4: list cleanupOps; - - // I2C client devices on the FRU. The devices need to be created when - // the FRU is plugged, and will be removed when the FRU is unplugged. - 5: list i2cClients; - - // Nested FRUs if any. - 6: list childFruList; -} - -// Structure to describe a specific FBOSS switch. -struct FbdevdConfig { - 1: string platformName; - - // List of kernel modules that need to be loaded. It's no-op if the - // modules were already loaded. - 2: list kmods; - - // List of instructions to bootstrap the platform, such as toggling - // GPIOs, bringing devices out of reset, etc. - // It's normal to have empty "bootstrap". - 3: ConditionalSimpleIo bootstrap; - - // I2C client devices on the chassis that need to be instantiated after - // system boot up. It's no-op if some devices were already created, and - // we don't remove these devices when "fbdevd" exits. - 4: list i2cClients; - - // List of FRUs. - 5: list fruList; -} - -// No service functions at present. -service FbdevManager { -} diff --git a/fboss/platform/fbdevd/if/gpio.thrift b/fboss/platform/fbdevd/if/gpio.thrift deleted file mode 100644 index 309ca9072c3e5..0000000000000 --- a/fboss/platform/fbdevd/if/gpio.thrift +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -namespace cpp2 facebook.fboss.platform.fbdevd.gpio - -enum GpioValue { - GPIO_LOW = 0, - GPIO_HIGH = 1, -} - -enum GpioDirection { - GPIO_DIR_OUT = 0, - GPIO_DIR_IN = 1, -} - -// A GPIO line can be specified by either pair, or -// global-unique assigned in ACPI or Device Tree. -// - "gpioChip" must be the symlink name under /run/devmap/gpiochips/. -// - "lineName" is optional. If supplied, pair -// will be updated at runtime, based on the result of gpiofind. -// - GPIO lines are active high by default, unless "activeLow" is set -// to true explicitly. -struct GpioLine { - 1: string gpioChip; - 2: i32 offset; - 3: optional string lineName; - 4: bool activeLow = false; -} - -// Structure to deal with GPIO Line access (set/get GPIO). -// - If "isWrite" is True, the GPIO line's direction is set to OUT, -// and line level is updated to "desiredValue". -// - If "isWrite" is False, the GPIO line's direction is set to IN. The -// line is read, and callers may compare "desiredValue" with the -// current line level and take actions. -struct GpioLineHandle { - 1: GpioLine gLine; - 2: GpioValue desiredValue; - 3: bool isWrite = false; -} diff --git a/fboss/platform/fbdevd/if/i2c.thrift b/fboss/platform/fbdevd/if/i2c.thrift deleted file mode 100644 index d56eed1d2387b..0000000000000 --- a/fboss/platform/fbdevd/if/i2c.thrift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. - -namespace cpp2 facebook.fboss.platform.fbdevd.i2c - -// "I2cClient" describes a I2C client (slave) device, such as I2C -// sensors, EEPROM, I/O Expander, etc. -// - "bus" must be the symlink under /run/devmap/i2c-busses/. -// - "deviceName" is the string for driver matching, such as tmp75. -struct I2cClient { - 1: string bus; - 2: i16 address; - 3: string deviceName; -} diff --git a/fboss/platform/helpers/PlatformNameLib.cpp b/fboss/platform/helpers/PlatformNameLib.cpp index 6b5f301781676..faedb3d548320 100644 --- a/fboss/platform/helpers/PlatformNameLib.cpp +++ b/fboss/platform/helpers/PlatformNameLib.cpp @@ -52,6 +52,7 @@ std::string PlatformNameLib::getPlatformNameFromBios(bool writeToCache) const { platformUtils_->execCommand(dmidecodeCommand); if (exitStatus != 0) { XLOG(ERR) << "Failed to get platform name from bios: " << stdout; + fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 1); throw std::runtime_error("Failed to get platform name from bios"); } standardOut = folly::trimWhitespace(standardOut).str(); @@ -61,6 +62,7 @@ std::string PlatformNameLib::getPlatformNameFromBios(bool writeToCache) const { if (writeToCache) { platformFsUtils_->writeStringToFile(result, kCachePath, true); } + fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 0); return result; } @@ -73,11 +75,8 @@ std::optional PlatformNameLib::getPlatformName() const { return result; } try { - auto nameFromBios = getPlatformNameFromBios(); - fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 0); - return nameFromBios; + return getPlatformNameFromBios(); } catch (const std::exception& e) { - fb303::fbData->setCounter(kPlatformNameBiosReadFailures, 1); return std::nullopt; } } diff --git a/fboss/platform/platform_manager/PlatformExplorer.cpp b/fboss/platform/platform_manager/PlatformExplorer.cpp index 07c5bc7eb442b..61ab9161e7fd4 100644 --- a/fboss/platform/platform_manager/PlatformExplorer.cpp +++ b/fboss/platform/platform_manager/PlatformExplorer.cpp @@ -306,7 +306,8 @@ std::optional PlatformExplorer::getPmUnitNameFromSlot( See: https://github.com/facebookexternal/fboss.bsp.arista/pull/31/files */ if ((platformConfig_.platformName().value() == "meru800bfa" || - platformConfig_.platformName().value() == "meru800bia") && + platformConfig_.platformName().value() == "meru800bia" || + platformConfig_.platformName().value() == "meru800biab") && (!(idpromConfig.busName()->starts_with("INCOMING")) && *idpromConfig.address() == "0x50")) { try { diff --git a/fboss/platform/platform_manager/platform_manager_config.thrift b/fboss/platform/platform_manager/platform_manager_config.thrift index d105588337fe7..dbb84b839f1d1 100644 --- a/fboss/platform/platform_manager/platform_manager_config.thrift +++ b/fboss/platform/platform_manager/platform_manager_config.thrift @@ -426,9 +426,6 @@ struct SlotTypeConfig { // this slot. Need not be described if there is no presence detection for this // slot // -// TODO: Enhance device presence logic based on SimpleIoDevice definition in -// fbdevd.thrift -// // `outgoingI2cBusNames`: is the list of the buses from the PmUnit perspective // which are going out in the slot. Refer to Bus Naming Convention above. struct SlotConfig { diff --git a/fboss/platform/rackmon/BUCK b/fboss/platform/rackmon/BUCK index f87564d4d0925..f01bca8bb3b36 100644 --- a/fboss/platform/rackmon/BUCK +++ b/fboss/platform/rackmon/BUCK @@ -145,6 +145,7 @@ cpp_unittest( "tests/RackmonTest.cpp", "tests/RegisterDescriptorTest.cpp", "tests/RegisterMapTest.cpp", + "tests/RegisterSpanTest.cpp", "tests/RegisterTest.cpp", "tests/RegisterValueTest.cpp", ], diff --git a/fboss/platform/rackmon/ModbusDevice.cpp b/fboss/platform/rackmon/ModbusDevice.cpp index b6c29f079949f..139e80dfc8e08 100644 --- a/fboss/platform/rackmon/ModbusDevice.cpp +++ b/fboss/platform/rackmon/ModbusDevice.cpp @@ -168,7 +168,8 @@ void ModbusDevice::forceReloadPlan() { time_t reloadTime = getCurrentTime(); for (auto& reg : info_.registerList) { forceReloadRegister(reg, reloadTime); - RegisterStoreSpan::buildRegisterSpanList(reloadPlan_, reg); + RegisterStoreSpan::buildRegisterSpanList( + reloadPlan_, reg, registerMap_.maxRegisterSpanLength); } } @@ -288,7 +289,8 @@ void ModbusDevice::forceReloadRegisters(const ModbusRegisterFilter& filter) { std::vector regSpans{}; for (auto& reg : info_.registerList) { if (shouldPickRegister(reg)) { - bool added = RegisterStoreSpan::buildRegisterSpanList(regSpans, reg); + bool added = RegisterStoreSpan::buildRegisterSpanList( + regSpans, reg, registerMap_.maxRegisterSpanLength); if (!added) { logError << "reload:: Not including register: " << reg.name() << std::endl; diff --git a/fboss/platform/rackmon/Rackmon.cpp b/fboss/platform/rackmon/Rackmon.cpp index dcc838c633d72..3d25396c7b24a 100644 --- a/fboss/platform/rackmon/Rackmon.cpp +++ b/fboss/platform/rackmon/Rackmon.cpp @@ -193,21 +193,23 @@ ModbusDevice& Rackmon::getModbusDevice(uint8_t addr) { void Rackmon::fullScan() { logInfo << "Starting scan of all devices" << std::endl; bool atLeastOne = false; - for (auto& addr : allPossibleDevAddrs_) { - if (isDeviceKnown(addr)) { - continue; - } - for (int i = 0; i < kScanNumRetry; i++) { + // Retry the scan loop to ensure we discover any flaky + // devices which might have missed the first loop. + for (int i = 0; i < kScanNumRetry; i++) { + for (const auto& addr : allPossibleDevAddrs_) { + if (isDeviceKnown(addr)) { + continue; + } if (reqForceScan_.load() == false) { logWarn << "Full scan aborted" << std::endl; return; } if (probe(addr)) { atLeastOne = true; - break; } } } + logInfo << "Finished scan of all devices" << std::endl; // When scan is complete, request for a monitor. if (atLeastOne) { std::shared_lock lk(threadMutex_); diff --git a/fboss/platform/rackmon/Register.cpp b/fboss/platform/rackmon/Register.cpp index 32e9117603ba2..3642931f21901 100644 --- a/fboss/platform/rackmon/Register.cpp +++ b/fboss/platform/rackmon/Register.cpp @@ -271,14 +271,14 @@ RegisterStoreSpan::RegisterStoreSpan(RegisterStore* reg) registers_{reg}, timestamp_(reg->back().timestamp) {} -bool RegisterStoreSpan::addRegister(RegisterStore* reg) { +bool RegisterStoreSpan::addRegister(RegisterStore* reg, size_t maxSpanLength) { if (reg->interval() != interval_) { return false; } if (reg->regAddr() != spanAddress_ + span_.size()) { return false; } - if (span_.size() + reg->length() > kMaxRegisterSpanLength) { + if (span_.size() + reg->length() > maxSpanLength) { return false; } span_.resize(span_.size() + reg->length()); @@ -305,13 +305,14 @@ void RegisterStoreSpan::endReloadSpan(time_t reloadTime) { bool RegisterStoreSpan::buildRegisterSpanList( std::vector& list, - RegisterStore& reg) { + RegisterStore& reg, + size_t maxSpanLength) { // Drop it from a plan if not enabled. if (!reg.isEnabled()) { return false; } - if (!std::any_of(list.begin(), list.end(), [®](auto& span) { - return span.addRegister(®); + if (!std::any_of(list.begin(), list.end(), [®, maxSpanLength](auto& span) { + return span.addRegister(®, maxSpanLength); })) { list.emplace_back(®); } @@ -519,6 +520,8 @@ void from_json(const json& j, RegisterMap& m) { j.at("name").get_to(m.name); m.parity = j.value("parity", Parity::EVEN); j.at("baudrate").get_to(m.baudrate); + m.maxRegisterSpanLength = j.value( + "max_span_length", RegisterStoreSpan::kDefaultMaxRegisterSpanLength); std::vector tmp; j.at("registers").get_to(tmp); for (auto& i : tmp) { diff --git a/fboss/platform/rackmon/Register.h b/fboss/platform/rackmon/Register.h index 3de30b9f05e0e..3e4465779f74d 100644 --- a/fboss/platform/rackmon/Register.h +++ b/fboss/platform/rackmon/Register.h @@ -255,7 +255,6 @@ void to_json(nlohmann::json& j, const RegisterStore& m); // Group of registers which are at contiguous register locations. class RegisterStoreSpan { - static constexpr uint16_t kMaxRegisterSpanLength = 120; uint16_t spanAddress_ = 0; time_t interval_ = 0; std::vector span_{}; @@ -263,8 +262,11 @@ class RegisterStoreSpan { time_t timestamp_ = 0; public: + static constexpr uint16_t kDefaultMaxRegisterSpanLength = 120; explicit RegisterStoreSpan(RegisterStore* reg); - bool addRegister(RegisterStore* reg); + bool addRegister( + RegisterStore* reg, + size_t maxSpanLength = kDefaultMaxRegisterSpanLength); std::vector& beginReloadSpan(); void endReloadSpan(time_t reloadTime); uint16_t getSpanAddress() const { @@ -276,7 +278,8 @@ class RegisterStoreSpan { bool reloadPending(time_t currentTime); static bool buildRegisterSpanList( std::vector& list, - RegisterStore& reg); + RegisterStore& reg, + size_t maxSpanLength = kDefaultMaxRegisterSpanLength); }; struct WriteActionInfo { @@ -318,6 +321,7 @@ struct RegisterMap { std::string name; uint16_t probeRegister; uint32_t baudrate; + size_t maxRegisterSpanLength; Parity parity; std::vector specialHandlers; std::map registerDescriptors; diff --git a/fboss/platform/rackmon/configs/register_map/orv2_psu.json b/fboss/platform/rackmon/configs/register_map/orv2_psu.json index 855fa86efd49c..87da87b87f6f4 100644 --- a/fboss/platform/rackmon/configs/register_map/orv2_psu.json +++ b/fboss/platform/rackmon/configs/register_map/orv2_psu.json @@ -17,6 +17,7 @@ } } ], + "max_span_length": 16, "registers": [ { "begin": 0, diff --git a/fboss/platform/rackmon/tests/RegisterMapTest.cpp b/fboss/platform/rackmon/tests/RegisterMapTest.cpp index ba526b269c3c7..4ff4d79c5580d 100644 --- a/fboss/platform/rackmon/tests/RegisterMapTest.cpp +++ b/fboss/platform/rackmon/tests/RegisterMapTest.cpp @@ -41,6 +41,7 @@ TEST(RegisterMapTest, JSONCoversion) { "address_range": [[160, 191]], "probe_register": 104, "baudrate": 19200, + "max_span_length": 4, "registers": [ { "begin": 0, @@ -67,6 +68,7 @@ TEST(RegisterMapTest, JSONCoversion) { EXPECT_EQ(rmap.probeRegister, 104); EXPECT_EQ(rmap.baudrate, 19200); EXPECT_EQ(rmap.name, "orv2_psu"); + EXPECT_EQ(rmap.maxRegisterSpanLength, 4); EXPECT_EQ(rmap.registerDescriptors.size(), 2); EXPECT_EQ(rmap.specialHandlers.size(), 0); EXPECT_EQ(rmap.at(0).begin, 0); @@ -106,6 +108,9 @@ TEST(RegisterMapTest, JSONCoversionBaudrate) { rmap.applicableAddresses.range.cbegin(), rmap.applicableAddresses.range.cend(), [](auto const& ent) { return (ent.first == 160 && ent.second == 191); })); + EXPECT_EQ( + rmap.maxRegisterSpanLength, + RegisterStoreSpan::kDefaultMaxRegisterSpanLength); EXPECT_EQ(rmap.probeRegister, 104); EXPECT_EQ(rmap.baudrate, 19200); EXPECT_EQ(rmap.name, "orv2_psu"); diff --git a/fboss/platform/rackmon/tests/RegisterSpanTest.cpp b/fboss/platform/rackmon/tests/RegisterSpanTest.cpp new file mode 100644 index 0000000000000..a7ef83105326e --- /dev/null +++ b/fboss/platform/rackmon/tests/RegisterSpanTest.cpp @@ -0,0 +1,102 @@ +// Copyright 2024-present Facebook. All Rights Reserved. +#include +#include +#include "Register.h" + +using namespace std; +using namespace testing; +using namespace rackmon; + +class RegisterSpanTest : public ::testing::Test { + protected: + RegisterDescriptor desc[4]; + std::vector regs; + void SetUp() override { + desc[0].begin = 4; + desc[0].length = 2; + desc[0].interval = 1; + desc[1].begin = 6; + desc[1].length = 4; + desc[1].interval = 1; + desc[2].begin = 10; + desc[2].length = 2; + desc[2].interval = 2; + desc[3].begin = 19; + desc[3].length = 1; + regs.emplace_back(desc[0]); + regs.emplace_back(desc[1]); + regs.emplace_back(desc[2]); + regs.emplace_back(desc[3]); + } +}; + +//-------------------------------------------------------- +// RegisterSpanTests +//-------------------------------------------------------- + +TEST_F(RegisterSpanTest, BasicCreate) { + RegisterStoreSpan span(®s[0]); + ASSERT_EQ(span.length(), 2); + ASSERT_TRUE(span.addRegister(®s[1])); + ASSERT_EQ(span.length(), 6); + ASSERT_FALSE(span.addRegister(®s[2])); + ASSERT_FALSE(span.addRegister(®s[3])); + ASSERT_EQ(span.length(), 6); + + ASSERT_TRUE(span.reloadPending(1234)); + auto& flat = span.beginReloadSpan(); + ASSERT_EQ(flat.size(), 6); + for (auto i = 0; i < 6; i++) { + flat[i] = i; + } + span.endReloadSpan(1234); + ASSERT_EQ(regs[0].back().timestamp, 1234); + ASSERT_EQ(regs[1].back().timestamp, 1234); + ASSERT_EQ(regs[0].back().value[0], 0); + ASSERT_EQ(regs[0].back().value[1], 1); + ASSERT_EQ(regs[1].back().value[0], 2); + ASSERT_EQ(regs[1].back().value[1], 3); + ASSERT_EQ(regs[1].back().value[2], 4); + ASSERT_EQ(regs[1].back().value[3], 5); +} + +TEST_F(RegisterSpanTest, spanListTest) { + std::vector spanList{}; + for (auto& reg : regs) { + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, reg)); + } + ASSERT_EQ(spanList.size(), 3); + ASSERT_EQ(spanList[0].getSpanAddress(), 4); + ASSERT_EQ(spanList[0].length(), 6); + ASSERT_EQ(spanList[1].getSpanAddress(), 10); + ASSERT_EQ(spanList[1].length(), 2); + ASSERT_EQ(spanList[2].getSpanAddress(), 19); + ASSERT_EQ(spanList[2].length(), 1); + spanList.clear(); + regs[3].disable(); + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[0])); + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[1])); + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[2])); + ASSERT_FALSE(RegisterStoreSpan::buildRegisterSpanList(spanList, regs[3])); + ASSERT_EQ(spanList.size(), 2); + ASSERT_EQ(spanList[0].getSpanAddress(), 4); + ASSERT_EQ(spanList[0].length(), 6); + ASSERT_EQ(spanList[1].getSpanAddress(), 10); + ASSERT_EQ(spanList[1].length(), 2); +} + +TEST_F(RegisterSpanTest, smallSpanListTest) { + std::vector spanList{}; + for (auto& reg : regs) { + ASSERT_TRUE(RegisterStoreSpan::buildRegisterSpanList(spanList, reg, 4)); + } + ASSERT_EQ(spanList.size(), 4); + ASSERT_EQ(spanList[0].getSpanAddress(), 4); + ASSERT_EQ(spanList[0].length(), 2); + ASSERT_EQ(spanList[1].getSpanAddress(), 6); + ASSERT_EQ(spanList[1].length(), 4); + ASSERT_EQ(spanList[2].getSpanAddress(), 10); + ASSERT_EQ(spanList[2].length(), 2); + ASSERT_EQ(spanList[3].getSpanAddress(), 19); + ASSERT_EQ(spanList[3].length(), 1); +} diff --git a/fboss/platform/sensor_service/BUCK b/fboss/platform/sensor_service/BUCK index 5ebe19e2a810b..26e3f3dd6de57 100644 --- a/fboss/platform/sensor_service/BUCK +++ b/fboss/platform/sensor_service/BUCK @@ -16,6 +16,7 @@ cpp_library( "SensorServiceImpl.h", ], exported_deps = [ + ":config_validator", ":pmunit_info_fetcher", ":sensor_service_stats-cpp2-types", ":utils", @@ -26,7 +27,6 @@ cpp_library( "//fboss/fsdb/if:fsdb_model", "//fboss/fsdb/if:fsdb_oper-cpp2-types", "//fboss/platform/config_lib:config_lib", - "//fboss/platform/helpers:platform_name_lib", "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", "//fboss/platform/sensor_service/if:sensor_service-cpp2-types", "//folly:file_util", @@ -62,7 +62,10 @@ cpp_library( ], exported_deps = [ "fbsource//third-party/exprtk:exprtk", + ":config_validator", ":pmunit_info_fetcher", + "//fboss/platform/config_lib:config_lib", + "//fboss/platform/helpers:platform_name_lib", "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", ], exported_external_deps = [ @@ -93,6 +96,21 @@ cpp_library( ], ) +cpp_library( + name = "config_validator", + srcs = [ + "ConfigValidator.cpp", + ], + exported_deps = [ + "fbsource//third-party/fmt:fmt", + "//fboss/platform/sensor_service/if:sensor_config-cpp2-types", + "//folly/logging:logging", + ], + exported_external_deps = [ + "re2", + ], +) + cpp_binary( name = "sensor_service", srcs = [ @@ -100,6 +118,7 @@ cpp_binary( ], deps = [ ":core", + ":utils", "//fb303:logging", "//fboss/platform/helpers:init", "//folly/executors:function_scheduler", diff --git a/fboss/platform/sensor_service/ConfigValidator.cpp b/fboss/platform/sensor_service/ConfigValidator.cpp new file mode 100644 index 0000000000000..90cd312d35ae8 --- /dev/null +++ b/fboss/platform/sensor_service/ConfigValidator.cpp @@ -0,0 +1,79 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include "fboss/platform/sensor_service/ConfigValidator.h" + +#include +#include +#include + +namespace facebook::fboss::platform::sensor_service { +using namespace sensor_config; +namespace { +// For more info, see below +// https://github.com/facebook/fboss/blob/main/fboss/platform/platform_manager/platform_manager_config.thrift#L73 +const re2::RE2 kSlotPathRe = "/|(/([A-Z]+_)+SLOT@\\d+)+"; +} // namespace + +bool ConfigValidator::isValid(const SensorConfig& sensorConfig) { + for (std::unordered_set usedSlotPaths; + const auto& pmUnitSensors : *sensorConfig.pmUnitSensorsList()) { + if (!isValidPmUnitSensors(pmUnitSensors, usedSlotPaths)) { + return false; + } + } + return true; +} + +bool ConfigValidator::isValidPmUnitSensors( + const PmUnitSensors& pmUnitSensors, + std::unordered_set& usedSlotPaths) { + if (pmUnitSensors.slotPath()->empty()) { + XLOG(ERR) << "SlotPath in PmUnitSensor must be non-empty"; + return false; + } + if (!isValidSlotPath(*pmUnitSensors.slotPath())) { + return false; + } + if (usedSlotPaths.contains(*pmUnitSensors.slotPath())) { + XLOG(ERR) << fmt::format( + "SlotPath {} is a duplicate", *pmUnitSensors.slotPath()); + return false; + } + usedSlotPaths.emplace(*pmUnitSensors.slotPath()); + for (std::unordered_set usedSensorNames; + const auto& pmSensor : *pmUnitSensors.sensors()) { + if (!isValidPmSensor(pmSensor, usedSensorNames)) { + return false; + } + } + return true; +} + +bool ConfigValidator::isValidPmSensor( + const PmSensor& pmSensor, + std::unordered_set& usedSensorNames) { + if (pmSensor.name()->empty()) { + XLOG(ERR) << "PmSensor name must be non-empty"; + return false; + } + if (usedSensorNames.contains(*pmSensor.name())) { + XLOG(ERR) << fmt::format("SensorName {} is a duplicate", *pmSensor.name()); + return false; + } + usedSensorNames.emplace(*pmSensor.name()); + if (!pmSensor.sysfsPath()->starts_with("/run/devmap/sensors/")) { + XLOG(ERR) << "PmSensor sysfsPath must start with /run/devmap/sensors/"; + return false; + } + return true; +} + +bool ConfigValidator::isValidSlotPath(const std::string& slotPath) { + if (!re2::RE2::FullMatch(slotPath, kSlotPathRe)) { + XLOG(ERR) << fmt::format("SlotPath {} is invalid", slotPath); + return false; + } + return true; +} + +} // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/ConfigValidator.h b/fboss/platform/sensor_service/ConfigValidator.h new file mode 100644 index 0000000000000..63469ca83ba2b --- /dev/null +++ b/fboss/platform/sensor_service/ConfigValidator.h @@ -0,0 +1,20 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#pragma once + +#include "fboss/platform/sensor_service/if/gen-cpp2/sensor_config_types.h" + +namespace facebook::fboss::platform::sensor_service { +class ConfigValidator { + public: + bool isValid(const sensor_config::SensorConfig& sensorConfig); + bool isValidPmUnitSensors( + const sensor_config::PmUnitSensors& PmUnitSensors, + std::unordered_set& usedSlotPaths); + bool isValidPmSensor( + const sensor_config::PmSensor& pmSensor, + std::unordered_set& usedSensorNames); + bool isValidSlotPath(const std::string& slotPath); +}; + +} // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/Main.cpp b/fboss/platform/sensor_service/Main.cpp index 86812a2de9085..04bf6e27f13a0 100644 --- a/fboss/platform/sensor_service/Main.cpp +++ b/fboss/platform/sensor_service/Main.cpp @@ -7,6 +7,7 @@ #include "fboss/platform/helpers/Init.h" #include "fboss/platform/sensor_service/Flags.h" #include "fboss/platform/sensor_service/SensorServiceThriftHandler.h" +#include "fboss/platform/sensor_service/Utils.h" using namespace facebook; using namespace facebook::fboss::platform; @@ -17,7 +18,8 @@ int main(int argc, char** argv) { helpers::init(&argc, &argv); - auto serviceImpl = std::make_shared(); + SensorConfig sensorConfig = Utils().getConfig(); + auto serviceImpl = std::make_shared(sensorConfig); // Fetch sensor data once to warmup serviceImpl->fetchSensorData(); diff --git a/fboss/platform/sensor_service/SensorServiceImpl.cpp b/fboss/platform/sensor_service/SensorServiceImpl.cpp index 892b4f326b25f..4e12beaf2cd81 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.cpp +++ b/fboss/platform/sensor_service/SensorServiceImpl.cpp @@ -18,7 +18,7 @@ #include #include "fboss/platform/config_lib/ConfigLib.h" -#include "fboss/platform/helpers/PlatformNameLib.h" +#include "fboss/platform/sensor_service/ConfigValidator.h" #include "fboss/platform/sensor_service/FsdbSyncer.h" #include "fboss/platform/sensor_service/SensorServiceImpl.h" #include "fboss/platform/sensor_service/Utils.h" @@ -31,24 +31,9 @@ DEFINE_int32( namespace facebook::fboss::platform::sensor_service { -SensorServiceImpl::SensorServiceImpl() { - auto platformName = helpers::PlatformNameLib().getPlatformName(); - std::string sensorConfJson = ConfigLib().getSensorServiceConfig(platformName); - XLOG(DBG2) << "Read sensor config: " << sensorConfJson; - apache::thrift::SimpleJSONSerializer::deserialize( - sensorConfJson, sensorConfig_); - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - XLOG(INFO) << fmt::format( - "{}: Path={}, Compute={}, FRU={}", - sensorName, - *sensor.path(), - sensor.compute().value_or(""), - fruName); - } - } +SensorServiceImpl::SensorServiceImpl(const SensorConfig& sensorConfig) + : sensorConfig_(sensorConfig) { fsdbSyncer_ = std::make_unique(); - XLOG(INFO) << "========================================================"; } SensorServiceImpl::~SensorServiceImpl() { @@ -78,43 +63,34 @@ std::map SensorServiceImpl::getAllSensorData() { void SensorServiceImpl::fetchSensorData() { std::map polledData; uint readFailures{0}; - // Not all platforms have new sensor thrift structs. - // If it's defined, we will use new sensor structs - // Otherwise fall back to the existing sensors structs. - if (!sensorConfig_.pmUnitSensorsList()->empty()) { - XLOG(INFO) << "Reading SensorData using PM based sensor structs..."; - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - auto pmSensors = *pmUnitSensors.sensors(); - if (auto versionedPmSensors = Utils().resolveVersionedSensors( - pmUnitInfoFetcher_, - *pmUnitSensors.slotPath(), - *pmUnitSensors.versionedSensors())) { - XLOG(INFO) << fmt::format( - "Resolved to versionedPmSensors config with version {}.{}.{} for pmUnit {} at {}", - *versionedPmSensors->productProductionState(), - *versionedPmSensors->productVersion(), - *versionedPmSensors->productSubVersion(), - *pmUnitSensors.pmUnitName(), - *pmUnitSensors.slotPath()); - pmSensors.insert( - pmSensors.end(), - versionedPmSensors->sensors()->begin(), - versionedPmSensors->sensors()->end()); - } - XLOG(INFO) << fmt::format( - "Processing {} unit {} sensors", - *pmUnitSensors.pmUnitName(), - pmSensors.size()); - for (const auto& sensor : pmSensors) { - fetchSensorDataImpl(sensor, readFailures, polledData); - } - } - } else { - XLOG(INFO) << "Fetching using legacy sensor structs..."; - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - fetchSensorDataImpl( - std::make_pair(sensorName, sensor), readFailures, polledData); + XLOG(INFO) << "Reading SensorData using PM based sensor structs..."; + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + auto pmSensors = resolveSensors(pmUnitSensors); + XLOG(INFO) << fmt::format( + "Processing {} unit {} sensors", + *pmUnitSensors.pmUnitName(), + pmSensors.size()); + for (const auto& sensor : pmSensors) { + const auto& sensorName = *sensor.name(); + auto sensorData = fetchSensorDataImpl( + sensorName, + *sensor.sysfsPath(), + *sensor.type(), + sensor.thresholds().to_optional(), + sensor.compute().to_optional()); + polledData[sensorName] = sensorData; + // We log 0 if there is a read failure. If we dont log 0 on failure, + // fb303 will pick up the last reported (on read success) value and + // keep reporting that as the value. For 0 values, it is accurate to + // read the value along with the kReadFailure counter. Alternative is + // to delete this counter if there is a failure. + fb303::fbData->setCounter( + fmt::format(kReadValue, sensorName), sensorData.value().value_or(0)); + if (!sensorData.value()) { + fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 1); + readFailures++; + } else { + fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 0); } } } @@ -141,47 +117,29 @@ void SensorServiceImpl::fetchSensorData() { } } -template -void SensorServiceImpl::fetchSensorDataImpl( - const T& sensor, - uint& readFailures, - std::map& polledData) { - SensorData sensorData; - std::string sensorName; - if constexpr (std::is_same_v>) { - sensorName = sensor.first; - sensorData = createSensorData( - sensorName, - *sensor.second.path(), - *sensor.second.type(), - sensor.second.thresholds().to_optional(), - sensor.second.compute().to_optional()); - } else { - sensorName = *sensor.name(); - sensorData = createSensorData( - sensorName, - *sensor.sysfsPath(), - *sensor.type(), - sensor.thresholds().to_optional(), - sensor.compute().to_optional()); - } - polledData[sensorName] = sensorData; - // We log 0 if there is a read failure. If we dont log 0 on failure, - // fb303 will pick up the last reported (on read success) value and - // keep reporting that as the value. For 0 values, it is accurate to - // read the value along with the kReadFailure counter. Alternative is - // to delete this counter if there is a failure. - fb303::fbData->setCounter( - fmt::format(kReadValue, sensorName), sensorData.value().value_or(0)); - if (!sensorData.value()) { - fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 1); - readFailures++; - } else { - fb303::fbData->setCounter(fmt::format(kReadFailure, sensorName), 0); +std::vector SensorServiceImpl::resolveSensors( + const PmUnitSensors& pmUnitSensors) { + auto pmSensors = *pmUnitSensors.sensors(); + if (auto versionedPmSensors = Utils().resolveVersionedSensors( + pmUnitInfoFetcher_, + *pmUnitSensors.slotPath(), + *pmUnitSensors.versionedSensors())) { + XLOG(INFO) << fmt::format( + "Resolved to versionedPmSensors config with version {}.{}.{} for pmUnit {} at {}", + *versionedPmSensors->productProductionState(), + *versionedPmSensors->productVersion(), + *versionedPmSensors->productSubVersion(), + *pmUnitSensors.pmUnitName(), + *pmUnitSensors.slotPath()); + pmSensors.insert( + pmSensors.end(), + versionedPmSensors->sensors()->begin(), + versionedPmSensors->sensors()->end()); } + return pmSensors; } -SensorData SensorServiceImpl::createSensorData( +SensorData SensorServiceImpl::fetchSensorDataImpl( const std::string& sensorName, const std::string& sysfsPath, SensorType sensorType, diff --git a/fboss/platform/sensor_service/SensorServiceImpl.h b/fboss/platform/sensor_service/SensorServiceImpl.h index b2aab64404d98..650ca3a24660d 100644 --- a/fboss/platform/sensor_service/SensorServiceImpl.h +++ b/fboss/platform/sensor_service/SensorServiceImpl.h @@ -34,31 +34,21 @@ class SensorServiceImpl { auto static constexpr kTotalReadFailure = "sensor_read.total.failures"; auto static constexpr kHasReadFailure = "sensor_read.has.failures"; - explicit SensorServiceImpl(); + explicit SensorServiceImpl(const SensorConfig& sensorConfig); ~SensorServiceImpl(); std::vector getSensorsData( const std::vector& sensorNames); std::map getAllSensorData(); void fetchSensorData(); + std::vector resolveSensors(const PmUnitSensors& pmUnitSensors); FsdbSyncer* fsdbSyncer() { return fsdbSyncer_.get(); } private: - // Interim function while migrating to PmSensor. - // This will be removed once migration is done for all platforms. - template < - typename T, - typename = std::enable_if_t< - std::is_same_v> || - std::is_same_v>> - void fetchSensorDataImpl( - const T& sensor, - uint& readFailures, - std::map& polledData); - SensorData createSensorData( + SensorData fetchSensorDataImpl( const std::string& name, const std::string& sysfsPath, SensorType sensorType, diff --git a/fboss/platform/sensor_service/Utils.cpp b/fboss/platform/sensor_service/Utils.cpp index a571d9ae9c4b4..a39071eac4c7a 100644 --- a/fboss/platform/sensor_service/Utils.cpp +++ b/fboss/platform/sensor_service/Utils.cpp @@ -8,6 +8,10 @@ #include #include +#include "fboss/platform/config_lib/ConfigLib.h" +#include "fboss/platform/helpers/PlatformNameLib.h" +#include "fboss/platform/sensor_service/ConfigValidator.h" + namespace facebook::fboss::platform::sensor_service { namespace { @@ -103,4 +107,14 @@ std::optional Utils::resolveVersionedSensors( return resolvedVersionedSensor; } +SensorConfig Utils::getConfig() { + auto platformName = helpers::PlatformNameLib().getPlatformName(); + SensorConfig sensorConfig; + apache::thrift::SimpleJSONSerializer::deserialize( + ConfigLib().getSensorServiceConfig(platformName), sensorConfig); + if (!ConfigValidator().isValid(sensorConfig)) { + throw std::runtime_error("Invalid sensor config"); + } + return sensorConfig; +} } // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/Utils.h b/fboss/platform/sensor_service/Utils.h index 5345cb94bf499..4c5fb8e9a9dfb 100644 --- a/fboss/platform/sensor_service/Utils.h +++ b/fboss/platform/sensor_service/Utils.h @@ -31,5 +31,7 @@ class Utils { const PmUnitInfoFetcher& fetcher, const std::string& slotPath, const std::vector& versionedSensors); + + SensorConfig getConfig(); }; } // namespace facebook::fboss::platform::sensor_service diff --git a/fboss/platform/sensor_service/hw_test/BUCK b/fboss/platform/sensor_service/hw_test/BUCK index f8d20726d0e71..f8e9a8a285139 100644 --- a/fboss/platform/sensor_service/hw_test/BUCK +++ b/fboss/platform/sensor_service/hw_test/BUCK @@ -9,10 +9,10 @@ cpp_binary( ], deps = [ "fbsource//third-party/googletest:gtest", - "//fboss/platform/config_lib:config_lib", "//fboss/platform/helpers:init", "//fboss/platform/sensor_service:core", "//fboss/platform/sensor_service:service", + "//fboss/platform/sensor_service:utils", "//fboss/platform/sensor_service/if:sensor_service-cpp2-services", "//folly/init:init", "//thrift/lib/cpp2/protocol:protocol", diff --git a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp index 74e2ace2bd85f..0211173712b7c 100644 --- a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp +++ b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.cpp @@ -14,8 +14,8 @@ #include #include -#include "fboss/platform/config_lib/ConfigLib.h" #include "fboss/platform/helpers/Init.h" +#include "fboss/platform/sensor_service/Utils.h" using namespace apache::thrift; @@ -24,12 +24,10 @@ namespace facebook::fboss::platform::sensor_service { SensorServiceHwTest::~SensorServiceHwTest() = default; void SensorServiceHwTest::SetUp() { - sensorServiceImpl_ = std::make_shared(); + sensorConfig_ = Utils().getConfig(); + sensorServiceImpl_ = std::make_shared(sensorConfig_); sensorServiceHandler_ = std::make_shared(sensorServiceImpl_); - auto sensorServiceConfigJson = ConfigLib().getSensorServiceConfig(); - apache::thrift::SimpleJSONSerializer::deserialize( - sensorServiceConfigJson, sensorConfig_); } SensorReadResponse SensorServiceHwTest::getSensors( @@ -49,29 +47,37 @@ bool sensorReadOk(const std::string& sensorName) { return false; } -TEST_F(SensorServiceHwTest, GetAllSensors) { - auto res = getSensors(std::vector{}); - std::vector sensorNames; - if (sensorConfig_.pmUnitSensorsList()->empty()) { - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - sensorNames.push_back(sensorName); - } - } - } else { - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - for (const auto& sensor : *pmUnitSensors.sensors()) { - sensorNames.push_back(*sensor.name()); - } +std::vector SensorServiceHwTest::allSensorNamesFromConfig() { + std::vector sensors; + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + for (const auto& sensor : + sensorServiceImpl_->resolveSensors(pmUnitSensors)) { + sensors.push_back(*sensor.name()); } } - EXPECT_EQ(sensorNames.size(), res.sensorData()->size()); - for (const auto& sensorName : sensorNames) { + return sensors; +} + +std::vector SensorServiceHwTest::someSensorNamesFromConfig() { + std::vector sensors; + for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { + auto resolvedSensors = sensorServiceImpl_->resolveSensors(pmUnitSensors); + sensors.push_back( + *resolvedSensors[folly::Random::rand32(resolvedSensors.size())].name()); + } + return sensors; +} + +TEST_F(SensorServiceHwTest, GetAllSensors) { + auto res = getSensors(std::vector{}); + std::vector allSensorNames = allSensorNamesFromConfig(); + EXPECT_EQ(allSensorNames.size(), res.sensorData()->size()); + for (const auto& sensorName : allSensorNames) { auto it = std::find_if( res.sensorData()->begin(), res.sensorData()->end(), - [sensorNameCopy = sensorName](auto sensorData) { - return *sensorData.name() == sensorNameCopy; + [&](const auto& sensorData) { + return *sensorData.name() == sensorName; }); EXPECT_NE(it, std::end(*res.sensorData())); // only non-failed sensors will have value @@ -86,23 +92,9 @@ TEST_F(SensorServiceHwTest, GetBogusSensor) { } TEST_F(SensorServiceHwTest, GetSomeSensors) { - std::vector sensorNames; - if (sensorConfig_.pmUnitSensorsList()->empty()) { - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - if (sensorMap.size() > 0) { - sensorNames.push_back(sensorMap.begin()->first); - } - } - } else { - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - if (pmUnitSensors.sensors()->size() > 0) { - sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); - } - } - } - - auto response1 = getSensors(sensorNames); - EXPECT_EQ(response1.sensorData()->size(), sensorNames.size()); + std::vector someSensorNames = someSensorNamesFromConfig(); + auto response1 = getSensors(someSensorNames); + EXPECT_EQ(response1.sensorData()->size(), someSensorNames.size()); for (const auto& sensorData : *response1.sensorData()) { if (sensorReadOk(*sensorData.name())) { EXPECT_TRUE(sensorData.value().has_value()); @@ -112,8 +104,8 @@ TEST_F(SensorServiceHwTest, GetSomeSensors) { // Burn a second std::this_thread::sleep_for(std::chrono::seconds(1)); - auto response2 = getSensors(sensorNames); - EXPECT_EQ(response2.sensorData()->size(), sensorNames.size()); + auto response2 = getSensors(someSensorNames); + EXPECT_EQ(response2.sensorData()->size(), someSensorNames.size()); for (const auto& sensorData : *response2.sensorData()) { if (sensorReadOk(*sensorData.name())) { EXPECT_TRUE(sensorData.value().has_value()); @@ -145,27 +137,14 @@ TEST_F(SensorServiceHwTest, GetSomeSensors) { } TEST_F(SensorServiceHwTest, GetSomeSensorsViaThrift) { - std::vector sensorNames; - if (sensorConfig_.pmUnitSensorsList()->empty()) { - for (const auto& [fruName, sensorMap] : *sensorConfig_.sensorMapList()) { - if (sensorMap.size() > 0) { - sensorNames.push_back(sensorMap.begin()->first); - } - } - } else { - for (const auto& pmUnitSensors : *sensorConfig_.pmUnitSensorsList()) { - if (pmUnitSensors.sensors()->size() > 0) { - sensorNames.push_back(*pmUnitSensors.sensors()->front().name()); - } - } - } + std::vector someSensorNames = someSensorNamesFromConfig(); // Trigger a fetch before the thrift request hits the server. sensorServiceImpl_->fetchSensorData(); apache::thrift::ScopedServerInterfaceThread server(sensorServiceHandler_); auto client = server.newClient>(); SensorReadResponse response; - client->sync_getSensorValuesByNames(response, sensorNames); - EXPECT_EQ(response.sensorData()->size(), sensorNames.size()); + client->sync_getSensorValuesByNames(response, someSensorNames); + EXPECT_EQ(response.sensorData()->size(), someSensorNames.size()); for (const auto& sensorData : *response.sensorData()) { if (sensorReadOk(*sensorData.name())) { EXPECT_TRUE(sensorData.value().has_value()); diff --git a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h index b36b3a7de16d8..557ec83815ca5 100644 --- a/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h +++ b/fboss/platform/sensor_service/hw_test/SensorServiceHwTest.h @@ -23,6 +23,8 @@ class SensorServiceHwTest : public ::testing::Test { protected: SensorReadResponse getSensors(const std::vector& sensors); + std::vector allSensorNamesFromConfig(); + std::vector someSensorNamesFromConfig(); std::shared_ptr sensorServiceImpl_; std::shared_ptr sensorServiceHandler_; SensorConfig sensorConfig_; diff --git a/fboss/platform/sensor_service/if/sensor_config.thrift b/fboss/platform/sensor_service/if/sensor_config.thrift index 4ec125b0a4e5e..7ef900ddf738c 100644 --- a/fboss/platform/sensor_service/if/sensor_config.thrift +++ b/fboss/platform/sensor_service/if/sensor_config.thrift @@ -42,17 +42,6 @@ struct Thresholds { 6: optional double lowerCriticalVal; } -struct Sensor { - // Sysfs path - 1: string path; - // Contains the manufacture provided threshold values - 2: optional Thresholds thresholds; - // Compute method, same format and calculation approach as lm_sensor, e.g. @*0.1 - 3: optional string compute; - // contain various sensor type - 4: SensorType type; -} - // `PmSensor`: Describes a sensor in PmUnit. // // `name`: Name of the sensor. This isn't neccessarily same as PmUnitScopedName in PM config. @@ -107,12 +96,7 @@ struct PmUnitSensors { 4: list versionedSensors; } -typedef string SensorName -typedef map sensorMap -typedef string FruName - // The configuration for sensor mapping. struct SensorConfig { 1: list pmUnitSensorsList; - 2: map sensorMapList; } diff --git a/fboss/platform/sensor_service/test/BUCK b/fboss/platform/sensor_service/test/BUCK index 1a41bce023ea8..a4b6376405458 100644 --- a/fboss/platform/sensor_service/test/BUCK +++ b/fboss/platform/sensor_service/test/BUCK @@ -45,3 +45,13 @@ cpp_unittest( "//fboss/platform/sensor_service:utils", ], ) + +cpp_unittest( + name = "config_validator_test", + srcs = [ + "ConfigValidatorTest.cpp", + ], + deps = [ + "//fboss/platform/sensor_service:config_validator", + ], +) diff --git a/fboss/platform/sensor_service/test/ConfigValidatorTest.cpp b/fboss/platform/sensor_service/test/ConfigValidatorTest.cpp new file mode 100644 index 0000000000000..c0798bcad32e7 --- /dev/null +++ b/fboss/platform/sensor_service/test/ConfigValidatorTest.cpp @@ -0,0 +1,71 @@ +// (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. + +#include + +#include "fboss/platform/sensor_service/ConfigValidator.h" + +using namespace ::testing; +using namespace facebook::fboss::platform::sensor_service; +using namespace facebook::fboss::platform::sensor_config; +namespace { +PmSensor createPmSensor(const std::string& name, const std::string& sysfsPath) { + PmSensor pmSensor; + pmSensor.name() = name; + pmSensor.sysfsPath() = sysfsPath; + return pmSensor; +} +} // namespace + +TEST(ConfigValidatorTest, ValidConfig) { + auto config = SensorConfig(); + PmUnitSensors pmUnitSensors1, pmUnitSensors2; + pmUnitSensors1.slotPath() = "/"; + pmUnitSensors1.sensors() = { + createPmSensor("sensor1", "/run/devmap/sensors/CPU_CORE_TEMP")}; + pmUnitSensors2.slotPath() = "/BCB_SLOT@0"; + pmUnitSensors1.sensors() = { + createPmSensor("sensor2", "/run/devmap/sensors/BCB_FAN_CPLD")}; + config.pmUnitSensorsList() = {pmUnitSensors1, pmUnitSensors2}; + EXPECT_TRUE(ConfigValidator().isValid(config)); +} + +TEST(ConfigValidatorTest, SlotPaths) { + // Valid + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/")); + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/FAN_SLOT@0")); + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/FAN_SLOT@110")); + EXPECT_TRUE(ConfigValidator().isValidSlotPath("/BCB_SLOT@0/FAN_SLOT@1")); + // Invalid + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/ ")); + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/INVALID")); + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/SLOT@0")); + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/BCB_SLOT@0FAN_SLOT@1")); + // Can't have a trailing / + EXPECT_FALSE(ConfigValidator().isValidSlotPath("/BCB_SLOT@0/")); + // Duplicate + SensorConfig config; + PmUnitSensors pmUnitSensors1, pmUnitSensors2; + pmUnitSensors1.slotPath() = "/BCB_SLOT@0"; + pmUnitSensors2.slotPath() = "/BCB_SLOT@0"; + config.pmUnitSensorsList() = {pmUnitSensors1, pmUnitSensors2}; + EXPECT_FALSE(ConfigValidator().isValid(config)); +} + +TEST(ConfigValidatorTest, InvalidPmSensors) { + auto config = SensorConfig(); + PmUnitSensors pmUnitSensors; + pmUnitSensors.slotPath() = "/BCB_SLOT@0"; + pmUnitSensors.sensors() = { + createPmSensor("", "/run/devmap/sensors/CPU_CORE_TEMP")}; + config.pmUnitSensorsList() = {pmUnitSensors}; + EXPECT_FALSE(ConfigValidator().isValid(config)); + pmUnitSensors.sensors() = { + createPmSensor("sensor1", "/run/devmap/eeproms/BCB_EEPROMS")}; + config.pmUnitSensorsList() = {pmUnitSensors}; + EXPECT_FALSE(ConfigValidator().isValid(config)); + pmUnitSensors.sensors() = { + createPmSensor("sensor1", "/run/devmap/sensors/CPU_CORE_TEMP"), + createPmSensor("sensor1", "/run/devmap/sensors/CPU_CORE_TEMP2")}; + config.pmUnitSensorsList() = {pmUnitSensors}; + EXPECT_FALSE(ConfigValidator().isValid(config)); +} diff --git a/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp b/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp index e73e88b0b295e..1665dc32a4b46 100644 --- a/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp +++ b/fboss/platform/sensor_service/test/SensorServiceImplTest.cpp @@ -1,6 +1,7 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. #include +#include #include #include @@ -60,9 +61,9 @@ TEST_F(SensorServiceImplTest, fetchAndCheckSensorDataFailure) { SensorConfig sensorConfig; apache::thrift::SimpleJSONSerializer::deserialize( sensorConfJson, sensorConfig); - for (const auto& [fruName, sensorMap] : *sensorConfig.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - ASSERT_TRUE(std::filesystem::remove(*sensor.path())); + for (const auto& pmUnitSensors : *sensorConfig.pmUnitSensorsList()) { + for (const auto& pmSensors : *pmUnitSensors.sensors()) { + ASSERT_TRUE(std::filesystem::remove(*pmSensors.sysfsPath())); } } @@ -85,9 +86,9 @@ TEST_F(SensorServiceImplTest, fetchAndCheckSensorDataSuccesAndThenFailure) { SensorConfig sensorConfig; apache::thrift::SimpleJSONSerializer::deserialize( sensorConfJson, sensorConfig); - for (const auto& [fruName, sensorMap] : *sensorConfig.sensorMapList()) { - for (const auto& [sensorName, sensor] : sensorMap) { - ASSERT_TRUE(std::filesystem::remove(*sensor.path())); + for (const auto& pmUnitSensors : *sensorConfig.pmUnitSensorsList()) { + for (const auto& pmSensors : *pmUnitSensors.sensors()) { + ASSERT_TRUE(std::filesystem::remove(*pmSensors.sysfsPath())); } } // Check that sensor value/timestamp are now empty which implies read failed @@ -95,18 +96,19 @@ TEST_F(SensorServiceImplTest, fetchAndCheckSensorDataSuccesAndThenFailure) { } TEST_F(SensorServiceImplTest, getSomeSensors) { + auto mockSensorData = getDefaultMockSensorData(); + auto mockSensorName = *std::views::keys(mockSensorData).begin(); + auto now = Utils::nowInSecs(); folly::test::TemporaryDirectory tmpDir = folly::test::TemporaryDirectory(); auto sensorServiceImpl = createSensorServiceImplForTest(tmpDir.path().string()); sensorServiceImpl->fetchSensorData(); - auto sensorData = sensorServiceImpl->getSensorsData( - {"MOCK_FRU_1_SENSOR_1", "BOGUS_SENSOR"}); + auto sensorData = + sensorServiceImpl->getSensorsData({mockSensorName, "BOGUS_SENSOR"}); EXPECT_EQ(sensorData.size(), 1); - EXPECT_EQ(*sensorData[0].name(), "MOCK_FRU_1_SENSOR_1"); - EXPECT_FLOAT_EQ( - *sensorData[0].value(), - getDefaultMockSensorData()["MOCK_FRU_1_SENSOR_1"]); + EXPECT_EQ(*sensorData[0].name(), mockSensorName); + EXPECT_FLOAT_EQ(*sensorData[0].value(), mockSensorData[mockSensorName]); EXPECT_GE(*sensorData[0].timeStamp(), now); } diff --git a/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp b/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp index 03024f6c9a73f..0b86053f022f2 100644 --- a/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp +++ b/fboss/platform/sensor_service/test/SensorServiceThriftHandlerTest.cpp @@ -1,5 +1,7 @@ // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary. +#include + #include #include @@ -37,16 +39,19 @@ TEST_F( TEST_F( SensorServiceThriftHandlerTest, getSensorValuesByNameWithNonEmptySensorName) { - auto sensorNames = std::vector{"MOCK_FRU_1_SENSOR_1"}; + auto mockSensorData = getDefaultMockSensorData(); + auto mockSensorNamesIt = std::views::keys(mockSensorData).begin(); + + auto sensorNames = std::vector{*mockSensorNamesIt}; SensorReadResponse response; sensorServiceHandler_->getSensorValuesByNames( response, std::make_unique>(sensorNames)); EXPECT_EQ(response.sensorData()->size(), sensorNames.size()); EXPECT_EQ( - sensorMockData_.at("MOCK_FRU_1_SENSOR_1"), + sensorMockData_.at(*mockSensorNamesIt), *response.sensorData()[0].value()); - sensorNames.push_back("MOCK_FRU_1_SENSOR_2"); + sensorNames.push_back(*(++mockSensorNamesIt)); sensorServiceHandler_->getSensorValuesByNames( response, std::make_unique>(sensorNames)); EXPECT_EQ(response.sensorData()->size(), sensorNames.size()); diff --git a/fboss/platform/sensor_service/test/TestUtils.cpp b/fboss/platform/sensor_service/test/TestUtils.cpp index b5b5594d68219..42ffe8618831c 100644 --- a/fboss/platform/sensor_service/test/TestUtils.cpp +++ b/fboss/platform/sensor_service/test/TestUtils.cpp @@ -11,54 +11,54 @@ using namespace facebook::fboss::platform::sensor_service; namespace { -std::string mockSensorConfig(const std::string& tmpPath) { +SensorConfig mockSensorConfig(const std::string& tmpPath) { SensorConfig config; + PmUnitSensors pmUnitSensors; + pmUnitSensors.slotPath() = "/"; + pmUnitSensors.pmUnitName() = "MOCK"; - Sensor mock_fru_1_sensor_1, mock_fru_1_sensor_2, mock_fru_2_sensor_1; - mock_fru_1_sensor_1.path_ref() = tmpPath + "/mock_fru_1_sensor_1_path:temp1"; - mock_fru_1_sensor_2.path_ref() = tmpPath + "/mock_fru_1_sensor_2_path:fan1"; - mock_fru_2_sensor_1.path_ref() = tmpPath + "/mock_fru_2_sensor_1_path:vin"; - std::string value = "25"; - folly::writeFile(value, (*mock_fru_1_sensor_1.path()).c_str()); - value = "11152"; - folly::writeFile(value, (*mock_fru_1_sensor_2.path()).c_str()); - value = "11.875"; - folly::writeFile(value, (*mock_fru_2_sensor_1.path()).c_str()); + PmSensor mockFruSensor1, mockFruSensor2, mockFruSensor3; + mockFruSensor1.name() = "MOCK_FRU_SENSOR1"; + mockFruSensor1.compute() = "@/1000"; + mockFruSensor1.type() = SensorType::TEMPERTURE; + mockFruSensor1.sysfsPath() = tmpPath + "/mock_fru_sensor_1_path:temp1"; + folly::writeFile(std::string{"25"}, mockFruSensor1.sysfsPath()->c_str()); + mockFruSensor2.name() = "MOCK_FRU_SENSOR2"; + mockFruSensor2.type() = SensorType::FAN; + mockFruSensor2.sysfsPath() = tmpPath + "/mock_fru_sensor_2_path:fan1"; + folly::writeFile(std::string{"11152"}, mockFruSensor2.sysfsPath()->c_str()); + mockFruSensor3.name() = "MOCK_FRU_SENSOR3"; + mockFruSensor3.compute() = "@ + 5"; + mockFruSensor3.type() = SensorType::VOLTAGE; + mockFruSensor3.sysfsPath() = tmpPath + "/mock_fru_sensor_3_path:vin"; + folly::writeFile(std::string{"11.875"}, mockFruSensor3.sysfsPath()->c_str()); - mock_fru_1_sensor_1.compute() = "@/1000"; - mock_fru_2_sensor_1.compute() = "@ + 5"; - - mock_fru_1_sensor_1.type_ref() = SensorType::TEMPERTURE; - mock_fru_1_sensor_2.type_ref() = SensorType::FAN; - mock_fru_2_sensor_1.type_ref() = SensorType::VOLTAGE; - - sensorMap sMapFru1, sMapFru2; - sMapFru1["MOCK_FRU_1_SENSOR_1"] = mock_fru_1_sensor_1; - sMapFru1["MOCK_FRU_1_SENSOR_2"] = mock_fru_1_sensor_2; - sMapFru2["MOCK_FRU_2_SENSOR_1"] = mock_fru_2_sensor_1; - config.sensorMapList_ref() = { - {"MOCK_FRU1", sMapFru1}, {"MOCK_FRU2", sMapFru2}}; + pmUnitSensors.sensors() = { + std::move(mockFruSensor1), + std::move(mockFruSensor2), + std::move(mockFruSensor3), + }; + config.pmUnitSensorsList() = {std::move(pmUnitSensors)}; - std::string fileName = tmpPath + "/mock_sensor_config"; + std::string sensorConfigPath = tmpPath + "/sensor_service.json"; folly::writeFile( apache::thrift::SimpleJSONSerializer::serialize(config), - fileName.c_str()); - return fileName; + sensorConfigPath.c_str()); + FLAGS_config_file = sensorConfigPath; + return config; } } // namespace std::shared_ptr createSensorServiceImplForTest( const std::string& tmpDirPath) { - auto confFileName = mockSensorConfig(tmpDirPath); - FLAGS_config_file = confFileName; - return std::make_shared(); + return std::make_shared(mockSensorConfig(tmpDirPath)); } std::map getDefaultMockSensorData() { return std::map{ - {"MOCK_FRU_1_SENSOR_1", 0.025 /* 25/10000 */}, - {"MOCK_FRU_1_SENSOR_2", 11152}, - {"MOCK_FRU_2_SENSOR_1", 16.875 /* 11.875 + 5*/}, + {"MOCK_FRU_SENSOR1", 0.025 /* 25/10000 */}, + {"MOCK_FRU_SENSOR2", 11152}, + {"MOCK_FRU_SENSOR3", 16.875 /* 11.875 + 5*/}, }; } diff --git a/fboss/py/fboss/cli/commands/interface.py b/fboss/py/fboss/cli/commands/interface.py index 5c07d740b5104..d30f03d8f0d98 100644 --- a/fboss/py/fboss/cli/commands/interface.py +++ b/fboss/py/fboss/cli/commands/interface.py @@ -70,6 +70,7 @@ def convert_address(addr: bytes) -> str: return socket.inet_ntop(socket.AF_INET, addr) elif len(addr) == 16: return socket.inet_ntop(socket.AF_INET6, addr) + # pyre-fixme[16]: `str` has no attribute `gdlluivnhbufformat`. raise ValueError("bad binary address {0}".gdlluivnhbufformat(repr(addr))) diff --git a/fboss/py/fboss/cli/commands/route.py b/fboss/py/fboss/cli/commands/route.py index 0bd5ed94d8d89..c2eb912af0b57 100644 --- a/fboss/py/fboss/cli/commands/route.py +++ b/fboss/py/fboss/cli/commands/route.py @@ -82,6 +82,7 @@ def is_ucmp_active(next_hops: t.Iterator[NextHopThrift]) -> bool: if not next_hops: return False + # pyre-fixme[16]: `Iterator` has no attribute `__getitem__`. return not all(next_hops[0].weight == nh.weight for nh in next_hops) diff --git a/fboss/py/fboss/cli/utils/utils.py b/fboss/py/fboss/cli/utils/utils.py index 2c6860828e344..00598f09078cd 100644 --- a/fboss/py/fboss/cli/utils/utils.py +++ b/fboss/py/fboss/cli/utils/utils.py @@ -203,6 +203,7 @@ def get_vlan_port_map( if not port_summary: continue + # pyre-fixme[61]: `root_port` is undefined, or not always defined. vlan_port_map[vlan][root_port].append(port_summary) return vlan_port_map @@ -318,6 +319,7 @@ def label_forwarding_action_to_str(label_forwarding_action: MplsAction) -> str: labels = ": " + str(label_forwarding_action.swapLabel) elif label_forwarding_action.action == MplsActionCode.PUSH: stack_str = "{{{}}}".format( + # pyre-fixme[16]: `Optional` has no attribute `__iter__`. ",".join([str(element) for element in label_forwarding_action.pushLabels]) ) labels = f": {stack_str}" @@ -327,11 +329,16 @@ def label_forwarding_action_to_str(label_forwarding_action: MplsAction) -> str: def nexthop_to_str( nexthop: NextHopThrift, + # pyre-fixme[9]: vlan_aggregate_port_map has type `Dict[str, str]`; used as `None`. vlan_aggregate_port_map: t.Dict[str, str] = None, + # pyre-fixme[9]: vlan_port_map has type `DefaultDict[str, DefaultDict[str, + # List[str]]]`; used as `None`. vlan_port_map: t.DefaultDict[str, t.DefaultDict[str, t.List[str]]] = None, ) -> str: weight_str = "" via_str = "" + # pyre-fixme[6]: For 1st argument expected `MplsAction` but got + # `Optional[MplsAction]`. label_str = label_forwarding_action_to_str(nexthop.mplsAction) if nexthop.weight: @@ -345,9 +352,11 @@ def nexthop_to_str( # For agg ports it's better to display the agg port name, # rather than the phy if vlan_id in vlan_aggregate_port_map.keys(): + # pyre-fixme[6]: For 1st argument expected `str` but got `int`. via_str = vlan_aggregate_port_map[vlan_id] else: port_names = [] + # pyre-fixme[6]: For 1st argument expected `str` but got `int`. for ports in vlan_port_map[vlan_id].values(): for port in ports: port_names.append(port) diff --git a/fboss/qsfp_service/QsfpServiceHandler.cpp b/fboss/qsfp_service/QsfpServiceHandler.cpp index 128ca6b8db403..b7c639a1eebde 100644 --- a/fboss/qsfp_service/QsfpServiceHandler.cpp +++ b/fboss/qsfp_service/QsfpServiceHandler.cpp @@ -82,11 +82,17 @@ void QsfpServiceHandler::getTransceiverInfo( } void QsfpServiceHandler::getPortsRequiringOpticsFwUpgrade( - std::vector& ports) { + std::map& ports) { auto log = LOG_THRIFT_CALL(INFO); ports = manager_->getPortsRequiringOpticsFwUpgrade(); } +void QsfpServiceHandler::triggerAllOpticsFwUpgrade( + std::map& ports) { + auto log = LOG_THRIFT_CALL(INFO); + ports = manager_->triggerAllOpticsFwUpgrade(); +} + void QsfpServiceHandler::getTransceiverConfigValidationInfo( std::map& info, std::unique_ptr> ids, diff --git a/fboss/qsfp_service/QsfpServiceHandler.h b/fboss/qsfp_service/QsfpServiceHandler.h index e5e30ab64d890..1dbe6777ff7ff 100644 --- a/fboss/qsfp_service/QsfpServiceHandler.h +++ b/fboss/qsfp_service/QsfpServiceHandler.h @@ -185,7 +185,11 @@ class QsfpServiceHandler void dumpTransceiverI2cLog(std::unique_ptr portName) override; void getPortsRequiringOpticsFwUpgrade( - std::vector& ports) override; + std::map& ports) override; + + void triggerAllOpticsFwUpgrade( + std::map& ports) override; + /* * Get the list of supported PRBS polynomials for the given port and * prbs component diff --git a/fboss/qsfp_service/TransceiverManager.cpp b/fboss/qsfp_service/TransceiverManager.cpp index 51f6d037ccf75..f71f68c768e6e 100644 --- a/fboss/qsfp_service/TransceiverManager.cpp +++ b/fboss/qsfp_service/TransceiverManager.cpp @@ -59,6 +59,21 @@ DEFINE_bool( false, "Enable transceiver validation feature in qsfp_service"); +DEFINE_bool( + firmware_upgrade_on_coldboot, + false, + "Set to true to automatically upgrade firmware on coldboot"); + +DEFINE_bool( + firmware_upgrade_on_link_down, + false, + "Set to true to automatically upgrade firmware when link goes down"); + +DEFINE_bool( + firmware_upgrade_on_tcvr_insert, + false, + "Set to true to automatically upgrade firmware when a transceiver is inserted"); + namespace { constexpr auto kForceColdBootFileName = "cold_boot_once_qsfp_service"; constexpr auto kWarmBootFlag = "can_warm_boot"; @@ -221,6 +236,9 @@ QsfpServiceRunState TransceiverManager::getRunState() const { if (isExiting()) { return QsfpServiceRunState::EXITING; } + if (isUpgradingFirmware()) { + return QsfpServiceRunState::UPGRADING_FIRMWARE; + } if (isFullyInitialized()) { return QsfpServiceRunState::ACTIVE; } @@ -408,21 +426,44 @@ const std::string TransceiverManager::getPortName(TransceiverID tcvrId) const { return portNames.empty() ? "" : *portNames.begin(); } -std::vector TransceiverManager::getPortsRequiringOpticsFwUpgrade() - const { - std::vector ports; +std::map +TransceiverManager::getPortsRequiringOpticsFwUpgrade() const { + std::map ports; if (!isFullyInitialized()) { throw FbossError("Service is still initializing..."); } auto lockedTransceivers = transceivers_.rlock(); for (const auto& tcvrIt : *lockedTransceivers) { - if (requiresFirmwareUpgrade(*tcvrIt.second)) { - ports.push_back(getPortName(tcvrIt.first)); + auto firmwareUpgradeData = getFirmwareUpgradeData(*tcvrIt.second); + if (firmwareUpgradeData.has_value()) { + ports[getPortName(tcvrIt.first)] = firmwareUpgradeData.value(); } } return ports; } +std::map +TransceiverManager::triggerAllOpticsFwUpgrade() { + std::map ports; + if (!isFullyInitialized()) { + throw FbossError("Service is still initializing..."); + } + if (isUpgradingFirmware()) { + throw FbossError("Service is already upgrading firmware..."); + } + auto portsForFwUpgrade = getPortsRequiringOpticsFwUpgrade(); + auto tcvrsToUpgradeWLock = tcvrsForFwUpgrade.wlock(); + + for (const auto& [portName, _] : portsForFwUpgrade) { + if (portNameToModule_.find(portName) != portNameToModule_.end()) { + auto tcvrID = TransceiverID(portNameToModule_[portName]); + FW_LOG(INFO, tcvrID) << "Selected for FW upgrade"; + tcvrsToUpgradeWLock->insert(TransceiverID(portNameToModule_[portName])); + } + } + return portsForFwUpgrade; +} + bool TransceiverManager::firmwareUpgradeRequired(TransceiverID id) { auto lockedTransceivers = transceivers_.rlock(); auto tcvrIt = lockedTransceivers->find(id); @@ -436,7 +477,7 @@ bool TransceiverManager::firmwareUpgradeRequired(TransceiverID id) { bool iOevbBusy = false; bool present = tcvr.isPresent(); std::string partNumber = tcvr.getPartNumber(); - bool requiresUpgrade = present && requiresFirmwareUpgrade(tcvr); + bool requiresUpgrade = present && getFirmwareUpgradeData(tcvr).has_value(); if (forceFirmwareUpgradeForTesting_ || requiresUpgrade) { // If we are here, it means that this transceiver is present and has the // firmware version mismatch and hence requires upgrade @@ -502,9 +543,10 @@ std::optional TransceiverManager::getFirmwareFromCfg( return fwVersionInCfgIt->second; } -bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { - // Returns true if the current firmware revision is different than the one in - // qsfp config +std::optional TransceiverManager::getFirmwareUpgradeData( + Transceiver& tcvr) const { + // Returns a FirmwareUpgrade if the current firmware revision is different + // than the one in qsfp config else std::nullopt auto cachedTcvrInfo = tcvr.getTransceiverInfo(); auto moduleStatus = cachedTcvrInfo.tcvrState()->status(); int tcvrID = tcvr.getID(); @@ -513,24 +555,26 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { if (!moduleStatus.has_value()) { FW_LOG(DBG4, tcvrID) << " Part Number " << partNumber - << " moduleStatus not set. Returning false from requiresFirmwareUpgrade"; - return false; + << " moduleStatus not set. Returning nullopt from getFirmwareUpgradeData"; + return std::nullopt; } auto fwStatus = moduleStatus->fwStatus(); if (!fwStatus.has_value()) { FW_LOG(DBG4, tcvrID) << " Part Number " << partNumber - << " fwStatus not set. Returning false from requiresFirmwareUpgrade"; - return false; + << " fwStatus not set. Returning nullopt from getFirmwareUpgradeData"; + return std::nullopt; } + FirmwareUpgradeData fwUpgradeData; + fwUpgradeData.partNumber() = partNumber; auto fwFromConfig = getFirmwareFromCfg(tcvr); if (!fwFromConfig.has_value()) { FW_LOG(DBG4, tcvrID) << " Part Number " << partNumber - << " Fw not available in config. Returning false from requiresFirmwareUpgrade"; - return false; + << " Fw not available in config. Returning nullopt from getFirmwareUpgradeData"; + return std::nullopt; } auto& versions = *fwFromConfig->versions(); @@ -542,9 +586,11 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { << " Part Number " << partNumber << " Application Version in cfg=" << fwIt.get_version() << " current operational version= " << *fwStatus->version() - << ". Returning true from requiresFirmwareUpgrade for tcvr=" + << ". Returning valid getFirmwareUpgradeData for tcvr=" << tcvr.getID(); - return true; + fwUpgradeData.currentFirmwareVersion() = *fwStatus->version(); + fwUpgradeData.desiredFirmwareVersion() = fwIt.get_version(); + return fwUpgradeData; } if (fwType == cfg::FirmwareType::DSP && fwStatus->dspFwVer() && fwIt.get_version() != *fwStatus->dspFwVer()) { @@ -552,9 +598,11 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { << " Part Number " << partNumber << " DSP Version in cfg=" << fwIt.get_version() << " current operational version= " << *fwStatus->dspFwVer() - << ". Returning true from requiresFirmwareUpgrade for tcvr=" + << ". Returning valid getFirmwareUpgradeData for tcvr=" << tcvr.getID(); - return true; + fwUpgradeData.currentFirmwareVersion() = *fwStatus->dspFwVer(); + fwUpgradeData.desiredFirmwareVersion() = fwIt.get_version(); + return fwUpgradeData; } FW_LOG(DBG, tcvrID) << " Part Number " << partNumber << " FW Type Cfg " << apache::thrift::util::enumNameSafe(fwType) @@ -566,10 +614,10 @@ bool TransceiverManager::requiresFirmwareUpgrade(Transceiver& tcvr) const { FW_LOG(INFO, tcvrID) << " Part Number " << partNumber << " num versions found: " << versions.size() - << " Version match in requiresFirmwareUpgrade. Not Upgrading"; + << " Version match in getFirmwareUpgradeData. Not Upgrading"; // Versions match. No need to upgrade firmware - return false; + return std::nullopt; } bool TransceiverManager::upgradeFirmware(Transceiver& tcvr) { @@ -1539,11 +1587,13 @@ void TransceiverManager::updateTransceiverPortStatus() noexcept { << " transceivers need to update port status. Total execute time(ms):" << duration_cast(steady_clock::now() - begin).count(); - triggerFirmwareUpgradeEvents(tcvrsForFwUpgrade); + if (FLAGS_firmware_upgrade_on_link_down) { + triggerFirmwareUpgradeEvents(tcvrsForFwUpgrade); + } } void TransceiverManager::triggerFirmwareUpgradeEvents( - std::unordered_set& tcvrs) { + const std::unordered_set& tcvrs) { if (!FLAGS_firmware_upgrade_supported || tcvrs.empty()) { return; } @@ -1560,6 +1610,7 @@ void TransceiverManager::triggerFirmwareUpgradeEvents( } } if (!results.empty()) { + isUpgradingFirmware_ = true; executeStateUpdates(); heartbeatWatchdog_->pauseMonitoringHeartbeat(updateThreadHeartbeat_); waitForAllBlockingStateUpdateDone(results); @@ -1833,18 +1884,20 @@ void TransceiverManager::refreshStateMachines() { const auto& presentXcvrIds = refreshTransceivers(); bool firstRefreshAfterColdboot = !canWarmBoot_ && !isFullyInitialized(); - // Find transceivers that were just discovered or that are still inactive std::unordered_set potentialTcvrsForFwUpgrade; for (auto tcvrID : presentXcvrIds) { auto curState = getCurrentState(tcvrID); - if (curState == TransceiverStateMachineState::INACTIVE) { + if (curState == TransceiverStateMachineState::INACTIVE && + FLAGS_firmware_upgrade_on_link_down) { // Anytime a module is in inactive state (link down), it's a candidate for // fw upgrade XLOG(INFO) << "Transceiver " << static_cast(tcvrID) << " is in INACTIVE state, adding it to list of potentialTcvrsForFwUpgrade"; potentialTcvrsForFwUpgrade.insert(tcvrID); - } else if (curState == TransceiverStateMachineState::DISCOVERED) { + } else if ( + curState == TransceiverStateMachineState::DISCOVERED && + FLAGS_firmware_upgrade_on_coldboot) { if (firstRefreshAfterColdboot) { // First refresh after cold boot and module is still in // discovered state @@ -1852,7 +1905,7 @@ void TransceiverManager::refreshStateMachines() { << "Transceiver " << static_cast(tcvrID) << " just did a cold boot and is still in discovered state, adding it to list of potentialTcvrsForFwUpgrade"; potentialTcvrsForFwUpgrade.insert(tcvrID); - } else { + } else if (FLAGS_firmware_upgrade_on_tcvr_insert) { auto stateMachine = stateMachines_.find(tcvrID); if (stateMachine != stateMachines_.end() && stateMachine->second->getStateMachine().rlock()->get_attribute( @@ -1867,6 +1920,11 @@ void TransceiverManager::refreshStateMachines() { } } } + { + auto tcvrsToUpgradeWLock = tcvrsForFwUpgrade.wlock(); + triggerFirmwareUpgradeEvents(*tcvrsToUpgradeWLock); + tcvrsToUpgradeWLock->clear(); + } if (!potentialTcvrsForFwUpgrade.empty()) { triggerFirmwareUpgradeEvents(potentialTcvrsForFwUpgrade); @@ -1909,6 +1967,8 @@ void TransceiverManager::refreshStateMachines() { // Update the warmboot state if there is a change. setWarmBootState(); + isUpgradingFirmware_ = false; + XLOG(INFO) << "refreshStateMachines ended"; } diff --git a/fboss/qsfp_service/TransceiverManager.h b/fboss/qsfp_service/TransceiverManager.h index a80edba12c09f..a752676f75596 100644 --- a/fboss/qsfp_service/TransceiverManager.h +++ b/fboss/qsfp_service/TransceiverManager.h @@ -571,6 +571,10 @@ class TransceiverManager { return isExiting_; } + bool isUpgradingFirmware() const { + return isUpgradingFirmware_; + } + bool isFullyInitialized() const { return isFullyInitialized_; } @@ -602,9 +606,13 @@ class TransceiverManager { // Determine if transceiver FW requires upgrade. // Transceiver has to be present, and the version in the QsfpConfig // has to be different from whats already running in HW. - bool requiresFirmwareUpgrade(Transceiver& tcvr) const; + std::optional getFirmwareUpgradeData( + Transceiver& tcvr) const; + + std::map getPortsRequiringOpticsFwUpgrade() + const; - std::vector getPortsRequiringOpticsFwUpgrade() const; + std::map triggerAllOpticsFwUpgrade(); protected: /* @@ -801,7 +809,8 @@ class TransceiverManager { void triggerAgentConfigChangeEvent(); - void triggerFirmwareUpgradeEvents(std::unordered_set& tcvrs); + void triggerFirmwareUpgradeEvents( + const std::unordered_set& tcvrs); // Update the cached PortStatus of TransceiverToPortInfo using wedge_agent // getPortStatus() results @@ -874,6 +883,10 @@ class TransceiverManager { // If it is, we should not accept any state update std::atomic isExiting_{false}; + // A global flag to indicate whether the any optics firmware upgrade is in + // progress + std::atomic isUpgradingFirmware_{false}; + /* * Flag that indicates whether the service has been fully initialized. * Fully initialized = system, pim and phys initialized and atleast one @@ -976,6 +989,8 @@ class TransceiverManager { std::atomic exceededTimeLimitFwUpgradeCount_{0}; std::atomic maxTimeTakenForFwUpgrade_{0}; + folly::Synchronized> tcvrsForFwUpgrade; + friend class TransceiverStateMachineTest; }; } // namespace facebook::fboss diff --git a/fboss/qsfp_service/TransceiverStateMachine.h b/fboss/qsfp_service/TransceiverStateMachine.h index 3eb25f365321c..0a80c4b4e6f8b 100644 --- a/fboss/qsfp_service/TransceiverStateMachine.h +++ b/fboss/qsfp_service/TransceiverStateMachine.h @@ -500,7 +500,12 @@ BOOST_MSM_EUML_TRANSITION_TABLE(( // May need to remediate transciever if some ports are down ACTIVE + REMEDIATE_TRANSCEIVER [tryRemediateTransceiver] / logStateChanged == XPHY_PORTS_PROGRAMMED, INACTIVE + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + ACTIVE + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, DISCOVERED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + IPHY_PORTS_PROGRAMMED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + XPHY_PORTS_PROGRAMMED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + TRANSCEIVER_READY + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, + TRANSCEIVER_PROGRAMMED + UPGRADE_FIRMWARE [firmwareUpgradeRequired] / logStateChanged == UPGRADING, UPGRADING + RESET_TO_DISCOVERED / logStateChanged == DISCOVERED // +------------------------------------------------------------------------------------------------------------+ ), TransceiverTransitionTable) diff --git a/fboss/qsfp_service/if/qsfp.thrift b/fboss/qsfp_service/if/qsfp.thrift index 6be90ec713bb3..3a1519ecbe6d2 100644 --- a/fboss/qsfp_service/if/qsfp.thrift +++ b/fboss/qsfp_service/if/qsfp.thrift @@ -295,7 +295,13 @@ service QsfpService extends phy.FbossCommonPhyCtrl { 1: fboss.FbossBaseError error, ); - list getPortsRequiringOpticsFwUpgrade() throws ( - 1: fboss.FbossBaseError error, - ); + map< + string, + transceiver.FirmwareUpgradeData + > getPortsRequiringOpticsFwUpgrade() throws (1: fboss.FbossBaseError error); + + map< + string, + transceiver.FirmwareUpgradeData + > triggerAllOpticsFwUpgrade() throws (1: fboss.FbossBaseError error); } diff --git a/fboss/qsfp_service/if/transceiver.thrift b/fboss/qsfp_service/if/transceiver.thrift index 0b8d538464a9a..228fa68e30724 100644 --- a/fboss/qsfp_service/if/transceiver.thrift +++ b/fboss/qsfp_service/if/transceiver.thrift @@ -20,6 +20,7 @@ enum QsfpServiceRunState { INITIALIZED = 1, ACTIVE = 2, EXITING = 3, + UPGRADING_FIRMWARE = 4, } struct Vendor { @@ -730,3 +731,9 @@ struct QsfpToBmcSyncData { 3: SwitchDeploymentInfo switchDeploymentInfo; 4: map transceiverThermalData; } + +struct FirmwareUpgradeData { + 1: string partNumber; + 2: string currentFirmwareVersion; + 3: string desiredFirmwareVersion; +} diff --git a/fboss/qsfp_service/module/FirmwareUpgrader.cpp b/fboss/qsfp_service/module/FirmwareUpgrader.cpp index d5f4c40099da4..adf338b6e271f 100644 --- a/fboss/qsfp_service/module/FirmwareUpgrader.cpp +++ b/fboss/qsfp_service/module/FirmwareUpgrader.cpp @@ -44,10 +44,10 @@ constexpr int moduleDatapathInitDurationUsec = 5000000; CmisFirmwareUpgrader::CmisFirmwareUpgrader( TransceiverImpl* bus, unsigned int modId, - std::unique_ptr fbossFirmware) - : bus_(bus), moduleId_(modId), fbossFirmware_(std::move(fbossFirmware)) { + FbossFirmware* fbossFirmware) + : bus_(bus), moduleId_(modId), fbossFirmware_(fbossFirmware) { // Check the FbossFirmware object first - if (fbossFirmware_.get() == nullptr) { + if (fbossFirmware_ == nullptr) { XLOG(ERR) << "FbossFirmware object is null, returning..."; return; } diff --git a/fboss/qsfp_service/module/FirmwareUpgrader.h b/fboss/qsfp_service/module/FirmwareUpgrader.h index 4df1fe2e99d20..707e6e2bcce4c 100644 --- a/fboss/qsfp_service/module/FirmwareUpgrader.h +++ b/fboss/qsfp_service/module/FirmwareUpgrader.h @@ -48,7 +48,7 @@ class CmisFirmwareUpgrader { CmisFirmwareUpgrader( TransceiverImpl* bus, unsigned int modId, - std::unique_ptr fbossFirmware); + FbossFirmware* fbossFirmware); // Function to trigger the firmware download to the QSFP module of CMIS type bool cmisModuleFirmwareUpgrade(); @@ -60,7 +60,7 @@ class CmisFirmwareUpgrader { // module Id for upgrade unsigned int moduleId_; // FbossFirmware object - std::unique_ptr fbossFirmware_; + FbossFirmware* fbossFirmware_; // Firmware image pointer folly::io::Cursor imageCursor_{nullptr}; // Image IO buffer. This contains the entire firmware image file content diff --git a/fboss/qsfp_service/module/QsfpModule.cpp b/fboss/qsfp_service/module/QsfpModule.cpp index c217d7bbe5a26..ad3d663b51bd9 100644 --- a/fboss/qsfp_service/module/QsfpModule.cpp +++ b/fboss/qsfp_service/module/QsfpModule.cpp @@ -50,6 +50,8 @@ using std::lock_guard; using std::memcpy; using std::mutex; +static constexpr int kAllowedFwUpgradeAttempts = 3; + namespace facebook { namespace fboss { @@ -173,11 +175,10 @@ bool QsfpModule::upgradeFirmwareLocked( std::vector>& fwList) { QSFP_LOG(INFO, this) << "Upgrading firmware"; - bool fwUpgradeResult = true; - lastFwUpgradeStartTime_ = std::time(nullptr); - { // Start of firmware upgrade - + auto fwUpgradeFn = [this, &fwList]() { + bool fwUpgradeResult = true; + // Start of firmware upgrade // Step 1: Disable TX before upgrading the firmware. This helps keeps the // link down during upgrade and avoid noise try { @@ -211,20 +212,40 @@ bool QsfpModule::upgradeFirmwareLocked( // Step 4: Upgrade Firmware for (auto& fw : fwList) { - fwUpgradeResult &= upgradeFirmwareLockedImpl(std::move(fw)); + fwUpgradeResult &= upgradeFirmwareLockedImpl(fw.get()); } // Trigger a hard reset of the transceiver to kick start the new firmware triggerModuleReset(); - } // End of firmware upgrade + // End of Firmware Upgrade + return fwUpgradeResult; + }; + int upgradeAttempts = 1; + bool finalFwUpgradeResult = false; + while (upgradeAttempts <= kAllowedFwUpgradeAttempts) { + finalFwUpgradeResult = fwUpgradeFn(); + if (!finalFwUpgradeResult && upgradeAttempts < kAllowedFwUpgradeAttempts) { + // Sleep 5 seconds so that the module recovers after it is reset + // @lint-ignore CLANGTIDY facebook-hte-BadCall-sleep + sleep(5); + // Refresh the cache to get the latest state of the module after the + // module was reset after a failed FW upgrade + updateQsfpData(true); + upgradeAttempts++; + } else { + break; + } + } lastFwUpgradeEndTime_ = std::time(nullptr); auto elapsedSeconds = lastFwUpgradeEndTime_ - lastFwUpgradeStartTime_; QSFP_LOG(INFO, this) << "Firmware upgrade completed " - << (fwUpgradeResult ? "successfully" : "unsuccessfully") - << " in " << elapsedSeconds << " seconds. "; - return fwUpgradeResult; + << (finalFwUpgradeResult ? "successfully" + : "unsuccessfully") + << " in " << elapsedSeconds + << " seconds, attempts = " << upgradeAttempts; + return finalFwUpgradeResult; } void QsfpModule::triggerModuleReset() { @@ -1419,7 +1440,17 @@ bool QsfpModule::readyTransceiver() { // Check the transceiver power configuration state and then return // accordingly. This function's implementation is dependent on optics // type (Cmis, Sff etc) - return ensureTransceiverReadyLocked(); + if (ensureTransceiverReadyLocked()) { + // After the transceiver is ready, update the cache with the latest + // data. Some modules report inconsistent data while the module is not + // ready, which fails the subsequent calls to program transceiver. Thus + // ensure that the cache is updated for all the subsequent operations + QSFP_LOG(INFO, this) << "Transceiver is ready, updating cache"; + updateQsfpData(false); + return true; + } else { + return false; + } } else { // If module is not present then don't block state machine transition // and return true diff --git a/fboss/qsfp_service/module/QsfpModule.h b/fboss/qsfp_service/module/QsfpModule.h index e99235942e1f9..c5dea02d5dbf6 100644 --- a/fboss/qsfp_service/module/QsfpModule.h +++ b/fboss/qsfp_service/module/QsfpModule.h @@ -654,8 +654,7 @@ class QsfpModule : public Transceiver { bool shouldRemediateLocked(time_t pauseRemidiation) override; - virtual bool upgradeFirmwareLockedImpl( - std::unique_ptr /* fbossFw */) const { + virtual bool upgradeFirmwareLockedImpl(FbossFirmware* /* fbossFw */) const { return false; } diff --git a/fboss/qsfp_service/module/cmis/CmisModule.cpp b/fboss/qsfp_service/module/cmis/CmisModule.cpp index f2daa75b915d5..a015d5edc2a72 100644 --- a/fboss/qsfp_service/module/cmis/CmisModule.cpp +++ b/fboss/qsfp_service/module/cmis/CmisModule.cpp @@ -4007,12 +4007,11 @@ bool CmisModule::setTransceiverTxImplLocked( return true; } -bool CmisModule::upgradeFirmwareLockedImpl( - std::unique_ptr fbossFw) const { +bool CmisModule::upgradeFirmwareLockedImpl(FbossFirmware* fbossFw) const { QSFP_LOG(INFO, this) << "Upgrading CMIS Module Firmware"; - auto fwUpgradeObj = std::make_unique( - qsfpImpl_, getID(), std::move(fbossFw)); + auto fwUpgradeObj = + std::make_unique(qsfpImpl_, getID(), fbossFw); bool ret = fwUpgradeObj->cmisModuleFirmwareUpgrade(); return ret; diff --git a/fboss/qsfp_service/module/cmis/CmisModule.h b/fboss/qsfp_service/module/cmis/CmisModule.h index 57459c6e82cf6..2f14ffd31e6b0 100644 --- a/fboss/qsfp_service/module/cmis/CmisModule.h +++ b/fboss/qsfp_service/module/cmis/CmisModule.h @@ -561,8 +561,7 @@ class CmisModule : public QsfpModule { uint8_t lane, bool readFromCache = true); - bool upgradeFirmwareLockedImpl( - std::unique_ptr fbossFw) const override; + bool upgradeFirmwareLockedImpl(FbossFirmware* fbossFw) const override; void readFromCacheOrHw( CmisField field, diff --git a/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp b/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp index 6cc53e4e85554..73696f6f04985 100644 --- a/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp +++ b/fboss/qsfp_service/module/tests/QsfpModuleTest.cpp @@ -488,38 +488,38 @@ TEST_F(QsfpModuleTest, verifyLaneToPortMapping) { verify(expectedMap); } -TEST_F(QsfpModuleTest, requiresFirmwareUpgrade) { +TEST_F(QsfpModuleTest, getFirmwareUpgradeData) { qsfp_->overrideVendorPN(getFakePartNumber()); const QsfpConfig* qsfp_config = transceiverManager_->getQsfpConfig(); // Test empty fw status transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_FALSE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_FALSE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test app fw status mismatch qsfp_->setAppFwVersion(getFakeAppFwVersion()); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_FALSE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_FALSE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test app fw status mismatch qsfp_->setAppFwVersion("foo"); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_TRUE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_TRUE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test dsp fw status match qsfp_->setDspFwVersion(getFakeDspFwVersion()); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_FALSE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_FALSE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); // Test dsp fw status mismatch qsfp_->setDspFwVersion("bar"); transceiverManager_->refreshStateMachines(); qsfp_->useActualGetTransceiverInfo(); - EXPECT_TRUE(transceiverManager_->requiresFirmwareUpgrade(*qsfp_)); + EXPECT_TRUE(transceiverManager_->getFirmwareUpgradeData(*qsfp_).has_value()); } } // namespace facebook::fboss diff --git a/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp b/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp index 5370db6286b8c..d16aaaac5fbbc 100644 --- a/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp +++ b/fboss/qsfp_service/platforms/wedge/WedgeManagerInit.cpp @@ -75,7 +75,9 @@ std::unique_ptr createWedgeManager() { return createMeru400biaWedgeManager(platformMappingStr); } else if (mode == PlatformType::PLATFORM_MERU400BIU) { return createMeru400biuWedgeManager(platformMappingStr); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { return createMeru800biaWedgeManager(platformMappingStr); } else if ( mode == PlatformType::PLATFORM_MERU800BFA || diff --git a/fboss/qsfp_service/platforms/wedge/platform.bzl b/fboss/qsfp_service/platforms/wedge/platform.bzl deleted file mode 100644 index eaf03de5cc81b..0000000000000 --- a/fboss/qsfp_service/platforms/wedge/platform.bzl +++ /dev/null @@ -1,109 +0,0 @@ -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "to_sdk_suffix", "to_versions") - -COMMON_SRCS = [ - "GalaxyManager.cpp", - "QsfpRestClient.cpp", - "Wedge100Manager.cpp", - "Wedge40Manager.cpp", - "WedgeManager.cpp", - "WedgeManagerInit.cpp", - "BspWedgeManager.cpp", -] - -OSS_SRCS = COMMON_SRCS + [ - "oss/WedgeManagerInit.cpp", - "oss/Wedge400CManager.cpp", -] - -CLOSED_SRCS = COMMON_SRCS + [ - "facebook/DarwinManager.cpp", - "facebook/FujiManager.cpp", - "facebook/Minipack16QManager.cpp", - "facebook/Wedge400CManager.cpp", - "facebook/Wedge400Manager.cpp", - "facebook/WedgeManagerInit.cpp", - "facebook/YampManager.cpp", -] - -CREDO_SRCS = CLOSED_SRCS + [ - "facebook/CloudRipperManager.cpp", - "facebook/ElbertMacsecHandler.cpp", - "facebook/ElbertManager.cpp", -] - -COMMON_DEPS = [ - "//fboss/agent/platforms/common/galaxy:galaxy_platform_mapping", - "//fboss/agent/platforms/common/wedge100:wedge100_platform_mapping", - "//fboss/agent/platforms/common/wedge40:wedge40_platform_mapping", - "//fboss/lib/bsp:bsp_core", - "//fboss/lib/platforms:product-info", - "//fboss/mka_service/handlers:macsec_handler", - "//fboss/qsfp_service:qsfp-config", - "//folly/gen:base", - "//fboss/lib/bsp/meru400bfu:meru400bfu_bsp", - "//fboss/lib/bsp/meru400bia:meru400bia_bsp", - "//fboss/lib/bsp/meru400biu:meru400biu_bsp", - "//fboss/lib/bsp/montblanc:montblanc_bsp", - "//fboss/lib/bsp/morgan800cc:morgan800cc_bsp", -] - -CLOSED_DEPS = COMMON_DEPS + [ - "//fboss/agent/platforms/common/darwin:darwin_platform_mapping", - "//fboss/agent/platforms/common/elbert:elbert_platform_mapping", - "//fboss/agent/platforms/common/fuji:fuji_platform_mapping", - "//fboss/agent/platforms/common/minipack:minipack_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_mapping", - "//fboss/agent/platforms/common/wedge400:wedge400_platform_utils", - "//fboss/agent/platforms/common/wedge400c:wedge400c_platform_mapping", - "//fboss/agent/platforms/common/yamp:yamp_platform_mapping", - "//fboss/lib/fpga/facebook/fuji:fuji_container", - "//fboss/lib/phy:phy-management", - "//fboss/qsfp_service/fsdb:fsdb-syncer", -] - -def _get_srcs(sai_impl): - if sai_impl.name == "credo": - return CREDO_SRCS - else: - # TODO: split up srcs based on sai impl - return CREDO_SRCS - -def _sai_platform_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - - return cpp_library( - name = "wedge-platform{}".format(impl_suffix), - srcs = _get_srcs(sai_impl), - headers = [ - "FbossMacsecHandler.h", - "QsfpRestClient.h", - "WedgeManager.h", - "Wedge400CManager.h", - "facebook/credo_stub.h", - ], - versions = to_versions(sai_impl), - exported_deps = CLOSED_DEPS + [ - ":wedge-transceiver", - "//fboss/agent:core", - "//fboss/lib/phy:sai-phy-management{}".format(impl_suffix), - "//fboss/qsfp_service:transceiver-manager", - "//fboss/qsfp_service/module:qsfp-module", - "//fboss/lib/fpga/facebook/cloudripper:cloudripper_i2c", - "//fboss/lib/fpga/facebook/darwin:darwin_i2c", - "//fboss/lib/fpga/facebook/elbert:elbert_i2c", - "//fboss/lib/fpga:wedge400_i2c", - "//fboss/lib/fpga/facebook/yamp:yamp_i2c", - "//fboss/lib/i2c/facebook/fuji:fuji_i2c", - "//fboss/lib:rest-client", - "//folly:network_address", - ], - exported_external_deps = [ - "boost", - ("boost", None, "boost_container"), - ], - ) - -def all_platform_libs(): - for sai_impl in SAI_PHY_IMPLS: - _sai_platform_lib(sai_impl) diff --git a/fboss/qsfp_service/qsfp_service.bzl b/fboss/qsfp_service/qsfp_service.bzl deleted file mode 100644 index 9c3ee42318fd7..0000000000000 --- a/fboss/qsfp_service/qsfp_service.bzl +++ /dev/null @@ -1,71 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss:THIRD-PARTY-VERSIONS.bzl", "to_versions") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "get_all_native_phy_impls", "to_impl_lib_name", "to_sdk_suffix") - -def _qsfp_core_lib(impl): - impl_suffix = to_sdk_suffix(impl) - deps = [ - ":handler", - ":stats", - "//common/services/cpp:acl_checker_module", - "//common/services/cpp:build_module", - "//common/services/cpp:fb303_module", - "//common/services/cpp:thrift_stats_module", - "//fb303:logging", - "//folly/experimental:function_scheduler", - "//folly/io/async:async_signal_handler", - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(impl_suffix), - ] - - if impl in SAI_PHY_IMPLS: - deps.extend(["//fboss/agent/facebook:sai_version_{}".format(to_impl_lib_name(impl))]) - return cpp_library( - name = "core{}".format(impl_suffix), - srcs = [ - "facebook/QsfpServer.cpp", - "QsfpServer.cpp", - "QsfpServiceSignalHandler.cpp", - ], - headers = [ - "QsfpServer.h", - ], - undefined_symbols = True, # TODO(T23121628): fix deps and remove - versions = to_versions(impl), - exported_deps = deps, - ) - -def _qsfp_service_binary(impl, versions): - impl_suffix = to_sdk_suffix(impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if impl in SAI_PHY_IMPLS else "-default" - deps = [ - ":core{}".format(core_suffix), - "//fboss/qsfp_service/fsdb:fsdb-syncer", - "//fboss/fsdb/common:flags", - ] - return cpp_binary( - name = "qsfp_service{}".format(impl_suffix), - srcs = [ - "Main.cpp", - ], - auto_headers = AutoHeaders.SOURCES, - versions = versions, - preprocessor_flags = [], - deps = deps, - ) - -def all_qsfp_core_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_core_lib(sai_impl) - -def all_qsfp_service_binaries(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_service_binary(sai_impl, to_versions(sai_impl)) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_service_binary(impl, to_versions(impl)) diff --git a/fboss/qsfp_service/test/TransceiverManagerTest.cpp b/fboss/qsfp_service/test/TransceiverManagerTest.cpp index 1a618bd1ede23..a24f64d9db2eb 100644 --- a/fboss/qsfp_service/test/TransceiverManagerTest.cpp +++ b/fboss/qsfp_service/test/TransceiverManagerTest.cpp @@ -71,6 +71,8 @@ TEST_F(TransceiverManagerTest, coldBootTest) { TEST_F(TransceiverManagerTest, warmBootTest) { // Trigger a graceful exit transceiverManager_->gracefulExit(); + gflags::SetCommandLineOptionWithMode( + "can_qsfp_service_warm_boot", "1", gflags::SET_FLAGS_DEFAULT); // Check warm boot flag file is created EXPECT_TRUE(checkFileExists(warmBootFlagFile)); diff --git a/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp b/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp index 02b34f65273fd..bdcc8f20b65e1 100644 --- a/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp +++ b/fboss/qsfp_service/test/TransceiverStateMachineTest.cpp @@ -1567,7 +1567,7 @@ TEST_F(TransceiverStateMachineTest, remediateCmisTransceiverFailed) { // Expect updateQsfpData and updateCachedTransceiverInfoLocked to be // called from refreshStateMachines() we do in verify() below EXPECT_CALL(*mockXcvr, updateQsfpData(true)).Times(1); - EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(2); + EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(3); EXPECT_CALL(*mockXcvr, updateCachedTransceiverInfoLocked(::testing::_)) .Times(2) .InSequence(s); @@ -2084,7 +2084,7 @@ TEST_F(TransceiverStateMachineTest, reseatTransceiver) { // valid MockCmisModule* mockXcvr = static_cast(xcvr_); ::testing::Sequence s; - EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(2); + EXPECT_CALL(*mockXcvr, updateQsfpData(false)).Times(3); EXPECT_CALL(*mockXcvr, updateCachedTransceiverInfoLocked(::testing::_)) .Times(2); setProgramCmisModuleExpectation(true); @@ -2243,7 +2243,12 @@ TEST_F(TransceiverStateMachineTest, upgradeFirmware) { auto allStates = getAllStates(); verifyStateMachine( {TransceiverStateMachineState::UPGRADING, - TransceiverStateMachineState::INACTIVE}, + TransceiverStateMachineState::INACTIVE, + TransceiverStateMachineState::IPHY_PORTS_PROGRAMMED, + TransceiverStateMachineState::XPHY_PORTS_PROGRAMMED, + TransceiverStateMachineState::TRANSCEIVER_READY, + TransceiverStateMachineState::TRANSCEIVER_PROGRAMMED, + TransceiverStateMachineState::ACTIVE}, TransceiverStateMachineState::DISCOVERED /* expected state */, allStates, []() {} /* preUpdate */, diff --git a/fboss/qsfp_service/test/benchmarks/bench_test.bzl b/fboss/qsfp_service/test/benchmarks/bench_test.bzl deleted file mode 100644 index d36ae17346e80..0000000000000 --- a/fboss/qsfp_service/test/benchmarks/bench_test.bzl +++ /dev/null @@ -1,91 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "get_all_native_phy_impls", "to_sdk_suffix", "to_versions") - -def _hw_bench_utils_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (sai_impl.sai_version != None) else "-default" - return cpp_library( - name = "hw_bench_utils{}".format(impl_suffix), - srcs = [ - "HwBenchmarkUtils.cpp", - ], - headers = [ - "HwBenchmarkUtils.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/lib:common_utils", - "//folly:benchmark", - "//fboss/qsfp_service:core{}".format(core_suffix), - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - ], - ) - -def _qsfp_bench_test_lib(impl): - impl_suffix = to_sdk_suffix(impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (impl.sai_version != None) else "-default" - return cpp_library( - name = "qsfp_bench_test_lib-{}-{}".format(impl.name, impl.version), - srcs = [ - "PhyInitBenchmark.cpp", - "ReadWriteRegisterBenchmark.cpp", - "RefreshTcvrBenchmark.cpp", - "UpdateXphyStatsBenchmark.cpp", - ], - link_whole = True, - undefined_symbols = True, - versions = to_versions(impl), - exported_deps = [ - "//folly:benchmark", - ":hw_bench_utils{}".format(impl_suffix), - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - ], - ) - -def _hw_qsfp_bench_test(impl, versions): - impl_suffix = to_sdk_suffix(impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (impl.sai_version != None) else "-default" - return cpp_binary( - name = "qsfp_bench_test-{}-{}".format(impl.name, impl.version), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - versions = versions, - deps = [ - "//fboss/lib/test/benchmarks:hw_benchmark_main", - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - "//fboss/qsfp_service/test/benchmarks:qsfp_bench_test_lib-{}-{}".format(impl.name, impl.version), - ], - ) - -def all_hw_bench_utils_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _hw_bench_utils_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _hw_bench_utils_lib(impl) - -def all_qsfp_bench_test_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_bench_test_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_bench_test_lib(impl) - -def all_hw_qsfp_bench_test_binaries(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _hw_qsfp_bench_test(sai_impl, to_versions(sai_impl)) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _hw_qsfp_bench_test(impl, to_versions(impl)) diff --git a/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp b/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp index 6a6241c198b2c..4c94ec4146df9 100644 --- a/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp +++ b/fboss/qsfp_service/test/hw_test/HwPortPrbsTest.cpp @@ -28,7 +28,10 @@ static const std::unordered_map< {7, 9, 10, 11, 13, 15, 20, 23, 31, 49, 58}}}}, {PlatformType::PLATFORM_YAMP, {{{phy::IpModulation::NRZ, {9, 15, 23, 31}}, - {phy::IpModulation::PAM4, {9, 13, 15, 31}}}}}}; + {phy::IpModulation::PAM4, {9, 13, 15, 31}}}}}, + {PlatformType::PLATFORM_FUJI, + {{{phy::IpModulation::NRZ, {31}}, {phy::IpModulation::PAM4, {31}}}}}, +}; } template diff --git a/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp b/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp index 9440ef17db6b3..956df7eef6ee4 100644 --- a/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp +++ b/fboss/qsfp_service/test/hw_test/HwXphyFirmwareTest.cpp @@ -49,6 +49,7 @@ TEST_F(HwXphyFirmwareTest, CheckDefaultXphyFirmwareVersion) { case PlatformType::PLATFORM_LASSEN_DEPRECATED: case PlatformType::PLATFORM_MERU400BIU: case PlatformType::PLATFORM_MERU800BIA: + case PlatformType::PLATFORM_MERU800BIAB: case PlatformType::PLATFORM_MERU800BFA: case PlatformType::PLATFORM_MERU800BFA_P1: case PlatformType::PLATFORM_MERU400BIA: @@ -57,6 +58,7 @@ TEST_F(HwXphyFirmwareTest, CheckDefaultXphyFirmwareVersion) { case PlatformType::PLATFORM_MORGAN800CC: case PlatformType::PLATFORM_JANGA800BIC: case PlatformType::PLATFORM_TAHAN800BC: + case PlatformType::PLATFORM_YANGRA: throw FbossError("No xphys to check FW version on"); case PlatformType::PLATFORM_ELBERT: desiredFw.version() = 1; diff --git a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp index a848107cc0557..bca31cf6167eb 100644 --- a/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp +++ b/fboss/qsfp_service/test/hw_test/OpticsFwUpgradeTest.cpp @@ -30,6 +30,12 @@ class OpticsFwUpgradeTest : public HwTest { // starts later gflags::SetCommandLineOptionWithMode( "max_concurrent_evb_fw_upgrade", "8", gflags::SET_FLAGS_DEFAULT); + gflags::SetCommandLineOptionWithMode( + "firmware_upgrade_on_coldboot", "1", gflags::SET_FLAGS_DEFAULT); + gflags::SetCommandLineOptionWithMode( + "firmware_upgrade_on_link_down", "1", gflags::SET_FLAGS_DEFAULT); + gflags::SetCommandLineOptionWithMode( + "firmware_upgrade_on_tcvr_insert", "1", gflags::SET_FLAGS_DEFAULT); HwTest::SetUp(); // Revert the max_concurrent_evb_fw_upgrade back to 1 which is the default gflags::SetCommandLineOptionWithMode( @@ -76,6 +82,9 @@ class OpticsFwUpgradeTest : public HwTest { tcvrsToTest.push_back(tcvrID); } } + + CHECK(!tcvrsToTest.empty()) << "No upgradeable transceivers found"; + return tcvrsToTest; } @@ -241,9 +250,13 @@ TEST_F(OpticsFwUpgradeTest, upgradeOnLinkDown) { auto portsForFwUpgrade = getHwQsfpEnsemble() ->getWedgeManager() ->getPortsRequiringOpticsFwUpgrade(); + std::vector fwUpgradePorts; + for (auto& [portName, _] : portsForFwUpgrade) { + fwUpgradePorts.push_back(portName); + } EXPECT_TRUE(portsForFwUpgrade.empty()) << "Some modules still require firmware upgrade: " + - folly::join(",", portsForFwUpgrade); + folly::join(",", fwUpgradePorts); // During cold boot setup, update the firmware versions in the config auto qsfpCfg = @@ -267,12 +280,9 @@ TEST_F(OpticsFwUpgradeTest, upgradeOnLinkDown) { portsForFwUpgrade = getHwQsfpEnsemble() ->getWedgeManager() ->getPortsRequiringOpticsFwUpgrade(); - // TODO: T193884846 to make sure all machines have upgradeable transceivers - // and remove this check. - if (!tcvrsToTest.empty()) { - EXPECT_FALSE(portsForFwUpgrade.empty()) - << "No modules requiring firmware upgrade"; - } + + EXPECT_FALSE(portsForFwUpgrade.empty()) + << "No modules requiring firmware upgrade"; }; // Verify function is called for both cold boot and warm boot iterations of @@ -345,12 +355,6 @@ TEST_F(OpticsFwUpgradeTestNoIPhySetup, noUpgradeOnWarmboot) { */ auto tcvrsToTest = transceiversToTest(); - // TODO: T193884846 to make sure all machines have upgradeable transceivers - // and remove this check. - if (tcvrsToTest.empty()) { - XLOG(INFO) << "Chassis has no upgradeable transceivers"; - return; - } // Lambda to refresh state machine and return true if all transceivers are in // TRANSCEIVER_PROGRAMMED state diff --git a/fboss/qsfp_service/test/hw_test/hw_test.bzl b/fboss/qsfp_service/test/hw_test/hw_test.bzl deleted file mode 100644 index 4b25ef989a1e7..0000000000000 --- a/fboss/qsfp_service/test/hw_test/hw_test.bzl +++ /dev/null @@ -1,117 +0,0 @@ -load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders") -load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary") -load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library") -load("//fboss/agent/hw/sai/impl:impl.bzl", "SAI_PHY_IMPLS", "get_all_native_phy_impls", "to_sdk_suffix", "to_versions") - -def _hw_qsfp_ensemble_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - - # for now, use default SAI impl for core if using native SDK - core_suffix = impl_suffix if (sai_impl.sai_version != None) else "-default" - return cpp_library( - name = "hw_qsfp_ensemble{}".format(impl_suffix), - srcs = [ - "HwQsfpEnsemble.cpp", - ], - headers = [ - "HwQsfpEnsemble.h", - ], - versions = to_versions(sai_impl), - exported_deps = [ - "//fboss/agent/platforms/common:platform_mapping", - "//fboss/agent/test:resourcelibutil", - "//fboss/lib/fpga:multi_pim_container", - "//fboss/lib/phy:phy_management_base", - "//fboss/qsfp_service:core{}".format(core_suffix), - "//fboss/qsfp_service/platforms/wedge:wedge-platform{}".format(core_suffix), - ], - ) - -def _qsfp_hw_test_lib(sai_impl): - impl_suffix = to_sdk_suffix(sai_impl) - return cpp_library( - name = "hw_qsfp_test_lib-{}-{}".format(sai_impl.name, sai_impl.version), - srcs = [ - "EmptyHwTest.cpp", - "HwXphyFirmwareTest.cpp", - "HwMacsecTest.cpp", - "HwPimTest.cpp", - "HwPortProfileTest.cpp", - "HwPortUtils.cpp", - "HwTransceiverConfigTest.cpp", - "HwStatsCollectionTest.cpp", - "HwTest.cpp", - "HwTransceiverResetTest.cpp", - "facebook/HwTransceiverThermalDataTest.cpp", - "HwExternalPhyPortTest.cpp", - "HwPortPrbsTest.cpp", - "HwI2CStressTest.cpp", - "HwI2cSelectTest.cpp", - "HwStateMachineTest.cpp", - "HwTransceiverTest.cpp", - "OpticsFwUpgradeTest.cpp", - "HwTransceiverConfigValidationTest.cpp", - ], - headers = [ - "HwPortUtils.h", - ], - link_whole = True, - undefined_symbols = True, - versions = to_versions(sai_impl), - exported_deps = [ - "fbsource//third-party/googletest:gtest", - ":hw_qsfp_ensemble{}".format(impl_suffix), - ":hw_transceiver_utils", - ":qsfp_production_features-cpp2-types", - "//fboss/agent/platforms/common:platform_mapping", - "//fboss/lib:common_utils", - "//fboss/lib/fpga:multi_pim_container", - "//fboss/agent:platform_config-cpp2-types", - "//fboss/agent:switch_state-cpp2-types", - "//fboss/lib/phy:phy-cpp2-types", - "//fboss/mka_service/if:mka_structs-cpp2-types", - "//fboss/qsfp_service/lib:qsfp-config-parser-helper", - "//fboss/qsfp_service/module:qsfp-module", - "//folly/portability:filesystem", - "//thrift/lib/cpp/util:enum_utils", - ], - ) - -def all_hw_qsfp_ensemble_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _hw_qsfp_ensemble_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _hw_qsfp_ensemble_lib(impl) - -def all_qsfp_test_libs(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_hw_test_lib(sai_impl) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_hw_test_lib(impl) - -def _qsfp_hw_test(impl, versions): - impl_suffix = to_sdk_suffix(impl) - return cpp_binary( - name = "qsfp_hw_test-{}-{}".format(impl.name, impl.version), - srcs = [ - ], - auto_headers = AutoHeaders.SOURCES, - versions = versions, - deps = [ - "//fboss/agent/hw/test:hw_test_main", - "//fboss/qsfp_service/test/hw_test:hw_qsfp_ensemble{}".format(impl_suffix), - "//fboss/qsfp_service/test/hw_test:hw_qsfp_test_lib-{}-{}".format(impl.name, impl.version), - ], - ) - -def all_qsfp_test_binaries(): - sai_impls = SAI_PHY_IMPLS - for sai_impl in sai_impls: - _qsfp_hw_test(sai_impl, to_versions(sai_impl)) - native_impls = get_all_native_phy_impls() - for impl in native_impls: - _qsfp_hw_test(impl, to_versions(impl)) diff --git a/fboss/thrift_cow/nodes/BUCK b/fboss/thrift_cow/nodes/BUCK index 63109da96a1dd..daa2f0268c4b7 100644 --- a/fboss/thrift_cow/nodes/BUCK +++ b/fboss/thrift_cow/nodes/BUCK @@ -25,6 +25,7 @@ cpp_library( ":serializer", "//fatal:fatal", "//folly:conv", + "//thrift/lib/cpp/util:enum_utils", "//thrift/lib/cpp2/reflection:reflection", ], ) diff --git a/fboss/thrift_cow/nodes/NodeUtils.h b/fboss/thrift_cow/nodes/NodeUtils.h index 7114f59d4496f..6f2506c8d5b98 100644 --- a/fboss/thrift_cow/nodes/NodeUtils.h +++ b/fboss/thrift_cow/nodes/NodeUtils.h @@ -6,6 +6,7 @@ #include #include +#include #include namespace facebook::fboss::thrift_cow { @@ -19,7 +20,7 @@ std::optional tryParseKey(const std::string& token) { is_same_v) { // special handling for enum keyed maps KeyT enumKey; - if (fatal::enum_traits::try_parse(enumKey, token)) { + if (apache::thrift::util::tryParseEnum(token, &enumKey)) { return enumKey; } } diff --git a/fboss/thrift_cow/nodes/Serializer.h b/fboss/thrift_cow/nodes/Serializer.h index c837ca2924ff8..d7e344865ec07 100644 --- a/fboss/thrift_cow/nodes/Serializer.h +++ b/fboss/thrift_cow/nodes/Serializer.h @@ -18,6 +18,13 @@ namespace facebook::fboss::thrift_cow { +struct FieldBaseType {}; + +template +using is_field_type = std::is_base_of>; +template +constexpr bool is_field_type_v = is_field_type::value; + namespace detail { template diff --git a/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h b/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h index 542a608358a9f..0229828464d43 100644 --- a/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftHybridNode-inl.h @@ -23,6 +23,7 @@ template struct ThriftHybridNode : public thrift_cow::Serializable { public: using ThriftType = TType; + using TC = TypeClass; using CowType = HybridNodeType; using Self = ThriftHybridNode; using PathIter = typename std::vector::const_iterator; @@ -103,7 +104,10 @@ struct ThriftHybridNode : public thrift_cow::Serializable { #ifdef ENABLE_DYNAMIC_APIS folly::dynamic toFollyDynamic() const { - return folly::toDynamic(this->ref()); + folly::dynamic dyn; + facebook::thrift::to_dynamic( + dyn, this->ref(), facebook::thrift::dynamic_format::JSON_1); + return dyn; } // this would override the underlying thrift object diff --git a/fboss/thrift_cow/nodes/ThriftListNode-inl.h b/fboss/thrift_cow/nodes/ThriftListNode-inl.h index a0c4d294863f8..a7edf06c9292e 100644 --- a/fboss/thrift_cow/nodes/ThriftListNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftListNode-inl.h @@ -35,7 +35,7 @@ struct ExtractValueTypeClass> { } // namespace list_helpers template -struct ThriftListFields { +struct ThriftListFields : public FieldBaseType { using Self = ThriftListFields; using CowType = FieldsType; using ThriftType = TType; diff --git a/fboss/thrift_cow/nodes/ThriftMapNode-inl.h b/fboss/thrift_cow/nodes/ThriftMapNode-inl.h index 20437cc34d0bf..e8739927a0b94 100644 --- a/fboss/thrift_cow/nodes/ThriftMapNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftMapNode-inl.h @@ -41,7 +41,7 @@ struct ExtractTypeClass< } // namespace map_helpers template -struct ThriftMapFields { +struct ThriftMapFields : public FieldBaseType { using TypeClass = typename Traits::TC; using TType = typename Traits::Type; using Self = ThriftMapFields; diff --git a/fboss/thrift_cow/nodes/ThriftSetNode-inl.h b/fboss/thrift_cow/nodes/ThriftSetNode-inl.h index bac718c5dc275..bc724c678de78 100644 --- a/fboss/thrift_cow/nodes/ThriftSetNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftSetNode-inl.h @@ -37,7 +37,7 @@ struct ExtractTypeClass> { } // namespace set_helpers template -struct ThriftSetFields { +struct ThriftSetFields : public FieldBaseType { using Self = ThriftSetFields; using CowType = FieldsType; using ThriftType = TType; diff --git a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h index 4f73e393e8bfa..0add9ffca7fa0 100644 --- a/fboss/thrift_cow/nodes/ThriftStructNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftStructNode-inl.h @@ -154,9 +154,12 @@ struct ChildInvoke { } // namespace struct_helpers -template > -struct ThriftStructFields { - using Self = ThriftStructFields; +template < + typename TType, + typename Derived = ThriftStructResolver, + bool EnableHybridStorage = false> +struct ThriftStructFields : public FieldBaseType { + using Self = ThriftStructFields; using Info = apache::thrift::reflect_struct; using CowType = FieldsType; using ThriftType = TType; @@ -166,7 +169,8 @@ struct ThriftStructFields { using Members = typename Info::members; // Extracting useful common types out of each member via Traits.h - using MemberTypes = fatal::transform>; + using MemberTypes = fatal:: + transform>; // type list of members with SkipThriftCow enabled using MemberTypesWithSkipThriftCow = @@ -178,11 +182,12 @@ struct ThriftStructFields { template constexpr bool isSkipThriftCowEnabled() const { - if constexpr (HasSkipThriftCow::value) { - return true; - } else { - return false; + if constexpr (EnableHybridStorage) { + if constexpr (HasSkipThriftCow::value) { + return true; + } } + return false; } // This is our ultimate storage type, which is effectively a @@ -416,16 +421,21 @@ struct ThriftStructFields { NamedMemberTypes storage_; }; -template > -class ThriftStructNode - : public NodeBaseT< - typename Resolver::type, - ThriftStructFields>, - public thrift_cow::Serializable { +template < + typename TType, + typename Resolver = ThriftStructResolver, + bool EnableHybridStorage = false> +class ThriftStructNode : public NodeBaseT< + typename Resolver::type, + ThriftStructFields< + TType, + typename Resolver::type, + EnableHybridStorage>>, + public thrift_cow::Serializable { public: - using Self = ThriftStructNode; + using Self = ThriftStructNode; using Derived = typename Resolver::type; - using Fields = ThriftStructFields; + using Fields = ThriftStructFields; using ThriftType = typename Fields::ThriftType; using BaseT = NodeBaseT; using CowType = NodeType; diff --git a/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h b/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h index 24440a79a9139..4bcd759c23046 100644 --- a/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h +++ b/fboss/thrift_cow/nodes/ThriftUnionNode-inl.h @@ -216,7 +216,7 @@ struct ThriftUnionStorage { }; template -struct ThriftUnionFields { +struct ThriftUnionFields : public FieldBaseType { using Self = ThriftUnionFields; // reflected union metadata diff --git a/fboss/thrift_cow/nodes/Traits.h b/fboss/thrift_cow/nodes/Traits.h index db08dc59c8157..8bb7493f9df5a 100644 --- a/fboss/thrift_cow/nodes/Traits.h +++ b/fboss/thrift_cow/nodes/Traits.h @@ -16,11 +16,14 @@ namespace facebook::fboss::thrift_cow { -template +template struct ThriftStructResolver { // if resolver is not specialized for given thrift type, default to // ThriftStructNode - using type = ThriftStructNode>; + using type = ThriftStructNode< + TType, + ThriftStructResolver, + EnableHybridStorage>; }; template @@ -65,7 +68,8 @@ struct ConvertToNodeTraits { template struct ConvertToNodeTraits { - using default_type = ThriftStructNode>; + using default_type = + ThriftStructNode, false>; using struct_type = ResolvedType; static_assert( std::is_base_of_v, @@ -166,7 +170,7 @@ struct read_annotation_allow_skip_thrift_cow< fatal_true>::value; }; -template +template struct StructMemberTraits { using member = Member; using traits = StructMemberTraits; @@ -176,7 +180,7 @@ struct StructMemberTraits { // read member annotations using member_annotations = typename Member::annotations; - static constexpr bool allowSkipThriftCow = + static constexpr bool allowSkipThriftCow = EnableHybridStorage && read_annotation_allow_skip_thrift_cow::value; // need to resolve here @@ -185,7 +189,7 @@ struct StructMemberTraits { typename std::shared_ptr>, typename ConvertToNodeTraits::type>; using isChild = std::conditional_t< - read_annotation_allow_skip_thrift_cow::value, + allowSkipThriftCow, std::false_type, typename ConvertToNodeTraits::isChild>; @@ -196,10 +200,10 @@ struct StructMemberTraits { default_type>; }; -template +template struct ExtractStructFields { template - using apply = StructMemberTraits; + using apply = StructMemberTraits; }; template diff --git a/fboss/thrift_cow/nodes/Types.h b/fboss/thrift_cow/nodes/Types.h index bc48beb07a2e0..3bc78023aa88e 100644 --- a/fboss/thrift_cow/nodes/Types.h +++ b/fboss/thrift_cow/nodes/Types.h @@ -97,13 +97,13 @@ struct FieldsType {}; // used to differentiate from COW NodeType struct HybridNodeType {}; -template +template struct ThriftStructFields; template struct ThriftHybridNode; -template +template class ThriftStructNode; template diff --git a/fboss/thrift_cow/nodes/tests/BUCK b/fboss/thrift_cow/nodes/tests/BUCK index 18fec9f2d474b..bcc4c9c834f19 100644 --- a/fboss/thrift_cow/nodes/tests/BUCK +++ b/fboss/thrift_cow/nodes/tests/BUCK @@ -23,6 +23,7 @@ cpp_unittest( "ThriftHybridStructNodeTests.cpp", ], preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + supports_static_listing = False, deps = [ ":test-cpp2-reflection", "//fboss/thrift_cow/nodes:nodes", @@ -46,6 +47,7 @@ cpp_unittest( "ThriftUnionNodeTests.cpp", ], preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + supports_static_listing = False, deps = [ ":test-cpp2-reflection", "//fboss/agent:switch_config-cpp2-reflection", diff --git a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp index 18234eed58e0a..f7fb77b798e33 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftHybridStructNodeTests.cpp @@ -21,90 +21,167 @@ using namespace facebook::fboss; using namespace facebook::fboss::thrift_cow; +using namespace ::testing; using k = test_tags::strings; -template +template struct is_allow_skip_thrift_cow { using annotations = apache::thrift::reflect_struct::annotations; static constexpr bool value = - read_annotation_allow_skip_thrift_cow::value; + read_annotation_allow_skip_thrift_cow::value && + EnableHybridStorage; }; -TEST(ThriftHybridStructNodeTests, ReadThriftStructAnnotation) { -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(is_allow_skip_thrift_cow::value == true); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(is_allow_skip_thrift_cow::value == false); - static_assert(is_allow_skip_thrift_cow::value == false); +struct TestParams { + bool enableHybridStorage; +}; + +template +class ThriftHybridStructNodeTestSuite : public ::testing::Test {}; + +TYPED_TEST_SUITE_P(ThriftHybridStructNodeTestSuite); + +template +void readThriftStructAnnotation() { + static_assert( + is_allow_skip_thrift_cow::value == + false); + static_assert( + is_allow_skip_thrift_cow::value == + false); + static_assert( + is_allow_skip_thrift_cow::value == + EnableHybridStorage); } -TEST(ThriftHybridStructNodeTests, ThriftStructNodeAnnotations) { - ThriftStructFields fields; +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, ReadThriftStructAnnotation) { + readThriftStructAnnotation(); + readThriftStructAnnotation(); +} + +template +void thriftStructNodeAnnotations() { + { + ThriftStructFields< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + fields; -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(fields.isSkipThriftCowEnabled() == true); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - static_assert(fields.isSkipThriftCowEnabled() == false); + static_assert( + fields.template isSkipThriftCowEnabled() == + EnableHybridStorage); + static_assert(fields.template isSkipThriftCowEnabled() == false); + } + { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; - ThriftStructNode node; + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + ASSERT_EQ(node.template isSkipThriftCowEnabled(), false); + } + // annotation that is other than `allow_skip_thrift_cow` + { + ThriftStructNode node; + ASSERT_EQ(node.isSkipThriftCowEnabled(), false); + } +} -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ - ASSERT_EQ(node.isSkipThriftCowEnabled(), false); +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, ThriftStructNodeAnnotations) { + thriftStructNodeAnnotations(); + thriftStructNodeAnnotations(); } -TEST(ThriftHybridStructNodeTests, TestHybridNodeTypes) { - ThriftStructNode node; +template +void testHybridNodeTypes() { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; // cow member - auto val = node.get(); + auto val = node.template get(); using underlying_type = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); // hybrid member -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - auto valHybrid = node.get(); + auto valHybrid = node.template get(); using underlying_type = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); - using ref_type = folly::remove_cvref_tref())>; - static_assert(std::is_same_v>); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ + static_assert( + std::is_same_v< + typename decltype(valHybrid)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type = folly::remove_cvref_tref())>; + static_assert(std::is_same_v>); + } +} + +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeTypes) { + testHybridNodeTypes(); + testHybridNodeTypes(); } -TEST(ThriftHybridStructNodeTests, ThriftStructFieldsHybridMemberGetSet) { - ThriftStructFields fields; +template +void thriftStructFieldsHybridMemberGetSet() { + ThriftStructFields< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + fields; auto data = std::make_shared>(); data->insert({1, false}); data->insert({2, true}); // cow member - fields.set(*data); - auto val = fields.get(); + fields.template set(*data); + auto val = fields.template get(); ASSERT_EQ(val->size(), 2); ASSERT_EQ(val->at(1), false); ASSERT_EQ(val->at(2), true); // hybrid member -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ - fields.set(*data); - auto valHybrid = fields.get(); - ASSERT_EQ(valHybrid->cref().size(), 2); - ASSERT_EQ(valHybrid->cref().at(1), false); - ASSERT_EQ(valHybrid->cref().at(2), true); -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ + fields.template set(*data); + auto valHybrid = fields.template get(); + static_assert( + std::is_same_v< + typename decltype(valHybrid)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + ASSERT_EQ(valHybrid->cref().size(), 2); + ASSERT_EQ(valHybrid->cref().at(1), false); + ASSERT_EQ(valHybrid->cref().at(2), true); + } +} + +TYPED_TEST_P( + ThriftHybridStructNodeTestSuite, + ThriftStructFieldsHybridMemberGetSet) { + thriftStructFieldsHybridMemberGetSet(); + thriftStructFieldsHybridMemberGetSet(); } -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ -TEST(ThriftHybridStructNodeTests, ThriftStructFieldsHybridMemberToFromThrift) { - ThriftStructFields fields; +template +void thriftStructFieldsHybridMemberToFromThrift() { + ThriftStructFields< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + fields; auto data = std::make_shared>(); data->insert({1, false}); data->insert({2, true}); // fromThrift - auto val = fields.get(); + auto val = fields.template get(); val->fromThrift(*data); // toThrift @@ -112,15 +189,27 @@ TEST(ThriftHybridStructNodeTests, ThriftStructFieldsHybridMemberToFromThrift) { ASSERT_EQ(thrift, *data); } -TEST(ThriftHybridStructNodeTests, ThriftStructNodeHybridMemberToFromThrift) { - ThriftStructNode node; +TYPED_TEST_P( + ThriftHybridStructNodeTestSuite, + ThriftStructFieldsHybridMemberToFromThrift) { + thriftStructFieldsHybridMemberToFromThrift(); + thriftStructFieldsHybridMemberToFromThrift(); +} + +template +void thriftStructNodeHybridMemberToFromThrift() { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; auto data = std::make_shared>(); data->insert({1, false}); data->insert({2, true}); // fromThrift - auto val = node.get(); + auto val = node.template get(); val->fromThrift(*data); // toThrift @@ -128,46 +217,109 @@ TEST(ThriftHybridStructNodeTests, ThriftStructNodeHybridMemberToFromThrift) { ASSERT_EQ(thrift, *data); } -TEST(ThriftHybridStructNodeTests, TestHybridNodeMemberTypes) { - ThriftStructNode node; +TYPED_TEST_P( + ThriftHybridStructNodeTestSuite, + ThriftStructNodeHybridMemberToFromThrift) { + thriftStructNodeHybridMemberToFromThrift(); + thriftStructNodeHybridMemberToFromThrift(); +} + +template +void testHybridNodeMemberTypes() { + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage> + node; // list - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_list = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_list = node.template get(); using underlying_type_l = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); - using ref_type_l = folly::remove_cvref_tref())>; - static_assert(std::is_same_v>); + static_assert( + std::is_same_v< + typename decltype(v_list)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_l = folly::remove_cvref_tref())>; + static_assert(std::is_same_v>); + } // set - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_set = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_set = node.template get(); using underlying_type_s = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v>); - using ref_type_s = folly::remove_cvref_tref())>; - static_assert(std::is_same_v>); + static_assert( + std::is_same_v< + typename decltype(v_set)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_s = folly::remove_cvref_tref())>; + static_assert(std::is_same_v>); + } // union - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_union = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_union = node.template get(); using underlying_type_u = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v); - using ref_type_u = folly::remove_cvref_tref())>; - static_assert(std::is_same_v); - + static_assert( + std::is_same_v< + typename decltype(v_union)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_u = folly::remove_cvref_tref())>; + static_assert(std::is_same_v); + } // child struct - ASSERT_EQ(node.isSkipThriftCowEnabled(), true); - auto v_struct = node.get(); + ASSERT_EQ( + node.template isSkipThriftCowEnabled(), + EnableHybridStorage); + auto v_struct = node.template get(); using underlying_type_c = folly::remove_cvref_t::ThriftType; static_assert(std::is_same_v); - using ref_type_c = folly::remove_cvref_tref())>; - static_assert(std::is_same_v); + static_assert( + std::is_same_v< + typename decltype(v_struct)::element_type::CowType, + HybridNodeType> == EnableHybridStorage); + if constexpr (EnableHybridStorage) { + using ref_type_c = folly::remove_cvref_tref())>; + static_assert(std::is_same_v); + } } -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ +TYPED_TEST_P(ThriftHybridStructNodeTestSuite, TestHybridNodeMemberTypes) { + testHybridNodeMemberTypes(); + testHybridNodeMemberTypes(); +} + +using EnableHybridStorageTypes = testing::Types; + +REGISTER_TYPED_TEST_SUITE_P( + ThriftHybridStructNodeTestSuite, + ReadThriftStructAnnotation, + ThriftStructNodeAnnotations, + TestHybridNodeTypes, + ThriftStructFieldsHybridMemberGetSet, + ThriftStructFieldsHybridMemberToFromThrift, + ThriftStructNodeHybridMemberToFromThrift, + TestHybridNodeMemberTypes); + +INSTANTIATE_TYPED_TEST_SUITE_P( + ThriftHybridStructNodeTests, + ThriftHybridStructNodeTestSuite, + EnableHybridStorageTypes); #ifdef ENABLE_DYNAMIC_APIS TEST(ThriftHybridStructNodeTests, FollyDynamicTest) { diff --git a/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp b/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp index 75dcf91621e5a..8275154000f12 100644 --- a/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp +++ b/fboss/thrift_cow/nodes/tests/ThriftStructNodeTests.cpp @@ -228,7 +228,15 @@ TEST(ThriftStructNodeTests, ThriftStructNodeVisit) { ThriftStructNode node(data); folly::dynamic out; - auto f = [&out](auto& node) { out = node.toFollyDynamic(); }; + auto f = [&out](auto& node) { + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + out = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } + }; std::vector path = {"inlineBool"}; auto result = visitPath(node, path.begin(), path.end(), f); @@ -263,8 +271,24 @@ TEST(ThriftStructNodeTests, ThriftStructNodeVisitMutable) { ThriftStructNode node(data); folly::dynamic toWrite, out; - auto write = [&toWrite](auto& node) { node.fromFollyDynamic(toWrite); }; - auto read = [&out](auto& node) { out = node.toFollyDynamic(); }; + auto write = [&toWrite](auto& node) { + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + node.fromFollyDynamic(toWrite); + } else { + FAIL() << "unexpected non-cow visit"; + } + }; + auto read = [&out](auto& node) { + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + out = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } + }; std::vector path = {"inlineBool"}; toWrite = false; @@ -312,7 +336,14 @@ TEST(ThriftStructNodeTests, ThriftStructNodeClone) { ASSERT_TRUE(newNode->template cref()->isPublished()); } -TEST(ThriftStructNodeTests, ThriftStructNodeModify) { +template +class ThriftStructNodeTestSuite : public ::testing::Test {}; + +TYPED_TEST_SUITE_P(ThriftStructNodeTestSuite); + +// no annotation +template +void thriftStructNodeModify() { auto portRange = buildPortRange(100, 999); TestStruct data; @@ -321,36 +352,78 @@ TEST(ThriftStructNodeTests, ThriftStructNodeModify) { data.inlineString() = "HelloThere"; data.inlineStruct() = std::move(portRange); - auto node = std::make_shared>(data); - + auto node = std::make_shared, + EnableHybridStorage>>(data); + static_assert(!std::is_same_v< + typename decltype(node)::element_type::CowType, + HybridNodeType>); ASSERT_FALSE(node->isPublished()); - ASSERT_FALSE(node->template cref()->isPublished()); + if constexpr (!EnableHybridStorage) { + ASSERT_FALSE(node->template cref()->isPublished()); + } node->publish(); - ASSERT_TRUE(node->isPublished()); - ASSERT_TRUE(node->template cref()->isPublished()); + if constexpr (!EnableHybridStorage) { + ASSERT_TRUE(node->template cref()->isPublished()); + } - ThriftStructNode::modify(&node, "inlineStruct"); - ASSERT_FALSE(node->isPublished()); - ASSERT_FALSE(node->template cref()->isPublished()); + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::modify(&node, "inlineStruct"); + + static_assert(!std::is_same_v< + typename decltype(node->template get< + k::inlineStruct>())::element_type::CowType, + HybridNodeType>); + + if constexpr (!EnableHybridStorage) { + ASSERT_FALSE(node->isPublished()); + ASSERT_FALSE(node->template cref()->isPublished()); + } // now try modifying a missing optional field ASSERT_FALSE(node->template isSet()); - ThriftStructNode::modify(&node, "optionalString"); + ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::modify(&node, "optionalString"); ASSERT_TRUE(node->template isSet()); - node = std::make_shared>(data); + static_assert(!std::is_same_v< + typename folly::remove_cvref_t< + decltype(node->template get() + .value())>::CowType, + HybridNodeType>); + + node = std::make_shared, + EnableHybridStorage>>(data); node->publish(); - auto& inLineBool = ThriftStructNode::modify(&node); + auto& inLineBool = ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::template modify(&node); EXPECT_FALSE(node->isPublished()); inLineBool->set(false); - auto& optionalStruct1 = - ThriftStructNode::modify(&node); + auto& optionalStruct1 = ThriftStructNode< + TestStruct, + ThriftStructResolver, + EnableHybridStorage>::template modify(&node); EXPECT_FALSE(optionalStruct1->isPublished()); optionalStruct1->fromThrift(buildPortRange(1, 10)); + static_assert(!std::is_same_v< + typename folly::remove_cvref_t< + decltype(node->template get())>:: + element_type::CowType, + HybridNodeType>); + node->publish(); EXPECT_TRUE(node->isPublished()); @@ -359,7 +432,7 @@ TEST(ThriftStructNodeTests, ThriftStructNodeModify) { EXPECT_TRUE(obj1.optionalStruct().has_value()); EXPECT_EQ(obj1.optionalStruct().value(), buildPortRange(1, 10)); - auto& optionalStruct2 = node->modify(&node); + auto& optionalStruct2 = node->template modify(&node); optionalStruct2.reset(); node->publish(); @@ -367,6 +440,22 @@ TEST(ThriftStructNodeTests, ThriftStructNodeModify) { EXPECT_FALSE(obj2.optionalStruct().has_value()); } +TYPED_TEST_P(ThriftStructNodeTestSuite, ThriftStructNodeModify) { + // non-annotated fields + thriftStructNodeModify(); + thriftStructNodeModify(); + // TODO: annotated fields +} + +using EnableHybridStorageTypes = testing::Types; + +REGISTER_TYPED_TEST_SUITE_P(ThriftStructNodeTestSuite, ThriftStructNodeModify); + +INSTANTIATE_TYPED_TEST_SUITE_P( + ThriftStructNodeTest, + ThriftStructNodeTestSuite, + EnableHybridStorageTypes); + TEST(ThriftStructNodeTests, ThriftStructNodeRemove) { auto portRange = buildPortRange(100, 999); diff --git a/fboss/thrift_cow/nodes/tests/test.thrift b/fboss/thrift_cow/nodes/tests/test.thrift index 539729ae1b1da..ad2e9448151e3 100644 --- a/fboss/thrift_cow/nodes/tests/test.thrift +++ b/fboss/thrift_cow/nodes/tests/test.thrift @@ -62,15 +62,25 @@ struct TestStruct { 24: map mapA; 25: map mapB; 26: map cowMap; - 27: map hybridMap; // (allow_skip_thrift_cow = true); - 28: list hybridList; // (allow_skip_thrift_cow = true); - 29: set hybridSet; // (allow_skip_thrift_cow = true); - 30: TestUnion hybridUnion; // (allow_skip_thrift_cow = true); - 31: ChildStruct hybridStruct; // (allow_skip_thrift_cow = true); -} // (allow_skip_thrift_cow = true) + 27: map hybridMap (allow_skip_thrift_cow = true); + 28: list hybridList (allow_skip_thrift_cow = true); + 29: set hybridSet (allow_skip_thrift_cow = true); + 30: TestUnion hybridUnion (allow_skip_thrift_cow = true); + 31: ChildStruct hybridStruct (allow_skip_thrift_cow = true); + 32: map hybridMapOfI32ToStruct ( + allow_skip_thrift_cow = true, + ); + 33: map> hybridMapOfMap (allow_skip_thrift_cow = true); +} struct ParentTestStruct { 1: TestStruct childStruct; } (random_annotation) -struct TestStruct2 {} (deprecated, allow_skip_thrift_cow = false) +struct TestStruct2 { + 10: i32 deprecatedField (deprecated); +} (deprecated, allow_skip_thrift_cow = false) + +struct TestStruct3 { + 1: i32 inlineInt; +} (allow_skip_thrift_cow) diff --git a/fboss/thrift_cow/storage/tests/CowStorageTests.cpp b/fboss/thrift_cow/storage/tests/CowStorageTests.cpp index 2e841cb9759b3..483577fcb8d40 100644 --- a/fboss/thrift_cow/storage/tests/CowStorageTests.cpp +++ b/fboss/thrift_cow/storage/tests/CowStorageTests.cpp @@ -15,6 +15,7 @@ #include "fboss/fsdb/tests/gen-cpp2/thriftpath_test_types.h" using folly::dynamic; +using namespace testing; namespace { @@ -56,8 +57,8 @@ template struct IsPublishable()->publish())>> : std::true_type {}; -template -void publishAllNodes(CowStorage& storage) { +template +void publishAllNodes(CowStorage& storage) { using namespace facebook::fboss::thrift_cow; auto root = storage.root(); RootRecurseVisitor::visit( @@ -80,14 +81,40 @@ OperDeltaUnit createEmptyDeltaUnit(std::vector path) { } // namespace -TEST(CowStorageTests, GetThrift) { +template +struct TestParams { + static constexpr auto hybridStorage = EnableHybridStorage; +}; + +using StorageTestTypes = ::testing::Types, TestParams>; + +template +class CowStorageTests : public ::testing::Test { + public: + auto initStorage(auto val) { + auto constexpr isHybridStorage = TestParams::hybridStorage; + using RootType = std::remove_cvref_t; + return CowStorage< + RootType, + facebook::fboss::thrift_cow::ThriftStructNode< + RootType, + facebook::fboss::thrift_cow:: + ThriftStructResolver, + isHybridStorage>>(val); + } +}; + +TYPED_TEST_SUITE(CowStorageTests, StorageTestTypes); + +TYPED_TEST(CowStorageTests, GetThrift) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -97,14 +124,14 @@ TEST(CowStorageTests, GetThrift) { EXPECT_EQ(storage.get(root).value(), testStruct); } -TEST(CowStorageTests, GetEncoded) { +TYPED_TEST(CowStorageTests, GetEncoded) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); auto result = storage.get_encoded(root.tx(), OperProtocol::SIMPLE_JSON); EXPECT_EQ( @@ -138,14 +165,14 @@ TEST(CowStorageTests, GetEncoded) { OperProtocol::SIMPLE_JSON, testStruct)); } -TEST(CowStorageTests, GetEncodedMetadata) { +TYPED_TEST(CowStorageTests, GetEncodedMetadata) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); auto result = storage.get_encoded(root.tx(), OperProtocol::SIMPLE_JSON); EXPECT_FALSE(result.hasError()); @@ -184,14 +211,14 @@ TEST(CowStorageTests, GetEncodedMetadata) { OperProtocol::SIMPLE_JSON, testStruct2)); } -TEST(CowStorageTests, SetThrift) { +TYPED_TEST(CowStorageTests, SetThrift) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -218,14 +245,14 @@ TEST(CowStorageTests, SetThrift) { EXPECT_EQ(storage.get(root.structMap()[3]).value(), newStructMapMember); } -TEST(CowStorageTests, AddDynamic) { +TYPED_TEST(CowStorageTests, AddDynamic) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -234,7 +261,7 @@ TEST(CowStorageTests, AddDynamic) { storage.get(root.structMap()[3]).value(), testStruct.structMap()->at(3)); } -TEST(CowStorageTests, RemoveThrift) { +TYPED_TEST(CowStorageTests, RemoveThrift) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; @@ -253,7 +280,7 @@ TEST(CowStorageTests, RemoveThrift) { (*testStruct.structMap())[2] = member2; (*testStruct.structList()) = {member2, member1, member1}; - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); EXPECT_EQ(storage.get(root.tx()).value(), true); EXPECT_EQ(storage.get(root.rx()).value(), false); @@ -288,7 +315,7 @@ TEST(CowStorageTests, RemoveThrift) { storage.get(root.structList()[5]).error(), StorageError::INVALID_PATH); } -TEST(CowStorageTests, PatchDelta) { +TYPED_TEST(CowStorageTests, PatchDelta) { using namespace facebook::fboss::fsdb; using namespace apache::thrift::type_class; @@ -296,7 +323,7 @@ TEST(CowStorageTests, PatchDelta) { auto testStruct = facebook::thrift::from_dynamic( createTestDynamic(), facebook::thrift::dynamic_format::JSON_1); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); // publish to ensure we can patch published storage storage.publish(); @@ -354,10 +381,10 @@ TEST(CowStorageTests, PatchDelta) { EXPECT_EQ(storage.get(root.enumMap()[TestEnum::FIRST].min()).value(), 2001); } -TEST(CowStorageTests, EncodedExtendedAccessFieldSimple) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessFieldSimple) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -372,10 +399,10 @@ TEST(CowStorageTests, EncodedExtendedAccessFieldSimple) { OperProtocol::SIMPLE_JSON, true)); } -TEST(CowStorageTests, EncodedExtendedAccessFieldInContainer) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessFieldInContainer) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -390,10 +417,10 @@ TEST(CowStorageTests, EncodedExtendedAccessFieldInContainer) { EXPECT_EQ(*got.max(), 200); } -TEST(CowStorageTests, EncodedExtendedAccessRegexMap) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessRegexMap) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -426,10 +453,10 @@ TEST(CowStorageTests, EncodedExtendedAccessRegexMap) { } } -TEST(CowStorageTests, EncodedExtendedAccessAnyMap) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessAnyMap) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -471,10 +498,10 @@ TEST(CowStorageTests, EncodedExtendedAccessAnyMap) { } } -TEST(CowStorageTests, EncodedExtendedAccessRegexList) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessRegexList) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -506,10 +533,10 @@ TEST(CowStorageTests, EncodedExtendedAccessRegexList) { } } -TEST(CowStorageTests, EncodedExtendedAccessAnyList) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessAnyList) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -542,10 +569,10 @@ TEST(CowStorageTests, EncodedExtendedAccessAnyList) { } } -TEST(CowStorageTests, EncodedExtendedAccessRegexSet) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessRegexSet) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -578,10 +605,10 @@ TEST(CowStorageTests, EncodedExtendedAccessRegexSet) { } } -TEST(CowStorageTests, EncodedExtendedAccessAnySet) { +TYPED_TEST(CowStorageTests, EncodedExtendedAccessAnySet) { auto testStruct = createTestStructForExtendedTests(); - auto storage = CowStorage(testStruct); + auto storage = this->initStorage(testStruct); storage.publish(); EXPECT_TRUE(storage.isPublished()); @@ -614,12 +641,12 @@ TEST(CowStorageTests, EncodedExtendedAccessAnySet) { } } -TEST(CowStorageTests, PatchRoot) { +TYPED_TEST(CowStorageTests, PatchRoot) { using namespace facebook::fboss::fsdb; using namespace facebook::fboss::thrift_cow; auto testStructA = createTestStruct(); - auto storage = CowStorage(testStructA); + auto storage = this->initStorage(testStructA); // In FSDB we only publish root, but just to test PatchApplier functionality, // publish all nodes and make sure we modify itermediate nodes properly publishAllNodes(storage); @@ -648,7 +675,7 @@ TEST(CowStorageTests, PatchRoot) { EXPECT_EQ(storage.root()->toThrift(), testStructB); // reset storage and patch just the one member - storage = CowStorage(testStructA); + storage = this->initStorage(testStructA); publishAllNodes(storage); auto memberNodeA = std::make_shared>( @@ -664,14 +691,15 @@ TEST(CowStorageTests, PatchRoot) { storage.patch(std::move(patch)); using k = thriftpath_test_tags::strings; EXPECT_EQ( - storage.root()->ref()->toThrift(), *testStructB.member()); + storage.root()->template ref()->toThrift(), + *testStructB.member()); } -TEST(SubscribableStorageTests, PatchInvalidDeltaPath) { +TYPED_TEST(CowStorageTests, PatchInvalidDeltaPath) { using namespace facebook::fboss::fsdb; auto testStructA = createTestStruct(); - auto storage = CowStorage(testStructA); + auto storage = this->initStorage(testStructA); OperDelta delta; OperDeltaUnit unit; @@ -689,13 +717,13 @@ TEST(SubscribableStorageTests, PatchInvalidDeltaPath) { EXPECT_EQ(storage.patch(delta), StorageError::INVALID_PATH); } -TEST(CowStorageTests, PatchEmptyDeltaNonexistentPath) { +TYPED_TEST(CowStorageTests, PatchEmptyDeltaNonexistentPath) { using namespace facebook::fboss::fsdb; thriftpath::RootThriftPath root; auto testStructA = createTestStruct(); - auto storage = CowStorage(testStructA); + auto storage = this->initStorage(testStructA); EXPECT_EQ(storage.get(root.mapOfStructs())->size(), 0); EXPECT_EQ(storage.get(root.listofStructs())->size(), 0); diff --git a/fboss/thrift_cow/visitors/DeltaVisitor.h b/fboss/thrift_cow/visitors/DeltaVisitor.h index b84059ac87f0a..9e8d161a10ea3 100644 --- a/fboss/thrift_cow/visitors/DeltaVisitor.h +++ b/fboss/thrift_cow/visitors/DeltaVisitor.h @@ -19,6 +19,8 @@ namespace facebook::fboss::thrift_cow { +struct HybridNodeType; + /* * This visitor takes two ThriftCow objects, finds changed paths and * then runs the provided function against any paths that differ @@ -265,6 +267,29 @@ void visitAddedOrRemovedNode( } } +template +void visitAddedOrRemovedNode( + TraverseHelper& traverser, + const std::shared_ptr& oldNode, + const std::shared_ptr& newNode, + const DeltaVisitOptions& options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v) +{ + if (!options.recurseIntoHybridNodes) { + invokeVisitorFnHelper( + traverser, + oldNode, + newNode, + DeltaElemTag::MINIMAL, + std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode not implemented")); + } +} + template void visitAddedOrRemovedNode( TraverseHelper& traverser, @@ -355,6 +380,54 @@ struct DeltaVisitor> { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Set not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + std::set_symmetric_difference( + oldRef.begin(), + oldRef.end(), + newRef.begin(), + newRef.end(), + boost::make_function_output_iterator([&](const auto& val) { + if (!val) { + // shouldn't happen... + return; + } + if (oldRef.count(val) && newRef.count(val)) { + return; + } + + hasDifferences = true; + })); + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -433,6 +506,52 @@ struct DeltaVisitor> { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for List not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + + int minSize = std::min(oldRef.size(), newRef.size()); + + if (oldRef.size() != newRef.size()) { // entries added or removed + hasDifferences = true; + } else { + for (int i = 0; i < minSize; ++i) { + const auto& oldElem = oldRef.at(i); + const auto& newElem = newRef.at(i); + if (oldElem != newElem) { + hasDifferences = true; + } + } + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -500,6 +619,53 @@ struct DeltaVisitor< return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for Fields types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Map not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + // changed entries + for (const auto& [key, val] : oldRef) { + auto it = newRef.find(key); + if (it == newRef.end()) { + hasDifferences = true; + } else if (val != it->second) { + hasDifferences = true; + } + } + + for (const auto& [key, val] : newRef) { + if (oldRef.find(key) == oldRef.end()) { + hasDifferences = true; + } + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -617,6 +783,41 @@ struct DeltaVisitor { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for Fields types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Variant not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + if (oldRef != newRef) { + hasDifferences = true; + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** @@ -700,6 +901,41 @@ struct DeltaVisitor { return hasDifferences; } + + template + static bool visit( + TraverseHelper& traverser, + const std::shared_ptr& oldFields, + const std::shared_ptr& newFields, + const DeltaVisitOptions& options, + Func&& f) + // only enable for Fields types + requires(std::is_same_v) + { + if (options.recurseIntoHybridNodes) { + throw std::runtime_error(folly::to( + "DeltaVisitor support for recurseIntoHybridNode for Struct not implemented")); + } + bool hasDifferences{false}; + // if both old and new are non-null, compare contents + if ((oldFields != newFields) && + (static_cast(oldFields) && static_cast(newFields))) { + const auto& oldRef = oldFields->ref(); + const auto& newRef = newFields->ref(); + if (oldRef != newRef) { + hasDifferences = true; + } + } + if (hasDifferences) { + dv_detail::invokeVisitorFnHelper( + traverser, + oldFields, + newFields, + DeltaElemTag::MINIMAL, + std::forward(f)); + } + return hasDifferences; + } }; /** diff --git a/fboss/thrift_cow/visitors/ExtendedPathVisitor.h b/fboss/thrift_cow/visitors/ExtendedPathVisitor.h index be0e49961c6e8..64c07bc9427e8 100644 --- a/fboss/thrift_cow/visitors/ExtendedPathVisitor.h +++ b/fboss/thrift_cow/visitors/ExtendedPathVisitor.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -87,7 +88,7 @@ std::optional matchingEnumToken( const Enum& e, const fsdb::OperPathElem& elem) { // TODO: should we allow regex/raw matching by int value? - auto enumName = fatal::enum_traits::to_string(e); + auto enumName = apache::thrift::util::enumName(e); if (matchesStrToken(enumName, elem)) { return enumName; } diff --git a/fboss/thrift_cow/visitors/PatchApplier.h b/fboss/thrift_cow/visitors/PatchApplier.h index 090f4f2fc35a4..aba38a7ab6b28 100644 --- a/fboss/thrift_cow/visitors/PatchApplier.h +++ b/fboss/thrift_cow/visitors/PatchApplier.h @@ -20,6 +20,7 @@ struct PatchApplier; struct NodeType; struct FieldsType; +struct HybridNodeType; namespace pa_detail { @@ -75,7 +76,26 @@ struct PatchApplier< Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -159,7 +179,26 @@ struct PatchApplier> { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -248,7 +287,26 @@ struct PatchApplier> { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -314,7 +372,26 @@ struct PatchApplier { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -416,7 +493,26 @@ struct PatchApplier { Node& node, PatchNode&& patch, const fsdb::OperProtocol& protocol, - PatchTraverser& traverser) { + PatchTraverser& traverser) + requires( + is_cow_type_v && + std::is_same_v) + { + auto& underlying = node.ref(); + return PatchApplier::apply( + underlying, std::move(patch), protocol, traverser); + } + + template + static PatchApplyResult apply( + Node& node, + PatchNode&& patch, + const fsdb::OperProtocol& protocol, + PatchTraverser& traverser) + requires( + !is_cow_type_v || + !std::is_same_v) + { if (patch.getType() == PatchNode::Type::val) { return pa_detail::patchNode(node, patch.move_val(), protocol); } @@ -459,8 +555,16 @@ struct PatchApplier { } auto& child = node.template modify(); - result = - PatchApplier::apply(*child, std::move(childPatch), protocol); + + if constexpr (Fields::template HasSkipThriftCow::value) { + auto& underlying = child->ref(); + result = PatchApplier::apply( + underlying, std::move(childPatch), protocol); + return; + } else { + result = PatchApplier::apply( + *child, std::move(childPatch), protocol); + } }); return result; } diff --git a/fboss/thrift_cow/visitors/PathVisitor.h b/fboss/thrift_cow/visitors/PathVisitor.h index fb04857aa7348..fef29a4d7c8ad 100644 --- a/fboss/thrift_cow/visitors/PathVisitor.h +++ b/fboss/thrift_cow/visitors/PathVisitor.h @@ -18,6 +18,8 @@ namespace facebook::fboss::thrift_cow { struct HybridNodeType; +struct NodeType; +struct FieldsType; namespace pv_detail { using PathIter = typename std::vector::const_iterator; @@ -29,11 +31,43 @@ using PathIter = typename std::vector::const_iterator; // instantiations class BasePathVisitorOperator { public: + template + class SerializableReader : public Serializable { + public: + explicit SerializableReader(TType& node) : node_(node) {} + + folly::IOBuf encodeBuf(fsdb::OperProtocol proto) const override { + folly::IOBufQueue queue; + switch (proto) { + case fsdb::OperProtocol::BINARY: + apache::thrift::BinarySerializer::serialize(node_, &queue); + break; + case fsdb::OperProtocol::COMPACT: + apache::thrift::CompactSerializer::serialize(node_, &queue); + break; + case fsdb::OperProtocol::SIMPLE_JSON: + apache::thrift::SimpleJSONSerializer::serialize(node_, &queue); + break; + default: + throw std::runtime_error(folly::to( + "Unknown protocol: ", static_cast(proto))); + } + return queue.moveAsValue(); + } + + void fromEncodedBuf(fsdb::OperProtocol, folly::IOBuf&&) override {} + + private: + TType& node_; + }; + virtual ~BasePathVisitorOperator() = default; template inline void - visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) { + visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(is_cow_type_v) + { if constexpr (std::is_const_v) { cvisit(node, begin, end); cvisit(node); @@ -43,6 +77,25 @@ class BasePathVisitorOperator { } } + template + inline void + visitTyped(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(!is_cow_type_v) + { + // supporting only read-only visitation + CHECK(visitReadOnly_); + + // Node is not a Serializable, dispatch with wrapper + SerializableReader wrapper(node); + if constexpr (std::is_const_v) { + cvisit(wrapper, begin, end); + cvisit(wrapper); + } else { + visit(wrapper, begin, end); + visit(wrapper); + } + } + protected: virtual void visit( Serializable& /* node */, @@ -57,6 +110,8 @@ class BasePathVisitorOperator { pv_detail::PathIter /* end */) {} virtual void cvisit(const Serializable& node) {} + + bool visitReadOnly_ = true; }; struct GetEncodedPathVisitorOperator : public BasePathVisitorOperator { @@ -82,7 +137,9 @@ struct SetEncodedPathVisitorOperator : public BasePathVisitorOperator { SetEncodedPathVisitorOperator( fsdb::OperProtocol protocol, const folly::fbstring& val) - : protocol_(protocol), val_(val) {} + : protocol_(protocol), val_(val) { + visitReadOnly_ = false; + } protected: void visit(facebook::fboss::thrift_cow::Serializable& node) override { @@ -122,9 +179,6 @@ enum class ThriftTraverseResult { * This allows a visitor to use the remaining path tokens if needed. */ -struct NodeType; -struct FieldsType; - enum class PathVisitMode { /* * In this mode, we visit every node along a given path. @@ -247,7 +301,9 @@ struct PathVisitorImpl> { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using ValueTType = typename Fields::ValueTType; @@ -311,7 +367,9 @@ struct PathVisitorImpl> { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { // Parse and pop token. Also check for index bound auto index = folly::tryTo(*begin++); @@ -351,6 +409,39 @@ struct PathVisitorImpl< return pv_detail::visitNode(node, begin, end, mode, op); } + template + static inline ThriftTraverseResult visit( + Obj& tObj, + pv_detail::PathIter begin, + pv_detail::PathIter end, + const PathVisitMode& mode, + Op& op) + requires(!is_cow_type_v && !is_field_type_v) + { + try { + if (mode == PathVisitMode::FULL || begin == end) { + op.visitTyped(tObj, begin, end); + if (begin == end) { + return ThriftTraverseResult::OK; + } + } + // get the value based on the key + using KeyT = typename folly::remove_cvref_t::key_type; + // Get key + auto token = *begin++; + auto key = folly::tryTo(token); + if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { + return ThriftTraverseResult::INVALID_MAP_KEY; + } + return PathVisitorImpl::visit( + tObj.at(*key), begin, end, mode, op); + + } catch (const std::exception& ex) { + XLOG(ERR) << "Exception while traversing path: " << ex.what(); + return ThriftTraverseResult::VISITOR_EXCEPTION; + } + } + template static ThriftTraverseResult visit( Node& node, @@ -362,13 +453,23 @@ struct PathVisitorImpl< requires(std::is_same_v) { try { - if (begin == end) { + if (mode == PathVisitMode::FULL || begin == end) { op.visitTyped(node, begin, end); - } else { - // TODO: handle traversing thrift objects in hybrid nodes - return ThriftTraverseResult::VISITOR_EXCEPTION; + if (begin == end) { + return ThriftTraverseResult::OK; + } } - return ThriftTraverseResult::OK; + // get the value based on the key + auto& tObj = node.ref(); + using KeyT = typename folly::remove_cvref_t::key_type; + // Get key + auto token = *begin++; + auto key = folly::tryTo(token); + if (!key.hasValue() || tObj.find(key.value()) == tObj.end()) { + return ThriftTraverseResult::INVALID_MAP_KEY; + } + return PathVisitorImpl::visit( + tObj.at(*key), begin, end, mode, op); } catch (const std::exception& ex) { XLOG(ERR) << "Exception while traversing path: " << ex.what(); return ThriftTraverseResult::VISITOR_EXCEPTION; @@ -383,7 +484,9 @@ struct PathVisitorImpl< const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using key_type = typename Fields::key_type; @@ -452,7 +555,9 @@ struct PathVisitorImpl { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using MemberTypes = typename Fields::MemberTypes; @@ -521,6 +626,28 @@ struct PathVisitorImpl { return ThriftTraverseResult::VISITOR_EXCEPTION; } + template + static inline ThriftTraverseResult visit( + Obj& tObj, + pv_detail::PathIter begin, + pv_detail::PathIter end, + const PathVisitMode& mode, + Op& op) + requires(!is_cow_type_v && !is_field_type_v) + { + try { + if (begin == end) { + op.visitTyped(tObj, begin, end); + } else { + throw std::runtime_error("not implemented yet"); + } + return ThriftTraverseResult::OK; + } catch (const std::exception& ex) { + XLOG(ERR) << "Exception while traversing path: " << ex.what(); + return ThriftTraverseResult::VISITOR_EXCEPTION; + } + } + template static ThriftTraverseResult visit( Fields& fields, @@ -529,7 +656,9 @@ struct PathVisitorImpl { const PathVisitMode& mode, Op& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { using Members = typename Fields::Members; @@ -653,7 +782,9 @@ struct PathVisitor { const PathVisitMode& mode, pv_detail::LambdaPathVisitorOperator& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { return pv_detail::PathVisitorImpl::visit(fields, begin, end, mode, op); } @@ -666,7 +797,9 @@ struct PathVisitor { const PathVisitMode& mode, BasePathVisitorOperator& op) // only enable for Fields types - requires(std::is_same_v) + requires( + is_field_type_v && + std::is_same_v) { return pv_detail::PathVisitorImpl::visit(fields, begin, end, mode, op); } diff --git a/fboss/thrift_cow/visitors/RecurseVisitor.h b/fboss/thrift_cow/visitors/RecurseVisitor.h index 43d6190e205f1..c88bb565b3488 100644 --- a/fboss/thrift_cow/visitors/RecurseVisitor.h +++ b/fboss/thrift_cow/visitors/RecurseVisitor.h @@ -15,6 +15,8 @@ namespace facebook::fboss::thrift_cow { +struct HybridNodeType; + enum class RecurseVisitMode { /* * In this mode, we visit every path in the tree, including @@ -147,6 +149,25 @@ struct RecurseVisitor> { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Set not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -187,6 +208,25 @@ struct RecurseVisitor> { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in List not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -227,6 +267,25 @@ struct RecurseVisitor< traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Map not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -275,6 +334,25 @@ struct RecurseVisitor { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Variant not implemented")); + } + } + template static void visit( TraverseHelper& traverser, @@ -348,6 +426,25 @@ struct RecurseVisitor { traverser, node, options, std::forward(f)); } + template + static void visit( + TraverseHelper& traverser, + NodePtr& node, + RecurseVisitOptions options, + Func&& f) + // only enable for HybridNode types + requires(std::is_same_v< + typename folly::remove_cvref_t::element_type::CowType, + HybridNodeType>) + { + if (!options.recurseIntoHybridNodes) { + rv_detail::invokeVisitorFnHelper(traverser, node, std::forward(f)); + } else { + throw std::runtime_error(folly::to( + "RecurseVisitor support for recurseIntoHybridNode in Struct not implemented")); + } + } + template static void visit( TraverseHelper& traverser, diff --git a/fboss/thrift_cow/visitors/tests/BUCK b/fboss/thrift_cow/visitors/tests/BUCK index 80efd055362e9..3426e108e0fe0 100644 --- a/fboss/thrift_cow/visitors/tests/BUCK +++ b/fboss/thrift_cow/visitors/tests/BUCK @@ -25,9 +25,7 @@ cpp_unittest( srcs = [ "PathVisitorTests.cpp", ], - preprocessor_flags = [ - "-DENABLE_DYNAMIC_APIS", - ], + preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], deps = [ "fbsource//third-party/googletest:gmock", ":visitor_test_utils", @@ -107,7 +105,9 @@ cpp_unittest( "PatchBuildApplyTests.cpp", "PatchBuilderTests.cpp", ], - preprocessor_flags = ["-DENABLE_DYNAMIC_APIS"], + preprocessor_flags = [ + "-DENABLE_DYNAMIC_APIS", + ], deps = [ ":visitor_test_utils", "//fboss/agent:switch_config-cpp2-reflection", diff --git a/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp index 3898af2e6bd8a..5d7e69751ce4f 100644 --- a/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/DeltaVisitorTests.cpp @@ -13,6 +13,7 @@ #include "fboss/thrift_cow/nodes/tests/gen-cpp2/test_fatal_types.h" using folly::dynamic; +using namespace testing; namespace { using namespace facebook::fboss; @@ -22,13 +23,34 @@ using PathTagSet = std::set>; namespace facebook::fboss::thrift_cow::test { -TEST(DeltaVisitorTests, ChangeOneField) { +template +struct TestParams { + static constexpr auto hybridStorage = EnableHybridStorage; +}; + +using StorageTestTypes = ::testing::Types, TestParams>; + +template +class DeltaVisitorTests : public ::testing::Test { + public: + auto initNode(auto val) { + using RootType = std::remove_cvref_t; + return std::make_shared, + TestParams::hybridStorage>>(val); + } +}; + +TYPED_TEST_SUITE(DeltaVisitorTests, StorageTestTypes); + +TYPED_TEST(DeltaVisitorTests, ChangeOneField) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.inlineInt() = false; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -88,13 +110,13 @@ TEST(DeltaVisitorTests, ChangeOneField) { std::make_pair("/inlineInt", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, ChangeOneFieldInContainer) { +TYPED_TEST(DeltaVisitorTests, ChangeOneFieldInContainer) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.mapOfEnumToStruct()->at(TestEnum::THIRD).min() = 11; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -126,13 +148,13 @@ TEST(DeltaVisitorTests, ChangeOneFieldInContainer) { std::make_pair("/mapOfEnumToStruct/3/min", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, SetOptional) { +TYPED_TEST(DeltaVisitorTests, SetOptional) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.optionalString() = "now I'm set"; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -175,7 +197,7 @@ TEST(DeltaVisitorTests, SetOptional) { std::make_pair("/optionalString", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, AddToMap) { +TYPED_TEST(DeltaVisitorTests, AddToMap) { auto structA = createSimpleTestStruct(); auto structB = structA; @@ -184,8 +206,8 @@ TEST(DeltaVisitorTests, AddToMap) { newOne.max() = 100; structB.mapOfEnumToStruct()->emplace(TestEnum::FIRST, std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -234,7 +256,7 @@ TEST(DeltaVisitorTests, AddToMap) { "/mapOfEnumToStruct/1/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, UpdateMap) { +TYPED_TEST(DeltaVisitorTests, UpdateMap) { auto structA = createSimpleTestStruct(); auto structB = structA; @@ -250,8 +272,8 @@ TEST(DeltaVisitorTests, UpdateMap) { newOne.max() = 1000; structB.mapOfEnumToStruct()->emplace(TestEnum::FIRST, std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -320,13 +342,13 @@ TEST(DeltaVisitorTests, UpdateMap) { })); } -TEST(DeltaVisitorTests, DeleteFromMap) { +TYPED_TEST(DeltaVisitorTests, DeleteFromMap) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.mapOfEnumToStruct()->erase(TestEnum::THIRD); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -375,7 +397,7 @@ TEST(DeltaVisitorTests, DeleteFromMap) { "/mapOfEnumToStruct/3/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, AddToList) { +TYPED_TEST(DeltaVisitorTests, AddToList) { auto structA = createSimpleTestStruct(); auto structB = structA; cfg::L4PortRange newOne; @@ -383,8 +405,8 @@ TEST(DeltaVisitorTests, AddToList) { newOne.max() = 100; structB.listOfStructs()->push_back(std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -433,7 +455,7 @@ TEST(DeltaVisitorTests, AddToList) { "/listOfStructs/0/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, DeleteFromList) { +TYPED_TEST(DeltaVisitorTests, DeleteFromList) { auto structA = createSimpleTestStruct(); auto structB = structA; cfg::L4PortRange newOne; @@ -441,8 +463,8 @@ TEST(DeltaVisitorTests, DeleteFromList) { newOne.max() = 100; structB.listOfStructs()->push_back(std::move(newOne)); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -491,13 +513,13 @@ TEST(DeltaVisitorTests, DeleteFromList) { "/listOfStructs/0/invert", DeltaElemTag::NOT_MINIMAL)})); } -TEST(DeltaVisitorTests, EditVariantField) { +TYPED_TEST(DeltaVisitorTests, EditVariantField) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.inlineVariant()->inlineInt_ref() = 1000; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -560,13 +582,13 @@ TEST(DeltaVisitorTests, EditVariantField) { std::make_pair("/21/2", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, SwitchVariantField) { +TYPED_TEST(DeltaVisitorTests, SwitchVariantField) { auto structA = createSimpleTestStruct(); auto structB = structA; structB.inlineVariant()->inlineBool_ref() = true; - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, @@ -614,7 +636,7 @@ TEST(DeltaVisitorTests, SwitchVariantField) { std::make_pair("/inlineVariant/inlineBool", DeltaElemTag::MINIMAL)})); } -TEST(DeltaVisitorTests, SwitchVariantFieldToStruct) { +TYPED_TEST(DeltaVisitorTests, SwitchVariantFieldToStruct) { auto structA = createSimpleTestStruct(); cfg::L4PortRange newOne; @@ -624,8 +646,8 @@ TEST(DeltaVisitorTests, SwitchVariantFieldToStruct) { auto structB = structA; structB.inlineVariant()->inlineStruct_ref() = std::move(newOne); - auto nodeA = std::make_shared>(structA); - auto nodeB = std::make_shared>(structB); + auto nodeA = this->initNode(structA); + auto nodeB = this->initNode(structB); PathTagSet differingPaths; auto processChange = [&](const std::vector& path, diff --git a/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp b/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp index 062e3ecc7c0e1..ba2409422be47 100644 --- a/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PatchApplierTests.cpp @@ -350,11 +350,14 @@ TEST(PatchApplierTests, FailPatchingSetEntry) { auto process = [&](auto& node) { EXPECT_FALSE(visited); visited = true; - - using NodeT = typename folly::remove_cvref_t; - using TC = typename NodeT::TC; - auto ret = PatchApplier::apply(node, PatchNode(intPatch)); - EXPECT_EQ(ret, PatchApplyResult::PATCHING_IMMUTABLE_NODE); + if constexpr (is_cow_type_v) { + using NodeT = typename folly::remove_cvref_t; + using TC = typename NodeT::TC; + auto ret = PatchApplier::apply(node, PatchNode(intPatch)); + EXPECT_EQ(ret, PatchApplyResult::PATCHING_IMMUTABLE_NODE); + } else { + FAIL() << "unexpected non-cow visit"; + } }; visitPath(*nodeA, path.begin(), path.end(), process); EXPECT_TRUE(visited); diff --git a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp index 3b07f8d447395..2ebf9c1c1c971 100644 --- a/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/PathVisitorTests.cpp @@ -15,6 +15,33 @@ namespace facebook::fboss::thrift_cow::test { +struct GetVisitedPathsOperator : public BasePathVisitorOperator { + public: + const std::set& getVisited() { + return visited; + } + + protected: + void visit( + Serializable& /* node */, + pv_detail::PathIter begin, + pv_detail::PathIter end) override { + visited.insert( + "/" + folly::join('/', std::vector(begin, end))); + } + + template + void visit(Node& node, pv_detail::PathIter begin, pv_detail::PathIter end) + requires(!is_cow_type_v) + { + SerializableReader dummy(node); + visit(dummy, begin, end); + } + + private: + std::set visited; +}; + TEST(PathVisitorTests, AccessField) { auto structA = createSimpleTestStruct(); @@ -22,7 +49,13 @@ TEST(PathVisitorTests, AccessField) { folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - dyn = node.toFollyDynamic(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } }); std::vector path{"inlineInt"}; auto result = RootPathVisitor::visit( @@ -52,15 +85,24 @@ TEST(PathVisitorTests, AccessField) { EXPECT_TRUE(dyn.asBool()); } -#ifdef __ENABLE_HYBRID_THRIFT_COW_TESTS__ -TEST(PathVisitorTests, HybridMapAccess) { +TEST(PathVisitorTests, HybridMapPrimitiveAccess) { auto structA = createHybridMapTestStruct(); - auto nodeA = std::make_shared>(structA); + auto nodeA = std::make_shared, + true>>(structA); folly::dynamic dyn; auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - dyn = node.toFollyDynamic(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + facebook::thrift::to_dynamic( + dyn, node, facebook::thrift::dynamic_format::JSON_1); + } }); // hybridMap @@ -71,32 +113,171 @@ TEST(PathVisitorTests, HybridMapAccess) { EXPECT_EQ(result, ThriftTraverseResult::OK); EXPECT_TRUE(dyn[1].asBool()); } + // hybridMap/1 { - // TODO: handle traversing beyond hybrid node - // hybridMap/1 std::vector path = {"hybridMap", "1"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); - EXPECT_EQ(result, ThriftTraverseResult::VISITOR_EXCEPTION); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_TRUE(dyn.asBool()); + } + // Invalid path + // hybridMap/2 + { + std::vector path = {"hybridMap", "2"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); + } +} +TEST(PathVisitorTests, HybridMapStructAccess) { + auto structA = createHybridMapTestStruct(); + + auto nodeA = std::make_shared, + true>>(structA); + folly::dynamic dyn; + auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { + EXPECT_EQ(begin, end); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + facebook::thrift::to_dynamic( + dyn, node, facebook::thrift::dynamic_format::JSON_1); + } + }); + // hybridMapOfI32ToStruct + { + std::vector path = {"hybridMapOfI32ToStruct"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_NE(dyn.find(20), dyn.items().end()); + cfg::L4PortRange got; + + got = facebook::thrift::from_dynamic( + dyn[20], facebook::thrift::dynamic_format::JSON_1); + EXPECT_EQ(*got.min(), 400); + EXPECT_EQ(*got.max(), 600); + } + // hybridMapOfI32ToStruct/20 + { + std::vector path = {"hybridMapOfI32ToStruct", "20"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + cfg::L4PortRange got; + + got = facebook::thrift::from_dynamic( + dyn, facebook::thrift::dynamic_format::JSON_1); + EXPECT_EQ(*got.min(), 400); + EXPECT_EQ(*got.max(), 600); + } + // Invalid path + // hybridMapOfI32ToStruct/30 + { + std::vector path = {"hybridMapOfI32ToStruct", "30"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); + } +} + +TEST(PathVisitorTests, HybridMapOfMapAccess) { + auto structA = createHybridMapTestStruct(); + + auto nodeA = std::make_shared, + true>>(structA); + folly::dynamic dyn; + auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { + EXPECT_EQ(begin, end); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + facebook::thrift::to_dynamic( + dyn, node, facebook::thrift::dynamic_format::JSON_1); + } + }); + // hybridMapOfMap + { + std::vector path = {"hybridMapOfMap"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_NE(dyn.find(10), dyn.items().end()); + EXPECT_NE(dyn[10].find(20), dyn[10].items().end()); + EXPECT_EQ(dyn[10][20].asInt(), 30); + } + + // hybridMapOfMap/10 + { + std::vector path = {"hybridMapOfMap", "10"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_NE(dyn.find(20), dyn.items().end()); + EXPECT_EQ(dyn[20].asInt(), 30); + } + + // hybridMapOfMap/10/20 + { + std::vector path = {"hybridMapOfMap", "10", "20"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_EQ(dyn.asInt(), 30); + } + + // Invalid path + // hybridMapOfMap/10/30 + { + std::vector path = {"hybridMapOfMap", "10", "30"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); + EXPECT_EQ(result, ThriftTraverseResult::INVALID_MAP_KEY); + } + // full visit mode + { + auto op = GetVisitedPathsOperator(); + std::vector path{"hybridMapOfMap", "10", "20"}; + auto result = RootPathVisitor::visit( + *nodeA, path.begin(), path.end(), PathVisitMode::FULL, op); + EXPECT_EQ(result, ThriftTraverseResult::OK); + EXPECT_THAT( + op.getVisited(), + ::testing::ContainerEq(std::set{ + "/", "/10/20", "/20", "/hybridMapOfMap/10/20"})); } } -#endif // __ENABLE_HYBRID_THRIFT_COW_TESTS__ TEST(PathVisitorTests, AccessFieldInContainer) { auto structA = createSimpleTestStruct(); auto nodeA = std::make_shared>(structA); - cfg::L4PortRange got; - auto processPath = pvlambda([&got](auto& node, auto begin, auto end) { + folly::dynamic dyn; + auto processPath = pvlambda([&dyn](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - got = facebook::thrift::from_dynamic( - node.toFollyDynamic(), facebook::thrift::dynamic_format::JSON_1); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + dyn = node.toFollyDynamic(); + } else { + FAIL() << "unexpected non-cow visit"; + } }); - std::vector path{"mapOfEnumToStruct", "3"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::OK); + cfg::L4PortRange got = facebook::thrift::from_dynamic( + dyn, facebook::thrift::dynamic_format::JSON_1); EXPECT_EQ(*got.min(), 100); EXPECT_EQ(*got.max(), 200); @@ -104,29 +285,12 @@ TEST(PathVisitorTests, AccessFieldInContainer) { result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); EXPECT_EQ(result, ThriftTraverseResult::OK); + got = facebook::thrift::from_dynamic( + dyn, facebook::thrift::dynamic_format::JSON_1); EXPECT_EQ(*got.min(), 100); EXPECT_EQ(*got.max(), 200); } -struct GetVisitedPathsOperator : public BasePathVisitorOperator { - public: - const std::set& getVisited() { - return visited; - } - - protected: - void visit( - Serializable& /* node */, - pv_detail::PathIter begin, - pv_detail::PathIter end) override { - visited.insert( - "/" + folly::join('/', std::vector(begin, end))); - } - - private: - std::set visited; -}; - TEST(PathVisitorTests, TraversalModeFull) { auto structA = createSimpleTestStruct(); auto nodeA = std::make_shared>(structA); @@ -149,9 +313,14 @@ TEST(PathVisitorTests, AccessOptional) { std::string got; auto processPath = pvlambda([&got](auto& node, auto begin, auto end) { EXPECT_EQ(begin, end); - got = node.toFollyDynamic().asString(); + if constexpr (std::is_base_of_v< + Serializable, + std::remove_cvref_t>) { + got = node.toFollyDynamic().asString(); + } else { + FAIL() << "unexpected non-cow visit"; + } }); - std::vector path{"optionalString"}; auto result = RootPathVisitor::visit( *nodeA, path.begin(), path.end(), PathVisitMode::LEAF, processPath); diff --git a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp index 1a11c95843952..6fd931c5fa1e8 100644 --- a/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp +++ b/fboss/thrift_cow/visitors/tests/RecurseVisitorTests.cpp @@ -15,6 +15,7 @@ using folly::dynamic; using namespace facebook::fboss; using namespace facebook::fboss::thrift_cow; using k = facebook::fboss::test_tags::strings; +using namespace testing; namespace { @@ -39,7 +40,9 @@ folly::dynamic createTestDynamic() { "mapB", dynamic::object())("cowMap", dynamic::object())( "hybridMap", dynamic::object())("hybridList", dynamic::array())( "hybridSet", dynamic::array())("hybridUnion", dynamic::object())( - "hybridStruct", dynamic::object("childMap", dynamic::object())); + "hybridStruct", dynamic::object("childMap", dynamic::object()))( + "hybridMapOfI32ToStruct", dynamic::object())( + "hybridMapOfMap", dynamic::object()); } TestStruct createTestStruct(folly::dynamic testDyn) { @@ -49,11 +52,35 @@ TestStruct createTestStruct(folly::dynamic testDyn) { } // namespace -TEST(RecurseVisitorTests, TestFullRecurse) { +template +struct TestParams { + static constexpr auto hybridStorage = EnableHybridStorage; +}; + +using StorageTestTypes = ::testing::Types, TestParams>; + +template +class RecurseVisitorTests : public ::testing::Test { + public: + auto initNode(auto val) { + using RootType = std::remove_cvref_t; + return std::make_shared, + TestParams::hybridStorage>>(val); + } + bool isHybridStorage() { + return TestParams::hybridStorage; + } +}; + +TYPED_TEST_SUITE(RecurseVisitorTests, StorageTestTypes); + +TYPED_TEST(RecurseVisitorTests, TestFullRecurse) { auto testDyn = createTestDynamic(); auto structA = createTestStruct(testDyn); - auto nodeA = std::make_shared>(structA); + auto nodeA = this->initNode(structA); std::map, folly::dynamic> visited; auto processPath = [&visited]( const std::vector& path, auto&& node) { @@ -67,11 +94,12 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{}, testDyn}, {{"cowMap"}, dynamic::object()}, {{"hybridMap"}, dynamic::object()}, + {{"hybridMapOfI32ToStruct"}, dynamic::object()}, + {{"hybridMapOfMap"}, dynamic::object()}, {{"hybridList"}, dynamic::array()}, {{"hybridSet"}, dynamic::array()}, {{"hybridUnion"}, dynamic::object()}, {{"hybridStruct"}, testDyn["hybridStruct"]}, - {{"hybridStruct", "childMap"}, testDyn["hybridStruct"]["childMap"]}, {{"inlineBool"}, testDyn["inlineBool"]}, {{"inlineInt"}, testDyn["inlineInt"]}, {{"inlineString"}, testDyn["inlineString"]}, @@ -107,6 +135,15 @@ TEST(RecurseVisitorTests, TestFullRecurse) { {{"mapA"}, dynamic::object()}, {{"mapB"}, dynamic::object()}}; + std::map, folly::dynamic> hybridLeaves = { + {{"hybridStruct", "childMap"}, testDyn["hybridStruct"]["childMap"]}}; + + if (!this->isHybridStorage()) { + for (const auto& entry : hybridLeaves) { + expected.insert(entry); + } + } + EXPECT_EQ(visited.size(), expected.size()); for (auto& [path, dyn] : expected) { EXPECT_EQ(dyn, visited[path]) @@ -114,11 +151,11 @@ TEST(RecurseVisitorTests, TestFullRecurse) { } } -TEST(RecurseVisitorTests, TestLeafRecurse) { +TYPED_TEST(RecurseVisitorTests, TestLeafRecurse) { auto testDyn = createTestDynamic(); auto structA = createTestStruct(testDyn); - auto nodeA = std::make_shared>(structA); + auto nodeA = this->initNode(structA); std::map, folly::dynamic> visited; auto processPath = [&visited]( const std::vector& path, auto&& node) { @@ -144,6 +181,21 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { {{"mapOfEnumToStruct", "3", "invert"}, testDyn["mapOfEnumToStruct"][3]["invert"]}}; + std::map, folly::dynamic> hybridNodes = { + {{"hybridMap"}, testDyn["hybridMap"]}, + {{"hybridMapOfI32ToStruct"}, testDyn["hybridMapOfI32ToStruct"]}, + {{"hybridMapOfMap"}, testDyn["hybridMapOfMap"]}, + {{"hybridList"}, testDyn["hybridList"]}, + {{"hybridSet"}, testDyn["hybridSet"]}, + {{"hybridUnion"}, testDyn["hybridUnion"]}, + {{"hybridStruct"}, testDyn["hybridStruct"]}}; + + if (this->isHybridStorage()) { + for (const auto& entry : hybridNodes) { + expected.insert(entry); + } + } + EXPECT_EQ(visited.size(), expected.size()); for (auto& [path, dyn] : expected) { EXPECT_EQ(dyn, visited[path]) @@ -171,6 +223,21 @@ TEST(RecurseVisitorTests, TestLeafRecurse) { {{"15", "3", "2"}, testDyn["mapOfEnumToStruct"][3]["max"]}, {{"15", "3", "3"}, testDyn["mapOfEnumToStruct"][3]["invert"]}}; + hybridNodes = { + {{"27"}, testDyn["hybridMap"]}, + {{"28"}, testDyn["hybridList"]}, + {{"29"}, testDyn["hybridSet"]}, + {{"30"}, testDyn["hybridUnion"]}, + {{"31"}, testDyn["hybridStruct"]}, + {{"32"}, testDyn["hybridMapOfI32ToStruct"]}, + {{"33"}, testDyn["hybridMapOfMap"]}}; + + if (this->isHybridStorage()) { + for (const auto& entry : hybridNodes) { + expected.insert(entry); + } + } + EXPECT_EQ(visited.size(), expected.size()); for (auto& [path, dyn] : expected) { EXPECT_EQ(dyn, visited[path]) diff --git a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp index 11285755cc73a..e9ea6fafd2bf9 100644 --- a/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp +++ b/fboss/thrift_cow/visitors/tests/VisitorTestUtils.cpp @@ -15,7 +15,8 @@ TestStruct createSimpleTestStruct() { "mapOfEnumToStruct", dynamic::object("3", dynamic::object("min", 100)("max", 200)))( "mapOfI32ToI32", dynamic::object(1, 1))( - "cowMap", dynamic::object(1, true)); + "cowMap", dynamic::object(1, true))( + "hybridMap", dynamic::object(1, true)); return facebook::thrift::from_dynamic( testDyn, facebook::thrift::dynamic_format::JSON_1); @@ -31,7 +32,10 @@ TestStruct createHybridMapTestStruct() { dynamic::object("3", dynamic::object("min", 100)("max", 200)))( "mapOfI32ToI32", dynamic::object(1, 1))( "cowMap", dynamic::object(1, true))( - "hybridMap", dynamic::object(1, true)); + "hybridMap", dynamic::object(1, true))( + "hybridMapOfI32ToStruct", + dynamic::object(20, dynamic::object("min", 400)("max", 600)))( + "hybridMapOfMap", dynamic::object(10, dynamic::object(20, 30))); return facebook::thrift::from_dynamic( testDyn, facebook::thrift::dynamic_format::JSON_1); diff --git a/fboss/thrift_visitors/tests/PathTests.cpp b/fboss/thrift_visitors/tests/PathTests.cpp index 2eb16302ee289..2e763a067da0b 100644 --- a/fboss/thrift_visitors/tests/PathTests.cpp +++ b/fboss/thrift_visitors/tests/PathTests.cpp @@ -99,3 +99,22 @@ TEST(PathTests, WildcardPaths) { EXPECT_THROW(path.tokens(), std::runtime_error); EXPECT_THROW(path.idTokens(), std::runtime_error); } + +TEST(PathTests, ExtendedPathMatching) { + using namespace facebook::fboss::fsdb; + + using RootPath = + thriftpath::RootThriftPath; + RootPath root; + OperPathElem wildcard; + wildcard.set_any(true); + auto path = root.sw().ports()[wildcard].logicalID(); + + auto idPath = root.sw().ports()[123].logicalID().idTokens(); + auto namePath = root.sw().ports()[123].logicalID().tokens(); + + EXPECT_TRUE(path.matchesPath(namePath)); + EXPECT_TRUE(path.matchesPath(idPath)); + + EXPECT_FALSE(path.matchesPath({"sw", "ports"})); +} diff --git a/fboss/thriftpath_plugin/BUCK b/fboss/thriftpath_plugin/BUCK index 24297db55ed16..2ecc40873b0a6 100644 --- a/fboss/thriftpath_plugin/BUCK +++ b/fboss/thriftpath_plugin/BUCK @@ -11,8 +11,12 @@ cpp_library( "Path.h", ], exported_deps = [ + "//fboss/fsdb/common:utils", "//fboss/fsdb/if:fsdb_oper-cpp2-types", "//folly:string", "//folly:unit", ], + exported_external_deps = [ + "re2", + ], ) diff --git a/fboss/thriftpath_plugin/Path.cpp b/fboss/thriftpath_plugin/Path.cpp index 40ea4e3aa13d4..37a183a8c3706 100644 --- a/fboss/thriftpath_plugin/Path.cpp +++ b/fboss/thriftpath_plugin/Path.cpp @@ -20,4 +20,17 @@ std::vector copyAndExtendVec( return out; } +std::string pathElemToString(const facebook::fboss::fsdb::OperPathElem& elem) { + switch (elem.getType()) { + case facebook::fboss::fsdb::OperPathElem::Type::raw: + return elem.get_raw(); + case facebook::fboss::fsdb::OperPathElem::Type::regex: + return elem.get_regex(); + case facebook::fboss::fsdb::OperPathElem::Type::any: + return "*"; + default: + throw std::runtime_error("Unknown path elem type"); + } +} + } // namespace thriftpath diff --git a/fboss/thriftpath_plugin/Path.h b/fboss/thriftpath_plugin/Path.h index ce5cf3edffe82..084efe5fdeae6 100644 --- a/fboss/thriftpath_plugin/Path.h +++ b/fboss/thriftpath_plugin/Path.h @@ -2,10 +2,13 @@ #pragma once +#include "fboss/fsdb/common/PathHelpers.h" +#include "fboss/fsdb/common/Utils.h" #include "fboss/fsdb/if/gen-cpp2/fsdb_oper_types.h" #include #include +#include #include namespace thriftpath { @@ -34,41 +37,46 @@ namespace thriftpath { std::move(this->extendedTokens_), \ this->hasWildcards_); \ } -#define CONTAINER_CHILD_GETTERS(key_type) \ - Child operator[](key_type token) const& { \ - const std::string strToken = folly::to(token); \ - facebook::fboss::fsdb::OperPathElem elem; \ - elem.set_raw(strToken); \ - return Child( \ - copyAndExtendVec(this->tokens_, strToken), \ - copyAndExtendVec(this->idTokens_, strToken), \ - copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ - this->hasWildcards_); \ - } \ - Child operator[](key_type token)&& { \ - const std::string strToken = folly::to(token); \ - this->tokens_.push_back(strToken); \ - this->idTokens_.push_back(strToken); \ - facebook::fboss::fsdb::OperPathElem elem; \ - elem.set_raw(strToken); \ - this->extendedTokens_.push_back(std::move(elem)); \ - return Child( \ - std::move(this->tokens_), \ - std::move(this->idTokens_), \ - std::move(this->extendedTokens_), \ - this->hasWildcards_); \ - } \ - Child operator[](facebook::fboss::fsdb::OperPathElem elem) const& { \ - return Child( \ - {}, \ - {}, \ - copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ - true /* hasWildcards */); \ - } \ - Child operator[](facebook::fboss::fsdb::OperPathElem elem)&& { \ - this->extendedTokens_.push_back(std::move(elem)); \ - return Child( \ - {}, {}, std::move(this->extendedTokens_), true /* hasWildcards */); \ +#define CONTAINER_CHILD_GETTERS(key_type) \ + Child operator[](key_type token) const& { \ + const std::string strToken = folly::to(token); \ + facebook::fboss::fsdb::OperPathElem elem; \ + elem.set_raw(strToken); \ + return Child( \ + copyAndExtendVec(this->tokens_, strToken), \ + copyAndExtendVec(this->idTokens_, strToken), \ + copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ + this->hasWildcards_); \ + } \ + Child operator[](key_type token)&& { \ + const std::string strToken = folly::to(token); \ + this->tokens_.push_back(strToken); \ + this->idTokens_.push_back(strToken); \ + facebook::fboss::fsdb::OperPathElem elem; \ + elem.set_raw(strToken); \ + this->extendedTokens_.push_back(std::move(elem)); \ + return Child( \ + std::move(this->tokens_), \ + std::move(this->idTokens_), \ + std::move(this->extendedTokens_), \ + this->hasWildcards_); \ + } \ + Child operator[](facebook::fboss::fsdb::OperPathElem elem) const& { \ + return Child( \ + copyAndExtendVec(this->tokens_, pathElemToString(elem)), \ + copyAndExtendVec(this->idTokens_, pathElemToString(elem)), \ + copyAndExtendVec(this->extendedTokens_, std::move(elem)), \ + true /* hasWildcards */); \ + } \ + Child operator[](facebook::fboss::fsdb::OperPathElem elem)&& { \ + this->tokens_.push_back(pathElemToString(elem)); \ + this->idTokens_.push_back(pathElemToString(elem)); \ + this->extendedTokens_.push_back(std::move(elem)); \ + return Child( \ + std::move(this->tokens_), \ + std::move(this->idTokens_), \ + std::move(this->extendedTokens_), \ + true /* hasWildcards */); \ } class BasePath { @@ -117,7 +125,28 @@ class BasePath { } bool matchesPath(const std::vector& other) const { - return other == idTokens_ || other == tokens_; + if (other.size() != extendedTokens_.size()) { + return false; + } + using OperPathElem = facebook::fboss::fsdb::OperPathElem; + for (int i = 0; i < other.size(); i++) { + const auto& elem = extendedTokens_.at(i); + const auto& token = other.at(i); + if (elem.getType() == OperPathElem::Type::raw) { + if (token != idTokens_.at(i) && token != tokens_.at(i)) { + // raw token didn't match either id or name token + return false; + } + } else if (elem.getType() == OperPathElem::Type::regex) { + if (!re2::RE2::FullMatch(token, *elem.regex_ref())) { + return false; + } + } else if (elem.getType() == OperPathElem::Type::any) { + // always match + } + } + // no violations + return true; } std::string str() const { @@ -180,4 +209,6 @@ std::vector copyAndExtendVec( const std::vector& parents, facebook::fboss::fsdb::OperPathElem last); +std::string pathElemToString(const facebook::fboss::fsdb::OperPathElem& elem); + } // namespace thriftpath diff --git a/fboss/util/oss/wedge_qsfp_util.cpp b/fboss/util/oss/wedge_qsfp_util.cpp index 777d21d742eab..c1afa2c356e1a 100644 --- a/fboss/util/oss/wedge_qsfp_util.cpp +++ b/fboss/util/oss/wedge_qsfp_util.cpp @@ -58,7 +58,8 @@ std::pair, int> getTransceiverAPI() { .get(); auto ioBus = std::make_unique(systemContainer); return std::make_pair(std::move(ioBus), 0); - } else if (FLAGS_platform == "meru800bia") { + } else if ( + FLAGS_platform == "meru800bia" || FLAGS_platform == "meru800biab") { auto systemContainer = BspGenericSystemContainer::getInstance() .get(); @@ -117,7 +118,9 @@ std::pair, int> getTransceiverAPI() { .get(); auto ioBus = std::make_unique(systemContainer); return std::make_pair(std::move(ioBus), 0); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { auto systemContainer = BspGenericSystemContainer::getInstance() .get(); @@ -167,6 +170,8 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) { mode = PlatformType::PLATFORM_MERU400BIU; } else if (FLAGS_platform == "meru800bia") { mode = PlatformType::PLATFORM_MERU800BIA; + } else if (FLAGS_platform == "meru800biab") { + mode = PlatformType::PLATFORM_MERU800BIAB; } else if (FLAGS_platform == "meru800bfa") { mode = PlatformType::PLATFORM_MERU800BFA; } else if (FLAGS_platform == "meru800bfa_p1") { @@ -208,7 +213,9 @@ getTransceiverPlatformAPI(TransceiverI2CApi* i2cBus) { .get(); return std::make_pair( std::make_unique(systemContainer), 0); - } else if (mode == PlatformType::PLATFORM_MERU800BIA) { + } else if ( + mode == PlatformType::PLATFORM_MERU800BIA || + mode == PlatformType::PLATFORM_MERU800BIAB) { auto systemContainer = BspGenericSystemContainer::getInstance() .get(); diff --git a/fboss/util/run_sai_replayer_attribute_audit.py b/fboss/util/run_sai_replayer_attribute_audit.py index 12501e99864d1..4a17b87c99285 100644 --- a/fboss/util/run_sai_replayer_attribute_audit.py +++ b/fboss/util/run_sai_replayer_attribute_audit.py @@ -17,7 +17,7 @@ # There are certain calls replayer don't wrap (e.g. RxPacket as it's callback from SDK). # Exclude these patterns when we audit the attributes. -PATTERN_TO_EXCLUDE = ["RxPacket"] +PATTERN_TO_EXCLUDE = ["RxPacket", "TcBufferLimit"] def get_used_attributes(): diff --git a/fboss/util/sdk_onboarding/sdk_tests.py b/fboss/util/sdk_onboarding/sdk_tests.py index 134208357b996..02c556f5c9fca 100644 --- a/fboss/util/sdk_onboarding/sdk_tests.py +++ b/fboss/util/sdk_onboarding/sdk_tests.py @@ -14,7 +14,9 @@ def __init__(self, config_file: str): self.sdk_test_config = self.parse_config(config_file) def parse_config(self, config_file: str): + # pyre-fixme[9]: config_file has type `str`; used as `BufferedReader`. with open(config_file, "rb") as config_file: + # pyre-fixme[16]: `str` has no attribute `read`. data = config_file.read() return deserialize( structKlass=SdkTestConfig, diff --git a/fboss/util/wedge_qsfp_util.cpp b/fboss/util/wedge_qsfp_util.cpp index ad43af8b210ac..768c3dbcc742f 100644 --- a/fboss/util/wedge_qsfp_util.cpp +++ b/fboss/util/wedge_qsfp_util.cpp @@ -2866,7 +2866,7 @@ bool cliModulefirmwareUpgrade( auto qsfpImpl = std::make_unique( port - 1, i2cInfo.bus, i2cInfo.transceiverManager, /*logBuffer*/ nullptr); auto fwUpgradeObj = std::make_unique( - qsfpImpl.get(), port, std::move(fbossFwObj)); + qsfpImpl.get(), port, fbossFwObj.get()); // Do the standalone upgrade in the same process as wedge_qsfp_util bool ret = fwUpgradeObj->cmisModuleFirmwareUpgrade(); @@ -3021,7 +3021,7 @@ void fwUpgradeThreadHandler( i2cInfo.transceiverManager, /*logBuffer*/ nullptr); auto fwUpgradeObj = std::make_unique( - qsfpImpl.get(), module, std::move(fbossFwObj)); + qsfpImpl.get(), module, fbossFwObj.get()); // Do the upgrade in this thread bool ret = fwUpgradeObj->cmisModuleFirmwareUpgrade(); diff --git a/functions.cmake b/functions.cmake new file mode 100644 index 0000000000000..c65efe21a0bc5 --- /dev/null +++ b/functions.cmake @@ -0,0 +1,23 @@ +# provide list of libraries that FBOSS binaries must link with +# because SDK library (libsai_impl.a) uses it and has undefined +# symbols, leading to linker errors while linking binaries. +# specify this list in sdk_dependencies.txt with each library on +# different line (without leading or trailing spaces) +# +# +# $ cat sdk_dependencies.txt +# foo +# bar +# foobar +# foobarfoo +# +# +# FBOSS binaries link with above libraries which libsai_impl.a +# needs +function (add_sai_sdk_dependencies name) + file(READ sdk_dependencies.txt DEPENDENCIES_TEXT) + string(REPLACE "\n" ";" DEPENDENCIES "${DEPENDENCIES_TEXT}") + foreach(DEPENDENCY ${DEPENDENCIES}) + target_link_libraries(${name} ${DEPENDENCY}) + endforeach () +endfunction () diff --git a/shim/.buckroot b/sdk_dependencies.txt similarity index 100% rename from shim/.buckroot rename to sdk_dependencies.txt diff --git a/shim/.buckconfig b/shim/.buckconfig deleted file mode 100644 index 971b77525c8b7..0000000000000 --- a/shim/.buckconfig +++ /dev/null @@ -1,20 +0,0 @@ -[cells] -shim = . -prelude = prelude -toolchains = . -none = none - -[cell_aliases] -config = prelude -ovr_config = prelude -fbcode = shim -fbsource = shim -fbcode_macros = shim -bazel_skylib = shim -buck = shim - -[external_cells] -prelude = bundled - -[parser] -target_platform_detector_spec = target:shim//...->prelude//platforms:default diff --git a/shim/.gitignore b/shim/.gitignore deleted file mode 100644 index a1412f7fa8e00..0000000000000 --- a/shim/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# We currently expect end users to run reindeer vendor themselves -# so mark these things as to ignore -/third-party/rust/.cargo/ -/third-party/rust/BUCK -/third-party/rust/vendor/ diff --git a/shim/BUCK b/shim/BUCK deleted file mode 100644 index e25618a0730b1..0000000000000 --- a/shim/BUCK +++ /dev/null @@ -1,63 +0,0 @@ -load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain") -load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain") -load("@prelude//toolchains:go.bzl", "system_go_toolchain") -load("@prelude//toolchains:haskell.bzl", "system_haskell_toolchain") -load("@prelude//toolchains:ocaml.bzl", "system_ocaml_toolchain") -load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain") -load("@prelude//toolchains:remote_test_execution.bzl", "remote_test_execution_toolchain") -load("@prelude//toolchains:rust.bzl", "system_rust_toolchain") - -oncall("open_source") - -system_cxx_toolchain( - name = "cxx", - cxx_flags = ["-std=c++20"], - link_flags = select({ - "DEFAULT": [], - "prelude//os:linux": [ - "-latomic", - ], - }), - visibility = ["PUBLIC"], -) - -system_genrule_toolchain( - name = "genrule", - visibility = ["PUBLIC"], -) - -system_go_toolchain( - name = "go", - visibility = ["PUBLIC"], -) - -system_haskell_toolchain( - name = "haskell", - visibility = ["PUBLIC"], -) - -system_ocaml_toolchain( - name = "ocaml", - visibility = ["PUBLIC"], -) - -system_python_toolchain( - name = "python", - visibility = ["PUBLIC"], -) - -system_python_bootstrap_toolchain( - name = "python_bootstrap", - visibility = ["PUBLIC"], -) - -system_rust_toolchain( - name = "rust", - default_edition = "2021", - visibility = ["PUBLIC"], -) - -remote_test_execution_toolchain( - name = "remote_test_execution", - visibility = ["PUBLIC"], -) diff --git a/shim/CODE_OF_CONDUCT.md b/shim/CODE_OF_CONDUCT.md deleted file mode 100644 index 3232ed665566e..0000000000000 --- a/shim/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,80 +0,0 @@ -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to make participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic -address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a -professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when there is a -reasonable belief that an individual's behavior may have a negative impact on -the project or its community. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/shim/CONTRIBUTING.md b/shim/CONTRIBUTING.md deleted file mode 100644 index 541779c332e6a..0000000000000 --- a/shim/CONTRIBUTING.md +++ /dev/null @@ -1,31 +0,0 @@ -# Contributing -We want to make contributing to this project as easy and transparent as -possible. - -## Pull Requests -We actively welcome your pull requests. - -1. Fork the repo and create your branch from `main`. -2. If you've added code that should be tested, add tests. -3. If you've changed APIs, update the documentation. -4. Ensure the test suite passes. -5. Make sure your code lints. -6. If you haven't already, complete the Contributor License Agreement ("CLA"). - -## Contributor License Agreement ("CLA") -In order to accept your pull request, we need you to submit a CLA. You only need -to do this once to work on any of Facebook's open source projects. - -Complete your CLA here: - -## Issues -We use GitHub issues to track public bugs. Please ensure your description is -clear and has sufficient instructions to be able to reproduce the issue. - -Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe -disclosure of security bugs. In those cases, please go through the process -outlined on that page and do not file a public issue. - -## License -By contributing to this repo, you agree that your contributions will be licensed -under the LICENSE file in the root directory of this source tree. diff --git a/shim/LICENSE-APACHE b/shim/LICENSE-APACHE deleted file mode 100644 index b09cd7856d585..0000000000000 --- a/shim/LICENSE-APACHE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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/shim/LICENSE-MIT b/shim/LICENSE-MIT deleted file mode 100644 index b93be90515ccd..0000000000000 --- a/shim/LICENSE-MIT +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Meta Platforms, Inc. and affiliates. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/shim/PACKAGE b/shim/PACKAGE deleted file mode 100644 index ea35fecd14159..0000000000000 --- a/shim/PACKAGE +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load(":cfg.bzl", "get_shim_modifiers") -load("@prelude//cfg/modifier:set_cfg_modifiers.bzl", "set_cfg_modifiers") - -modifiers = get_shim_modifiers() -set_cfg_modifiers(modifiers) diff --git a/shim/README.md b/shim/README.md deleted file mode 100644 index 564697b4d6726..0000000000000 --- a/shim/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Buck2 Shims for Meta - -These files implement shims for Meta internal buck2 cells, macros, and targets. - -Via these shims, the buck2 experience when building Meta open source projects -should be nearly identical to the internal buck2 experience. - -## These shims are not recommended for non-Meta projects!!! - -Prefer to use [rules from the buck2 prelude](https://buck2.build/docs/prelude/globals/) -and the [buck2 build apis](https://buck2.build/docs/api/build/globals/) diff --git a/shim/antlir/fbpkg/fbpkg.bzl b/shim/antlir/fbpkg/fbpkg.bzl deleted file mode 100644 index 21c0104326e78..0000000000000 --- a/shim/antlir/fbpkg/fbpkg.bzl +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _builder(**_): - pass - -def _buck_opts(**_): - pass - -fbpkg = struct( - builder = _builder, - buck_opts = _buck_opts, -) diff --git a/shim/buck2/buck_rust_binary.bzl b/shim/buck2/buck_rust_binary.bzl deleted file mode 100644 index ebd00026216f0..0000000000000 --- a/shim/buck2/buck_rust_binary.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load( - "@shim//:shims.bzl", - _rust_binary = "rust_binary", -) - -buck_rust_binary = _rust_binary diff --git a/shim/buck2/proto_defs.bzl b/shim/buck2/proto_defs.bzl deleted file mode 100644 index 468a3be310fc6..0000000000000 --- a/shim/buck2/proto_defs.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load( - "@shim//:shims.bzl", - _rust_protobuf_library = "rust_protobuf_library", -) - -rust_protobuf_library = _rust_protobuf_library diff --git a/shim/build_defs/auto_headers.bzl b/shim/build_defs/auto_headers.bzl deleted file mode 100644 index 3c1324a6eea8a..0000000000000 --- a/shim/build_defs/auto_headers.bzl +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//utils:buckconfig.bzl", "read_choice") - -AutoHeaders = struct( - NONE = "none", - # Infer headers from sources of the rule. - SOURCES = "sources", -) - -_VALUES = [ - AutoHeaders.NONE, - AutoHeaders.SOURCES, -] - -def get_auto_headers(auto_headers): - """ - Returns the level of auto-headers to apply to a rule. - - Args: - auto_headers: One of the values in `AutoHeaders` - - Returns: - The value passed in as auto_headers, or the value from configuration if - `auto_headers` is None - """ - if auto_headers != None: - if auto_headers not in _VALUES: - fail("unexpected `auto_headers` value: {!r}".format(auto_headers)) - return auto_headers - return read_choice("cxx", "auto_headers", _VALUES, AutoHeaders.SOURCES) diff --git a/shim/build_defs/config.bzl b/shim/build_defs/config.bzl deleted file mode 100644 index cddd1a978905d..0000000000000 --- a/shim/build_defs/config.bzl +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _get_build_mode(): - return "" - -config = struct( - get_build_mode = _get_build_mode, -) diff --git a/shim/build_defs/cpp_benchmark.bzl b/shim/build_defs/cpp_benchmark.bzl deleted file mode 100644 index 928f62d2c555e..0000000000000 --- a/shim/build_defs/cpp_benchmark.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def cpp_benchmark(**_): - pass diff --git a/shim/build_defs/cpp_binary.bzl b/shim/build_defs/cpp_binary.bzl deleted file mode 100644 index 89bf161e7b23b..0000000000000 --- a/shim/build_defs/cpp_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_binary = "cpp_binary") - -cpp_binary = _cpp_binary diff --git a/shim/build_defs/cpp_library.bzl b/shim/build_defs/cpp_library.bzl deleted file mode 100644 index d69787b947c83..0000000000000 --- a/shim/build_defs/cpp_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_library = "cpp_library") - -cpp_library = _cpp_library diff --git a/shim/build_defs/cpp_unittest.bzl b/shim/build_defs/cpp_unittest.bzl deleted file mode 100644 index 2c4103ebd8bb6..0000000000000 --- a/shim/build_defs/cpp_unittest.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _cpp_unittest = "cpp_unittest") - -cpp_unittest = _cpp_unittest diff --git a/shim/build_defs/custom_rule.bzl b/shim/build_defs/custom_rule.bzl deleted file mode 100644 index 03aac5904f5ca..0000000000000 --- a/shim/build_defs/custom_rule.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def custom_rule(**_): - pass diff --git a/shim/build_defs/custom_unittest.bzl b/shim/build_defs/custom_unittest.bzl deleted file mode 100644 index f5aa4cf8f06e5..0000000000000 --- a/shim/build_defs/custom_unittest.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def custom_unittest(**_): - pass diff --git a/shim/build_defs/cython_library.bzl b/shim/build_defs/cython_library.bzl deleted file mode 100644 index dac5b8bcae441..0000000000000 --- a/shim/build_defs/cython_library.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:python_library.bzl", "python_library") - -def cython_library(name, visibility = ["PUBLIC"], **_): - python_library(name = name, visibility = visibility) diff --git a/shim/build_defs/export_files.bzl b/shim/build_defs/export_files.bzl deleted file mode 100644 index 25ae03f6288e3..0000000000000 --- a/shim/build_defs/export_files.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def export_file(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.export_file(visibility = visibility, **kwargs) - -def export_files(files, visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - for file in files: - native.export_file(name = file, visibility = visibility, **kwargs) diff --git a/shim/build_defs/lib/oss.bzl b/shim/build_defs/lib/oss.bzl deleted file mode 100644 index f05190ce24ad5..0000000000000 --- a/shim/build_defs/lib/oss.bzl +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _filter_empty_strings(string_list): - return filter(lambda d: d != "", string_list) - -def _parse_prefix_mappings(raw_rules): - rules = [] - for raw_rule in raw_rules: - (match, replace) = raw_rule.split("->", 1) - - (cell, root_dir) = match.split("//") - match = struct(cell = cell, root_dir = root_dir) - - (cell, root_dir) = replace.split("//") - replace = struct(cell = cell, root_dir = root_dir) - - rules.append(struct(match = match, replace = replace)) - - return rules - -def _strip_third_party_rust_version(target: str) -> str: - # When upgrading libraries we either suffix them as `-old` or with a version, e.g. `-1-08` - # Strip those so we grab the right one in open source. - if target.endswith(":md-5"): # md-5 is the one exception - return target - xs = target.split("-") - for i in reversed(range(len(xs))): - s = xs[i] - if s == "old" or s.isdigit(): - xs.pop(i) - else: - break - return "-".join(xs) - -# Cell the BUCK file being processed belongs to -ACTIVE_CELL = native.get_cell_name() - -# The root cell of this project, generally "root" and does not need to be set. -# Targets that explicitly reference this cell will not be rewritten, and -# targets that do not end up referencing a cell will be replaced with targets -# that reference this cell -ROOT_CELL = read_config("oss", "root_cell", "root") - -# The cell this file and the rest of the shim directory belong to, generally -# "shim" and does not need to be set. -SHIM_CELL = read_config("oss", "shim_cell", "shim") - -# The internal cell this project originally belonged to. -# -# When applying rewrites, the cell of the target is often considered. Targets -# that do not explicitly specify a cell (eg: "//foo:bar") will be considered -# to belong to INTERNAL_CELL. -INTERNAL_CELL = read_config("oss", "internal_cell", "fbcode") - -# There can be situations where a target specifies a cell explicitly and the -# path is part of the local checkout, rather than potentially needing to be -# shimmed. In this case, we want to rewrite the target to use the root cell. -# -# If a target's cell is unspecified or matches the internal cell, and the path -# starts with an entry in this list, The cell replaced with the ROOT_CELL. -# -# Entries are separated by spaces, and evaluated in order. Once a match is -# found, the rewrite is complete and the following entries will not be -# evaluated. -# -# Examples: -# internal_cell//oss_project/foo:bar -> root//oss_project/foo:bar -PROJECT_DIRS = _filter_empty_strings(read_config("oss", "project_dirs", "").split(" ")) - -# There are some situations where prefix of the internal directory structure is -# removed from the public filepaths, such as rewriting "internal/foo/bar/baz" -# to "oss/baz". When this happens, the BUCK files are not converted to reflect -# the public directory structure, and targets need to be rewritten to account -# for the discrepancy. -# -# Entries behave similarly to PROJECT_DIRS, except that the root directory will -# also be removed from the path in the rewritten target. This setting is -# applied after PROJECT_DIRS. -# -# Entries are separated by spaces and evaluated in order. Once a match is -# found, the rewrite is complete and the following entries will not be -# evaluated. -# -# Examples: -# //oss_project/foo:bar -> root//foo:bar -# internal_cell//oss_project/foo:bar -> root//foo:bar -STRIPPED_ROOT_DIRS = _filter_empty_strings(read_config("oss", "stripped_root_dirs", "").split(" ")) - -# Internally, most code shares the same cell in a monorepo, but public projects -# only contain a subset, importing dependencies via git submodules or other -# mechanisms. When this happens, the dependency may end up in a different -# filepath, or may have it's own buck2 configuration and should be treated as -# an on disk external cell. -# -# If the target's cell is a match (or if unspecified, INTERNAL_CELL is a -# match),unspecified) matches, and the target's path is within the root -# directory, both the cell and root directory prefix are replaced with the new -# values. -# -# Entries are in the form of "MATCH->REPLACEMENT". Both MATCH and replacement -# shall be in the format of "CELL//DIR_PREFIX". -# -# Entries are separated by spaces and evaluated in order. Once a match is -# found, the rewrite is complete and the following entries will not be -# evaluated. -# -# Examples: -# internal//foo->foo//foo; internal//foo/bar:baz -> foo//foo/bar:baz -PREFIX_MAPPINGS = _parse_prefix_mappings( - _filter_empty_strings(read_config("oss", "prefix_mappings", "").split(" ")), -) - -# Hardcoded rewrite rules that apply to many projects and only produce targets -# within the shim cell. They are applied after the rules from .buckconfig, and -# will not be applied if any other rules match. -IMPLICIT_REWRITE_RULES = { - "fbcode": struct( - exact = { - "common/rust/shed/fbinit:fbinit": "third-party/rust:fbinit", - "common/rust/shed/sorted_vector_map:sorted_vector_map": "third-party/rust:sorted_vector_map", - "watchman/rust/watchman_client:watchman_client": "third-party/rust:watchman_client", - }, - dirs = [ - ("third-party-buck/platform010/build/supercaml", "third-party/ocaml"), - ("third-party-buck/platform010/build", "third-party"), - ], - ), - "fbsource": struct( - dirs = [ - ("third-party", "third-party"), - ], - dynamic = [ - ("third-party/rust", _strip_third_party_rust_version), - ], - ), - "third-party": struct( - dirs = [ - ("", "third-party"), - ], - dynamic = [ - ("rust", lambda path: "third-party/" + _strip_third_party_rust_version(path)), - ], - ), -} - -DEFAULT_REWRITE_CTX = struct( - cells = struct( - active = ACTIVE_CELL, - root = ROOT_CELL, - shim = SHIM_CELL, - internal = INTERNAL_CELL, - ), - project_dirs = PROJECT_DIRS, - stripped_root_dirs = STRIPPED_ROOT_DIRS, - prefix_mappings = PREFIX_MAPPINGS, - implicit_rewrite_rules = IMPLICIT_REWRITE_RULES, -) - -""" -Rewrite an internal target string to one that is compatible with this OSS -project. - -Some example use cases for this: -- Map dependency targets to shim targets in this dir -- Handle mismatching buck roots between internal and oss - (eg: internal/oss-project/... is exposed externally as oss-project/...) -- Handle submodules that result in filepaths that do not match internal - (eg: internal/my_library/... and oss-project/my_library/my_library/...) -""" - -def translate_target( - target: str, - ctx = DEFAULT_REWRITE_CTX) -> str: - if "//" not in target: - # This is a local target, aka ":foo". Don't touch - return target - - (cell, path) = target.split("//", 1) - - if cell == ctx.cells.root: - # This cell is explicitly root. Don't touch - return target - - resolved_cell = ctx.cells.active if cell == "" else cell - internal_cell = ctx.cells.internal if resolved_cell == ctx.cells.root else resolved_cell - - if internal_cell == ctx.cells.internal: - for d in ctx.project_dirs: - if _path_rooted_in_dir(path, d): - return ctx.cells.root + "//" + path - - for d in ctx.stripped_root_dirs: - if _path_rooted_in_dir(path, d): - return ctx.cells.root + "//" + _strip_root_dir_from_path(path, d) - - for rule in ctx.prefix_mappings: - if internal_cell == rule.match.cell and _path_rooted_in_dir(path, rule.match.root_dir): - return rule.replace.cell + "//" + _swap_root_dir_for_path(path, rule.match.root_dir, rule.replace.root_dir) - - rules = ctx.implicit_rewrite_rules.get(internal_cell) - - if rules == None: - # No implicit rewrite rules - return target - - exact = getattr(rules, "exact", {}).get(path) - if exact != None: - return ctx.cells.shim + "//" + exact - - for (match_root_dir, replace_root_dir) in getattr(rules, "dirs", []): - if _path_rooted_in_dir(path, match_root_dir): - return ctx.cells.shim + "//" + _swap_root_dir_for_path(path, match_root_dir, replace_root_dir) - - for (match_root_dir, fn) in getattr(rules, "dynamic", []): - if _path_rooted_in_dir(path, match_root_dir): - return ctx.cells.shim + "//" + fn(path) - - return target - -def _path_rooted_in_dir(path: str, d: str) -> bool: - return d == "" or path == d or path.startswith(d + "/") or path.startswith(d + ":") - -def _strip_root_dir_from_path(path: str, d: str) -> str: - return path.removeprefix(d).removeprefix("/") - -def _swap_root_dir_for_path(path: str, root_dir: str, new_root_dir) -> str: - suffix = _strip_root_dir_from_path(path, root_dir) - if not suffix.startswith(":"): - suffix = "/" + suffix - replace_path = new_root_dir.removesuffix("/") + suffix - return replace_path.removeprefix("/") diff --git a/shim/build_defs/lib/python_common.bzl b/shim/build_defs/lib/python_common.bzl deleted file mode 100644 index 44dc7574685a6..0000000000000 --- a/shim/build_defs/lib/python_common.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def get_ldflags(*args): - _unused = args # @unused - return [] - -def get_strip_mode(*args): - _unused = args # @unused - return "" diff --git a/shim/build_defs/lib/test/BUCK b/shim/build_defs/lib/test/BUCK deleted file mode 100644 index a2f6ef3a1c64a..0000000000000 --- a/shim/build_defs/lib/test/BUCK +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs/lib/test:oss.bzl", "test_translate_target") - -test_translate_target() diff --git a/shim/build_defs/lib/test/oss.bzl b/shim/build_defs/lib/test/oss.bzl deleted file mode 100644 index edae83732a032..0000000000000 --- a/shim/build_defs/lib/test/oss.bzl +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs/lib:oss.bzl", "translate_target") - -TEST_CTX = struct( - cells = struct( - active = "root", - root = "root", - shim = "shim", - internal = "internal", - ), - project_dirs = ["project"], - stripped_root_dirs = ["root_dir"], - prefix_mappings = [ - struct( - match = struct(cell = "internal", root_dir = "dep"), - replace = struct(cell = "dep", root_dir = "dep_rename"), - ), - ], - implicit_rewrite_rules = { - "internal": struct( - exact = { - "exact:exact": "foo/shimmed:exact", - }, - dirs = [ - ("third-party", "third_party"), - ], - dynamic = [ - ("dynamic", lambda path: path.upper()), - ], - ), - }, -) - -def _test_target(target: str, expected: str): - actual = translate_target(target, TEST_CTX) - - if actual != expected: - fail("Expected {} == {}".format(actual, expected)) - -def test_translate_target(): - _test_target("//:foo", "//:foo") - _test_target("root//:foo", "root//:foo") - _test_target("other//:foo", "other//:foo") - - _test_target("//project/foo:bar", "root//project/foo:bar") - _test_target("internal//project/foo:bar", "root//project/foo:bar") - _test_target("internal//project2/foo:bar", "internal//project2/foo:bar") - - _test_target("//root_dir/foo:bar", "root//foo:bar") - _test_target("//root_dir/with/subdir/foo:bar", "root//with/subdir/foo:bar") - _test_target("internal//root_dir/foo:bar", "root//foo:bar") - - _test_target("//dep:foo", "dep//dep_rename:foo") - _test_target("//dep/with/subdir:foo", "dep//dep_rename/with/subdir:foo") - _test_target("internal//dep:foo", "dep//dep_rename:foo") - _test_target("other//dep:foo", "other//dep:foo") - - _test_target("//exact:exact", "shim//foo/shimmed:exact") - _test_target("internal//exact:exact", "shim//foo/shimmed:exact") - _test_target("other//exact:exact", "other//exact:exact") - - _test_target("//third-party/lib/foo:bar", "shim//third_party/lib/foo:bar") - _test_target("internal//third-party/lib/foo:bar", "shim//third_party/lib/foo:bar") - - _test_target("//dynamic:foo", "shim//DYNAMIC:FOO") - _test_target("internal//dynamic:foo", "shim//DYNAMIC:FOO") - _test_target("other//dynamic:foo", "other//dynamic:foo") diff --git a/shim/build_defs/native_rules.bzl b/shim/build_defs/native_rules.bzl deleted file mode 100644 index a3e3a7039b0f3..0000000000000 --- a/shim/build_defs/native_rules.bzl +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def buck_genrule(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.genrule(visibility = visibility, **kwargs) - -def buck_command_alias(**_): - pass - -def buck_filegroup(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.filegroup(visibility = visibility, **kwargs) - -def alias(actual, visibility = ["PUBLIC"], **kwargs): - if actual.startswith("//buck2/"): - actual = "root//" + actual.removeprefix("//buck2/") - native.alias(actual = actual, visibility = visibility, **kwargs) - -def buck_sh_binary(visibility = ["PUBLIC"], **kwargs): - # @lint-ignore BUCKLINT: avoid "native is forbidden in fbcode" - native.sh_binary(visibility = visibility, **kwargs) diff --git a/shim/build_defs/ocaml_binary.bzl b/shim/build_defs/ocaml_binary.bzl deleted file mode 100644 index 1530848e3dbe5..0000000000000 --- a/shim/build_defs/ocaml_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _ocaml_binary = "ocaml_binary") - -ocaml_binary = _ocaml_binary diff --git a/shim/build_defs/platform_utils.bzl b/shim/build_defs/platform_utils.bzl deleted file mode 100644 index 2ea71572f9657..0000000000000 --- a/shim/build_defs/platform_utils.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def _get_cxx_platform_for_base_path(_base_path): - return struct(target_platform = None) - -platform_utils = struct(get_cxx_platform_for_base_path = _get_cxx_platform_for_base_path) diff --git a/shim/build_defs/prebuilt_cpp_library.bzl b/shim/build_defs/prebuilt_cpp_library.bzl deleted file mode 100644 index 97a0d8cf2e9a8..0000000000000 --- a/shim/build_defs/prebuilt_cpp_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _prebuilt_cpp_library = "prebuilt_cpp_library") - -prebuilt_cpp_library = _prebuilt_cpp_library diff --git a/shim/build_defs/python_binary.bzl b/shim/build_defs/python_binary.bzl deleted file mode 100644 index 5805fc30bd256..0000000000000 --- a/shim/build_defs/python_binary.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_binary(srcs = [], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_binary(**kwargs) diff --git a/shim/build_defs/python_library.bzl b/shim/build_defs/python_library.bzl deleted file mode 100644 index 3e62a5e9105ce..0000000000000 --- a/shim/build_defs/python_library.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_library(srcs = [], visibility = ["PUBLIC"], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_library(visibility = visibility, **kwargs) diff --git a/shim/build_defs/python_unittest.bzl b/shim/build_defs/python_unittest.bzl deleted file mode 100644 index 76bc3589b2ba0..0000000000000 --- a/shim/build_defs/python_unittest.bzl +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def python_unittest(srcs = [], **kwargs): - _unused = srcs # @unused - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.python_test(**kwargs) diff --git a/shim/build_defs/roar.bzl b/shim/build_defs/roar.bzl deleted file mode 100644 index 0af590c1330c6..0000000000000 --- a/shim/build_defs/roar.bzl +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//tools/build_defs:buckconfig.bzl", "read_bool") - -def roar_no_jit(): - use_roar_jit = read_bool("fbcode", "use_roar_jit", required = False) - if use_roar_jit: - return ["-fforce-no-jit"] - return [] diff --git a/shim/build_defs/rust_binary.bzl b/shim/build_defs/rust_binary.bzl deleted file mode 100644 index d763f446cb534..0000000000000 --- a/shim/build_defs/rust_binary.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_binary = "rust_binary") - -rust_binary = _rust_binary diff --git a/shim/build_defs/rust_library.bzl b/shim/build_defs/rust_library.bzl deleted file mode 100644 index fcd27bcf803d4..0000000000000 --- a/shim/build_defs/rust_library.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_library = "rust_library") - -rust_library = _rust_library diff --git a/shim/build_defs/rust_linkable_symbol.bzl b/shim/build_defs/rust_linkable_symbol.bzl deleted file mode 100644 index c29faa3968f14..0000000000000 --- a/shim/build_defs/rust_linkable_symbol.bzl +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//rust:linkable_symbol.bzl", prelude_rust_linkable_symbol = "rust_linkable_symbol") -load("@shim//:shims.bzl", _rust_library = "rust_library") - -def rust_linkable_symbol( - visibility = ["PUBLIC"], - **kwargs): - prelude_rust_linkable_symbol( - visibility = visibility, - rust_library_macro = _rust_library, - **kwargs - ) diff --git a/shim/build_defs/rust_unittest.bzl b/shim/build_defs/rust_unittest.bzl deleted file mode 100644 index 8b0822fa8233d..0000000000000 --- a/shim/build_defs/rust_unittest.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//:shims.bzl", _rust_unittest = "rust_unittest") - -rust_unittest = _rust_unittest diff --git a/shim/cfg.bzl b/shim/cfg.bzl deleted file mode 100644 index 1e007498afecd..0000000000000 --- a/shim/cfg.bzl +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//cfg/modifier:cfg_constructor.bzl?v2_only", "cfg_constructor_post_constraint_analysis", "cfg_constructor_pre_constraint_analysis") -load("@prelude//cfg/modifier:common.bzl?v2_only", "MODIFIER_METADATA_KEY") - -SHIM_ALIASES = { - "fedora": "shim//os/linux/distro/constraints:fedora", - "ubuntu": "shim//os/linux/distro/constraints:ubuntu", -} - -CFG_CONSTRUCTOR_INITIALIZED_KEY = "buck.cfg_constructor_initialized" - -def set_cfg_constructor(aliases = dict()): - if not read_parent_package_value(CFG_CONSTRUCTOR_INITIALIZED_KEY): - native.set_cfg_constructor( - stage0 = cfg_constructor_pre_constraint_analysis, - stage1 = cfg_constructor_post_constraint_analysis, - key = MODIFIER_METADATA_KEY, - aliases = struct(**aliases), - extra_data = struct(), - ) - - write_package_value(CFG_CONSTRUCTOR_INITIALIZED_KEY, True) - -def get_shim_modifiers(): - modifiers = [] - - linux_distro = read_config("linux", "distro") - pprint(linux_distro) - - if linux_distro: - modifiers.append("shim//os/linux/distro/constraints:{}".format(linux_distro)) - - return modifiers diff --git a/shim/common/ocaml/interop/defs.bzl b/shim/common/ocaml/interop/defs.bzl deleted file mode 100644 index 56d22fb5fafeb..0000000000000 --- a/shim/common/ocaml/interop/defs.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@root//defs.bzl", _RUST_FLAGS_2018 = "RUST_FLAGS_2018") - -RUST_FLAGS_2018 = _RUST_FLAGS_2018 diff --git a/shim/folly/io/async/test/certs/defs.bzl b/shim/folly/io/async/test/certs/defs.bzl deleted file mode 100644 index 1a645059e25c4..0000000000000 --- a/shim/folly/io/async/test/certs/defs.bzl +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbcode_macros//build_defs:native_rules.bzl", "alias") - -def alias_pem(pems: list[str]): - for pem in pems: - alias( - name = pem, - actual = "//folly/io/async/test/certs:{pem}".format(pem = pem), - ) - -def alias_pem_for_xplat(pems: list[str]): - # in xplat these pem files are exported in //xplat/folly/io/async/test - for pem in pems: - alias( - name = pem, - actual = "//xplat/folly/io/async/test:certs/{pem}".format(pem = pem), - ) diff --git a/shim/grpc_fb/codegen/buck_macros.bzl b/shim/grpc_fb/codegen/buck_macros.bzl deleted file mode 100644 index ed51cb6935505..0000000000000 --- a/shim/grpc_fb/codegen/buck_macros.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def grpc_library(**kwargs): - _unused = kwargs # @unused - pass diff --git a/shim/lib/dicts.bzl b/shim/lib/dicts.bzl deleted file mode 100644 index f702fa92c59e6..0000000000000 --- a/shim/lib/dicts.bzl +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# 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. - -"""Skylib module containing functions that operate on dictionaries.""" - -def _add(*dictionaries): - """Returns a new `dict` that has all the entries of the given dictionaries. - - If the same key is present in more than one of the input dictionaries, the - last of them in the argument list overrides any earlier ones. - - This function is designed to take zero or one arguments as well as multiple - dictionaries, so that it follows arithmetic identities and callers can avoid - special cases for their inputs: the sum of zero dictionaries is the empty - dictionary, and the sum of a single dictionary is a copy of itself. - - Args: - *dictionaries: Zero or more dictionaries to be added. - - Returns: - A new `dict` that has all the entries of the given dictionaries. - """ - result = {} - for d in dictionaries: - result.update(d) - return result - -dicts = struct( - add = _add, -) diff --git a/shim/lib/new_sets.bzl b/shim/lib/new_sets.bzl deleted file mode 100644 index 47124d3fca091..0000000000000 --- a/shim/lib/new_sets.bzl +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright 2018 The Bazel Authors. All rights reserved. -# -# 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. - -"""Skylib module containing common hash-set algorithms. - - An empty set can be created using: `sets.make()`, or it can be created with some starting values - if you pass it an sequence: `sets.make([1, 2, 3])`. This returns a struct containing all of the - values as keys in a dictionary - this means that all passed in values must be hashable. The - values in the set can be retrieved using `sets.to_list(my_set)`. -""" - -load(":dicts.bzl", "dicts") - -def _make(elements = None): - """Creates a new set. - - All elements must be hashable. - - Args: - elements: Optional sequence to construct the set out of. - - Returns: - A set containing the passed in values. - """ - elements = elements if elements else [] - return struct(_values = {e: None for e in elements}) - -def _copy(s): - """Creates a new set from another set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A new set containing the same elements as `s`. - """ - return struct(_values = dict(s._values)) - -def _to_list(s): - """Creates a list from the values in the set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A list of values inserted into the set. - """ - return list(s._values.keys()) - -def _insert(s, e): - """Inserts an element into the set. - - Element must be hashable. This mutates the orginal set. - - Args: - s: A set, as returned by `sets.make()`. - e: The element to be inserted. - - Returns: - The set `s` with `e` included. - """ - s._values[e] = None - return s - -def _remove(s, e): - """Removes an element from the set. - - Element must be hashable. This mutates the orginal set. - - Args: - s: A set, as returned by `sets.make()`. - e: The element to be removed. - - Returns: - The set `s` with `e` removed. - """ - s._values.pop(e) - return s - -def _contains(a, e): - """Checks for the existence of an element in a set. - - Args: - a: A set, as returned by `sets.make()`. - e: The element to look for. - - Returns: - True if the element exists in the set, False if the element does not. - """ - return e in a._values - -def _get_shorter_and_longer(a, b): - """Returns two sets in the order of shortest and longest. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - `a`, `b` if `a` is shorter than `b` - or `b`, `a` if `b` is shorter than `a`. - """ - if _length(a) < _length(b): - return a, b - return b, a - -def _is_equal(a, b): - """Returns whether two sets are equal. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` is equal to `b`, False otherwise. - """ - return a._values == b._values - -def _is_subset(a, b): - """Returns whether `a` is a subset of `b`. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` is a subset of `b`, False otherwise. - """ - for e in a._values.keys(): - if e not in b._values: - return False - return True - -def _disjoint(a, b): - """Returns whether two sets are disjoint. - - Two sets are disjoint if they have no elements in common. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - True if `a` and `b` are disjoint, False otherwise. - """ - shorter, longer = _get_shorter_and_longer(a, b) - for e in shorter._values.keys(): - if e in longer._values: - return False - return True - -def _intersection(a, b): - """Returns the intersection of two sets. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - A set containing the elements that are in both `a` and `b`. - """ - shorter, longer = _get_shorter_and_longer(a, b) - return struct(_values = {e: None for e in shorter._values.keys() if e in longer._values}) - -def _union(*args): - """Returns the union of several sets. - - Args: - *args: An arbitrary number of sets or lists. - - Returns: - The set union of all sets or lists in `*args`. - """ - return struct(_values = dicts.add(*[s._values for s in args])) - -def _difference(a, b): - """Returns the elements in `a` that are not in `b`. - - Args: - a: A set, as returned by `sets.make()`. - b: A set, as returned by `sets.make()`. - - Returns: - A set containing the elements that are in `a` but not in `b`. - """ - return struct(_values = {e: None for e in a._values.keys() if e not in b._values}) - -def _length(s): - """Returns the number of elements in a set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - An integer representing the number of elements in the set. - """ - return len(s._values) - -def _repr(s): - """Returns a string value representing the set. - - Args: - s: A set, as returned by `sets.make()`. - - Returns: - A string representing the set. - """ - return repr(s._values.keys()) - -sets = struct( - make = _make, - copy = _copy, - to_list = _to_list, - insert = _insert, - contains = _contains, - is_equal = _is_equal, - is_subset = _is_subset, - disjoint = _disjoint, - intersection = _intersection, - union = _union, - difference = _difference, - length = _length, - remove = _remove, - repr = _repr, - str = _repr, -) diff --git a/shim/lib/paths.bzl b/shim/lib/paths.bzl deleted file mode 100644 index 8e3fcaea5161e..0000000000000 --- a/shim/lib/paths.bzl +++ /dev/null @@ -1,242 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# 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. - -"""Skylib module containing file path manipulation functions. - -NOTE: The functions in this module currently only support paths with Unix-style -path separators (forward slash, "/"); they do not handle Windows-style paths -with backslash separators or drive letters. -""" - -def _basename(p): - """Returns the basename (i.e., the file portion) of a path. - - Note that if `p` ends with a slash, this function returns an empty string. - This matches the behavior of Python's `os.path.basename`, but differs from - the Unix `basename` command (which would return the path segment preceding - the final slash). - - Args: - p: The path whose basename should be returned. - - Returns: - The basename of the path, which includes the extension. - """ - return p.rpartition("/")[-1] - -def _dirname(p): - """Returns the dirname of a path. - - The dirname is the portion of `p` up to but not including the file portion - (i.e., the basename). Any slashes immediately preceding the basename are not - included, unless omitting them would make the dirname empty. - - Args: - p: The path whose dirname should be returned. - - Returns: - The dirname of the path. - """ - prefix, sep, _ = p.rpartition("/") - if not prefix: - return sep - else: - # If there are multiple consecutive slashes, strip them all out as Python's - # os.path.dirname does. - return prefix.rstrip("/") - -def _is_absolute(path): - """Returns `True` if `path` is an absolute path. - - Args: - path: A path (which is a string). - - Returns: - `True` if `path` is an absolute path. - """ - return path.startswith("/") or (len(path) > 2 and path[1] == ":") - -def _join(path, *others): - """Joins one or more path components intelligently. - - This function mimics the behavior of Python's `os.path.join` function on POSIX - platform. It returns the concatenation of `path` and any members of `others`, - inserting directory separators before each component except the first. The - separator is not inserted if the path up until that point is either empty or - already ends in a separator. - - If any component is an absolute path, all previous components are discarded. - - Args: - path: A path segment. - *others: Additional path segments. - - Returns: - A string containing the joined paths. - """ - result = path - - for p in others: - if _is_absolute(p): - result = p - elif not result or result.endswith("/"): - result += p - else: - result += "/" + p - - return result - -def _normalize(path): - """Normalizes a path, eliminating double slashes and other redundant segments. - - This function mimics the behavior of Python's `os.path.normpath` function on - POSIX platforms; specifically: - - - If the entire path is empty, "." is returned. - - All "." segments are removed, unless the path consists solely of a single - "." segment. - - Trailing slashes are removed, unless the path consists solely of slashes. - - ".." segments are removed as long as there are corresponding segments - earlier in the path to remove; otherwise, they are retained as leading ".." - segments. - - Single and double leading slashes are preserved, but three or more leading - slashes are collapsed into a single leading slash. - - Multiple adjacent internal slashes are collapsed into a single slash. - - Args: - path: A path. - - Returns: - The normalized path. - """ - if not path: - return "." - - if path.startswith("//") and not path.startswith("///"): - initial_slashes = 2 - elif path.startswith("/"): - initial_slashes = 1 - else: - initial_slashes = 0 - is_relative = (initial_slashes == 0) - - components = path.split("/") - new_components = [] - - for component in components: - if component in ("", "."): - continue - if component == "..": - if new_components and new_components[-1] != "..": - # Only pop the last segment if it isn't another "..". - new_components.pop() - elif is_relative: - # Preserve leading ".." segments for relative paths. - new_components.append(component) - else: - new_components.append(component) - - path = "/".join(new_components) - if not is_relative: - path = ("/" * initial_slashes) + path - - return path or "." - -def _relativize(path, start): - """Returns the portion of `path` that is relative to `start`. - - Because we do not have access to the underlying file system, this - implementation differs slightly from Python's `os.path.relpath` in that it - will fail if `path` is not beneath `start` (rather than use parent segments to - walk up to the common file system root). - - Relativizing paths that start with parent directory references only works if - the path both start with the same initial parent references. - - Args: - path: The path to relativize. - start: The ancestor path against which to relativize. - - Returns: - The portion of `path` that is relative to `start`. - """ - segments = _normalize(path).split("/") - start_segments = _normalize(start).split("/") - if start_segments == ["."]: - start_segments = [] - start_length = len(start_segments) - - if (path.startswith("/") != start.startswith("/") or - len(segments) < start_length): - fail("Path '%s' is not beneath '%s'" % (path, start)) - - for ancestor_segment, segment in zip(start_segments, segments): - if ancestor_segment != segment: - fail("Path '%s' is not beneath '%s'" % (path, start)) - - length = len(segments) - start_length - result_segments = segments[-length:] - return "/".join(result_segments) - -def _replace_extension(p, new_extension): - """Replaces the extension of the file at the end of a path. - - If the path has no extension, the new extension is added to it. - - Args: - p: The path whose extension should be replaced. - new_extension: The new extension for the file. The new extension should - begin with a dot if you want the new filename to have one. - - Returns: - The path with the extension replaced (or added, if it did not have one). - """ - return _split_extension(p)[0] + new_extension - -def _split_extension(p): - """Splits the path `p` into a tuple containing the root and extension. - - Leading periods on the basename are ignored, so - `path.split_extension(".bashrc")` returns `(".bashrc", "")`. - - Args: - p: The path whose root and extension should be split. - - Returns: - A tuple `(root, ext)` such that the root is the path without the file - extension, and `ext` is the file extension (which, if non-empty, contains - the leading dot). The returned tuple always satisfies the relationship - `root + ext == p`. - """ - b = _basename(p) - last_dot_in_basename = b.rfind(".") - - # If there is no dot or the only dot in the basename is at the front, then - # there is no extension. - if last_dot_in_basename <= 0: - return (p, "") - - dot_distance_from_end = len(b) - last_dot_in_basename - return (p[:-dot_distance_from_end], p[-dot_distance_from_end:]) - -paths = struct( - basename = _basename, - dirname = _dirname, - is_absolute = _is_absolute, - join = _join, - normalize = _normalize, - relativize = _relativize, - replace_extension = _replace_extension, - split_extension = _split_extension, -) diff --git a/shim/lib/shell.bzl b/shim/lib/shell.bzl deleted file mode 100644 index 3e22ffaeb7ef2..0000000000000 --- a/shim/lib/shell.bzl +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# 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. - -"""Skylib module containing shell utility functions.""" - -def _array_literal(iterable): - """Creates a string from a sequence that can be used as a shell array. - - For example, `shell.array_literal(["a", "b", "c"])` would return the string - `("a" "b" "c")`, which can be used in a shell script wherever an array - literal is needed. - - Note that all elements in the array are quoted (using `shell.quote`) for - safety, even if they do not need to be. - - Args: - iterable: A sequence of elements. Elements that are not strings will be - converted to strings first, by calling `str()`. - - Returns: - A string that represents the sequence as a shell array; that is, - parentheses containing the quoted elements. - """ - return "(" + " ".join([_quote(str(i)) for i in iterable]) + ")" - -def _quote(s): - """Quotes the given string for use in a shell command. - - This function quotes the given string (in case it contains spaces or other - shell metacharacters.) - - Args: - s: The string to quote. - - Returns: - A quoted version of the string that can be passed to a shell command. - """ - return "'" + s.replace("'", "'\\''") + "'" - -def _powershell_quote(s): - """Quoting multiline strings for Powershell. - References: - 1. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-7.4 - 2. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7.4 - """ - return s.replace("`", "``").replace("\n", "`n").replace('"', '""').replace("$", "`$") - -shell = struct( - array_literal = _array_literal, - quote = _quote, - powershell_quote = _powershell_quote, -) diff --git a/shim/os/BUCK b/shim/os/BUCK deleted file mode 100644 index e98de580759ab..0000000000000 --- a/shim/os/BUCK +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -config_setting( - name = "linux-fedora", - constraint_values = [ - "prelude//os/constraints:linux", - "//os/linux/distro/constraints:fedora", - ], - visibility = ["PUBLIC"], -) - -config_setting( - name = "linux-ubuntu", - constraint_values = [ - "prelude//os/constraints:linux", - "//os/linux/distro/constraints:ubuntu", - ], - visibility = ["PUBLIC"], -) - -config_setting( - name = "macos-homebrew", - constraint_values = [ - "prelude//os/constraints:macos", - ], - visibility = ["PUBLIC"], -) diff --git a/shim/os/linux/distro/constraints/BUCK b/shim/os/linux/distro/constraints/BUCK deleted file mode 100644 index 9abe02eb55493..0000000000000 --- a/shim/os/linux/distro/constraints/BUCK +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -constraint_setting( - name = "distro", - visibility = ["PUBLIC"], -) - -constraint_value( - name = "fedora", - constraint_setting = ":distro", - visibility = ["PUBLIC"], -) - -constraint_value( - name = "ubuntu", - constraint_setting = ":distro", - visibility = ["PUBLIC"], -) diff --git a/shim/shims.bzl b/shim/shims.bzl deleted file mode 100644 index 38770d7250526..0000000000000 --- a/shim/shims.bzl +++ /dev/null @@ -1,423 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@bazel_skylib//lib:new_sets.bzl", "sets") -load("@bazel_skylib//lib:paths.bzl", "paths") -load("@prelude//utils:selects.bzl", "selects") -# @lint-ignore-every FBCODEBZLADDLOADS - -load("@prelude//utils:type_defs.bzl", "is_dict", "is_list", "is_select", "is_tuple") -load("@shim//build_defs:auto_headers.bzl", "AutoHeaders", "get_auto_headers") -load("@shim//build_defs/lib:oss.bzl", "translate_target") - -prelude = native - -_C_SOURCE_EXTS = ( - ".c", -) - -_CPP_SOURCE_EXTS = ( - ".cc", - ".cpp", -) - -_SOURCE_EXTS = _C_SOURCE_EXTS + _CPP_SOURCE_EXTS - -# These header suffixes are used to logically group C/C++ source (e.g. -# `foo/Bar.cpp`) with headers with the following suffixes (e.g. `foo/Bar.h` and -# `foo/Bar-inl.tcc`), such that the source provides all implementation for -# methods/classes declared in the headers. -# -# This is important for a couple reasons: -# 1) Automatic dependencies: Tooling can use this property to automatically -# manage TARGETS dependencies by extracting `#include` references in sources -# and looking up the rules which "provide" them. -# 2) Modules: This logical group can be combined into a standalone C/C++ module -# (when such support is available). -_HEADER_SUFFIXES = ( - ".h", - ".hpp", - ".tcc", - "-inl.h", - "-inl.hpp", - "-inl.tcc", - "-defs.h", - "-defs.hpp", - "-defs.tcc", -) - -CPP_UNITTEST_DEPS = [ - "shim//third-party/googletest:cpp_unittest_main", -] -CPP_FOLLY_UNITTEST_DEPS = [ - "folly//folly/test/common:test_main_lib", - "folly//folly/ext/buck2:test_ext", -] - -def _get_headers_from_sources(srcs): - """ - Return the headers likely associated with the given sources - - Args: - srcs: A list of strings representing files or build targets - - Returns: - A list of header files corresponding to the list of sources. These files are - validated to exist based on glob() - """ - split_srcs = [ - paths.split_extension(src_filename) - for src_filename in [_get_src_filename(src) for src in srcs] - if "//" not in src_filename and not src_filename.startswith(":") - ] - - # For e.g. foo.cpp grab a glob on foo.h, foo-inl.h, etc - headers = [ - base + header_ext - for base, ext in split_srcs - if ext in _SOURCE_EXTS - for header_ext in _HEADER_SUFFIXES - ] - - # Avoid a warning for an empty glob pattern if there are no headers. - return glob(headers) if headers else [] - -def _get_src_filename(src): - """ - Return filename from a potentilly tuple value entry in srcs attribute - """ - - if is_tuple(src): - s, _ = src - return s - return src - -def _update_headers_with_src_headers(src_headers, out_headers): - """ - Helper function to update raw headers with headers from srcs - """ - src_headers = sets.to_list(sets.difference(src_headers, sets.make(out_headers))) - - # Looks simple, right? But if a header is explicitly added in, say, a - # dictionary mapping, we want to make sure to keep the original mapping - # and drop the F -> F mapping - if is_list(out_headers): - out_headers.extend(sorted(src_headers)) - else: - # Let it throw AttributeError if update() can't be found neither - out_headers.update({k: k for k in src_headers}) - return out_headers - -def prebuilt_cpp_library( - headers = None, - linker_flags = None, - private_linker_flags = None, - **kwargs): - prelude.prebuilt_cxx_library( - exported_headers = headers, - exported_linker_flags = linker_flags, - linker_flags = private_linker_flags, - **kwargs - ) - -def cpp_library( - name, - deps = [], - srcs = [], - external_deps = [], - exported_deps = [], - exported_external_deps = [], - undefined_symbols = None, - visibility = ["PUBLIC"], - auto_headers = None, - arch_preprocessor_flags = None, - modular_headers = None, - os_deps = [], - arch_compiler_flags = None, - tags = None, - linker_flags = None, - private_linker_flags = None, - exported_linker_flags = None, - headers = None, - private_headers = None, - propagated_pp_flags = (), - **kwargs): - base_path = native.package_name() - oss_depends_on_folly = read_config("oss_depends_on", "folly", False) - header_base_path = base_path - if oss_depends_on_folly and header_base_path.startswith("folly"): - header_base_path = header_base_path.replace("folly/", "", 1) - - _unused = (undefined_symbols, arch_preprocessor_flags, modular_headers, arch_compiler_flags, tags, propagated_pp_flags) # @unused - if os_deps: - deps += _select_os_deps(_fix_dict_deps(os_deps)) - if headers == None: - headers = [] - if tags != None and "oss_dependency" in tags: - if oss_depends_on_folly: - headers = [item.replace("//:", "//folly:") if item == "//:folly-config.h" else item for item in headers] - if is_select(srcs) and auto_headers == AutoHeaders.SOURCES: - # Validate `srcs` and `auto_headers` before the config check - fail( - "//{}:{}: `select` srcs cannot support AutoHeaders.SOURCES".format(base_path, name), - ) - auto_headers = get_auto_headers(auto_headers) - if auto_headers == AutoHeaders.SOURCES and not is_select(srcs): - src_headers = sets.make(_get_headers_from_sources(srcs)) - if private_headers: - src_headers = sets.difference(src_headers, sets.make(private_headers)) - - headers = selects.apply( - headers, - partial(_update_headers_with_src_headers, src_headers), - ) - if not is_select(linker_flags): - linker_flags = linker_flags or [] - linker_flags = list(linker_flags) - if exported_linker_flags != None: - linker_flags += exported_linker_flags - prelude.cxx_library( - name = name, - srcs = srcs, - deps = _fix_deps(deps + external_deps_to_targets(external_deps)), - exported_deps = _fix_deps(exported_deps + external_deps_to_targets(exported_external_deps)), - visibility = visibility, - preferred_linkage = "static", - exported_headers = headers, - headers = private_headers, - exported_linker_flags = linker_flags, - linker_flags = private_linker_flags, - header_namespace = header_base_path, - **kwargs - ) - -def cpp_unittest( - deps = [], - external_deps = [], - visibility = ["PUBLIC"], - supports_static_listing = None, - allocator = None, - owner = None, - tags = None, - emails = None, - extract_helper_lib = None, - compiler_specific_flags = None, - default_strip_mode = None, - resources = {}, - **kwargs): - _unused = (supports_static_listing, allocator, owner, tags, emails, extract_helper_lib, compiler_specific_flags, default_strip_mode) # @unused - if read_config("oss", "folly_cxx_tests", True): - deps = deps + CPP_FOLLY_UNITTEST_DEPS - else: - deps = deps + CPP_UNITTEST_DEPS - - prelude.cxx_test( - deps = _fix_deps(deps + external_deps_to_targets(external_deps)), - visibility = visibility, - resources = _fix_resources(resources), - **kwargs - ) - -def cpp_binary( - deps = [], - external_deps = [], - visibility = ["PUBLIC"], - dlopen_enabled = None, - compiler_specific_flags = None, - os_linker_flags = None, - allocator = None, - modules = None, - **kwargs): - _unused = (dlopen_enabled, compiler_specific_flags, os_linker_flags, allocator, modules) # @unused - prelude.cxx_binary( - deps = _fix_deps(deps + external_deps_to_targets(external_deps)), - visibility = visibility, - **kwargs - ) - -def rust_library( - rustc_flags = [], - deps = [], - named_deps = None, - os_deps = None, - test_deps = None, - test_env = None, - test_os_deps = None, - autocargo = None, - unittests = None, - mapped_srcs = {}, - visibility = ["PUBLIC"], - **kwargs): - _unused = (test_deps, test_env, test_os_deps, named_deps, autocargo, unittests, visibility) # @unused - deps = _fix_deps(deps) - mapped_srcs = _maybe_select_map(mapped_srcs, _fix_mapped_srcs) - if os_deps: - deps += _select_os_deps(_fix_dict_deps(os_deps)) - - # Reset visibility because internal and external paths are different. - visibility = ["PUBLIC"] - - prelude.rust_library( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - mapped_srcs = mapped_srcs, - **kwargs - ) - -def rust_binary( - rustc_flags = [], - deps = [], - autocargo = None, - unittests = None, - allocator = None, - default_strip_mode = None, - visibility = ["PUBLIC"], - **kwargs): - _unused = (unittests, allocator, default_strip_mode, autocargo) # @unused - deps = _fix_deps(deps) - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - prelude.rust_binary( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - **kwargs - ) - -def rust_unittest( - rustc_flags = [], - deps = [], - visibility = ["PUBLIC"], - **kwargs): - deps = _fix_deps(deps) - - prelude.rust_test( - rustc_flags = rustc_flags + [_CFG_BUCK_BUILD], - deps = deps, - visibility = visibility, - **kwargs - ) - -def rust_protobuf_library( - name, - srcs, - build_script, - protos, - build_env = None, - deps = [], - test_deps = None, - doctests = True): - build_name = name + "-build" - proto_name = name + "-proto" - - rust_binary( - name = build_name, - srcs = [build_script], - crate_root = build_script, - deps = [ - "fbsource//third-party/rust:tonic-build", - "//buck2/app/buck2_protoc_dev:buck2_protoc_dev", - ], - ) - - build_env = build_env or {} - build_env.update( - { - "PROTOC": "$(exe shim//third-party/proto:protoc)", - "PROTOC_INCLUDE": "$(location shim//third-party/proto:google_protobuf)", - }, - ) - - prelude.genrule( - name = proto_name, - srcs = protos + [ - "shim//third-party/proto:google_protobuf", - ], - out = ".", - cmd = "$(exe :" + build_name + ")", - env = build_env, - ) - - rust_library( - name = name, - srcs = srcs, - doctests = doctests, - env = { - # This is where prost looks for generated .rs files - "OUT_DIR": "$(location :{})".format(proto_name), - }, - test_deps = test_deps, - deps = [ - "fbsource//third-party/rust:prost", - "fbsource//third-party/rust:prost-types", - ] + (deps or []), - ) - -def ocaml_binary( - deps = [], - visibility = ["PUBLIC"], - **kwargs): - deps = _fix_deps(deps) - - prelude.ocaml_binary( - deps = deps, - visibility = visibility, - **kwargs - ) - -_CFG_BUCK_BUILD = "--cfg=buck_build" - -def _maybe_select_map(v, mapper): - if is_select(v): - return select_map(v, mapper) - return mapper(v) - -def _select_os_deps(xss) -> Select: - d = { - "prelude//os:" + os: xs - for os, xs in xss - } - d["DEFAULT"] = [] - return select(d) - -def _fix_dict_deps(xss): - return [ - (k, _fix_deps(xs)) - for k, xs in xss - ] - -def _fix_mapped_srcs(xs: dict[str, str]): - # For reasons, this is source -> file path, which is the opposite of what - # it should be. - return {translate_target(k): v for (k, v) in xs.items()} - -def _fix_deps(xs): - if is_select(xs): - return select_map(xs, lambda child_targets: _fix_deps(child_targets)) - return map(translate_target, xs) - -def _fix_resources(resources): - if is_list(resources): - return [translate_target(r) for r in resources] - - if is_dict(resources): - return {k: translate_target(v) for k, v in resources.items()} - - fail("Unexpected type {} for resources".format(type(resources))) - -# Do a nasty conversion of e.g. ("supercaml", None, "ocaml-dev") to -# 'fbcode//third-party-buck/platform010/build/supercaml:ocaml-dev' -# (which will then get mapped to `shim//third-party/ocaml:ocaml-dev`). -def external_dep_to_target(t): - if type(t) == type(()): - return "fbcode//third-party-buck/platform010/build/{}:{}".format(t[0], t[2]) - else: - return "fbcode//third-party-buck/platform010/build/{}:{}".format(t, t) - -def external_deps_to_targets(ts): - return [external_dep_to_target(t) for t in ts] diff --git a/shim/target_determinator/macros/ci.bzl b/shim/target_determinator/macros/ci.bzl deleted file mode 100644 index 0c02e6fc3ab46..0000000000000 --- a/shim/target_determinator/macros/ci.bzl +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# https://internalfb.com/code/fbsource/fbcode/target_determinator/macros/README.md - -def _lbl(*_args): - return "" - -def _package( - _values, - # starlark-lint-disable unused-argument - overwrite = False): # @unused - pass - -ci = struct( - package = _package, - linux = _lbl, - mac = _lbl, - windows = _lbl, - skip_test = _lbl, - aarch64 = _lbl, - mode = _lbl, - opt = _lbl, -) diff --git a/shim/third-party/binutils/BUCK b/shim/third-party/binutils/BUCK deleted file mode 100644 index 8f25070f895b0..0000000000000 --- a/shim/third-party/binutils/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "iberty", - exported_linker_flags = ["-liberty"], - packages = { - "//os:linux-fedora": ["binutils-devel"], - "//os:linux-ubuntu": ["libiberty-dev"], - }, -) diff --git a/shim/third-party/boost/BUCK b/shim/third-party/boost/BUCK deleted file mode 100644 index f9ab497e41fd2..0000000000000 --- a/shim/third-party/boost/BUCK +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party/boost:boost.bzl", "boost_libs") - -oncall("open_source") - -boost_libs( - header_only = [ - "algorithm", - "interprocess", - "lexical_cast", - "multi_index", - "preprocessor", - "range", - "sort", - "variant", - ], - libraries = [ - "container", - "context", - "filesystem", - "program_options", - "random", - "regex", - "thread", - ], -) diff --git a/shim/third-party/boost/boost.bzl b/shim/third-party/boost/boost.bzl deleted file mode 100644 index 5fb6f3b64f367..0000000000000 --- a/shim/third-party/boost/boost.bzl +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -HOMEBREW_BREW = "boost" - -def boost_libs(libraries, header_only): - system_library( - name = "boost", - packages = { - "//os:linux-fedora": ["boost-devel"], - "//os:linux-ubuntu": ["libboost-all-dev"], - "//os:macos-homebrew": ["boost"], - }, - ) - - for library in libraries: - boost_library(library, False) - - for library in header_only: - boost_library(library, True) - -def boost_library(library: str, header_only: bool): - exported_linker_flags = [] if header_only else ["-lboost_{}".format(library)] - - system_library( - name = "boost_{}".format(library), - packages = { - "//os:linux-fedora": ["boost-devel"], - "//os:linux-ubuntu": ["libboost-{}-dev".format(library)], - "//os:macos-homebrew": ["boost"], - }, - exported_linker_flags = exported_linker_flags, - ) diff --git a/shim/third-party/brotli/BUCK b/shim/third-party/brotli/BUCK deleted file mode 100644 index fd7de2d707ad1..0000000000000 --- a/shim/third-party/brotli/BUCK +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -PACKAGES = { - "//os:linux-fedora": ["brotli-devel"], - "//os:linux-ubuntu": ["libbrotli-dev"], - "//os:macos-homebrew": ["brotli"], -} - -pkgconfig_system_library( - name = "brotli_decode", - packages = PACKAGES, - pkgconfig_name = "libbrotlidec", -) - -pkgconfig_system_library( - name = "brotli_encode", - packages = PACKAGES, - pkgconfig_name = "libbrotlienc", -) diff --git a/shim/third-party/bzip2/BUCK b/shim/third-party/bzip2/BUCK deleted file mode 100644 index 1ee23b853b5dc..0000000000000 --- a/shim/third-party/bzip2/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -prebuilt_cxx_library( - name = "pkgconfig_unsupported", - exported_linker_flags = select({ - "//os:linux-ubuntu": ["-lbz2"], - "DEFAULT": [], - }), - target_compatible_with = [ - "//os:linux-ubuntu", - ], - visibility = [], -) - -pkgconfig_system_library( - name = "bz2", - packages = { - "//os:linux-fedora": ["bzip2-devel"], - "//os:linux-ubuntu": ["libbz2-dev"], - "//os:macos-homebrew": ["bzip2"], - }, - pkgconfig_name = "bzip2", - unsupported = { - "//os:linux-ubuntu": [":pkgconfig_unsupported"], - }, -) diff --git a/shim/third-party/defs.bzl b/shim/third-party/defs.bzl deleted file mode 100644 index b35a0b3688d28..0000000000000 --- a/shim/third-party/defs.bzl +++ /dev/null @@ -1,157 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//third-party:pkgconfig.bzl", "external_pkgconfig_library") - -HOMEBREW_CONSTRAINT = "//os:macos-homebrew" - -def system_library( - name: str, - packages = None, - visibility = ["PUBLIC"], - deps = [], - exported_deps = [], - **kwargs): - system_packages_target_name = "__{}_system_pkgs".format(name) - packages = packages or dict() - packages["DEFAULT"] = [] - system_packages( - name = system_packages_target_name, - packages = select(packages), - ) - deps = deps + [":" + system_packages_target_name] - - brews = packages.get(HOMEBREW_CONSTRAINT) - if brews != None: - exported_deps = exported_deps + select({ - HOMEBREW_CONSTRAINT: _system_homebrew_targets(name, brews), - "DEFAULT": [], - }) - - native.prebuilt_cxx_library( - name = name, - visibility = visibility, - deps = deps, - exported_deps = exported_deps, - **kwargs - ) - -def pkgconfig_system_library( - name: str, - pkgconfig_name = None, - packages = None, - visibility = ["PUBLIC"], - deps = [], - exported_deps = [], - unsupported = dict(), - **kwargs): - system_packages_target_name = "__{}_system_pkgs".format(name) - packages = packages or dict() - packages["DEFAULT"] = [] - system_packages( - name = system_packages_target_name, - packages = select(packages), - ) - - deps = exported_deps + deps - - if len(unsupported) == 0: - external_pkgconfig_library( - name = name, - package = pkgconfig_name, - visibility = visibility, - deps = deps + [":" + system_packages_target_name], - **kwargs - ) - else: - exported_deps_select_map = {} - for constraint, constraint_exported_deps in unsupported.items(): - if constraint == HOMEBREW_CONSTRAINT: - brews = packages.get(constraint, []) - constraint_exported_deps = constraint_exported_deps + _system_homebrew_targets(name, brews) - - exported_deps_select_map[constraint] = constraint_exported_deps - - pkgconfig_target_name = "__{}_pkgconfig".format(name) - external_pkgconfig_library( - name = pkgconfig_target_name, - package = pkgconfig_name, - visibility = [], - deps = deps, - **kwargs - ) - exported_deps_select_map["DEFAULT"] = [":" + pkgconfig_target_name] - - native.prebuilt_cxx_library( - name = name, - visibility = visibility, - deps = [":" + system_packages_target_name], - exported_deps = select(exported_deps_select_map), - ) - -def _system_homebrew_targets( - name: str, - brews): - deps = [] - for brew in brews: - homebrew_target_name = "__{}_homebrew_{}".format(name, brew) - homebrew_library( - name = homebrew_target_name, - brew = brew, - ) - deps.append(":" + homebrew_target_name) - - return deps - -def _system_packages_impl(ctx: AnalysisContext) -> list[Provider]: - return [DefaultInfo()] - -system_packages = rule( - impl = lambda _ctx: [DefaultInfo()], - attrs = { - "deps": attrs.list(attrs.dep(), default = []), - "packages": attrs.list(attrs.string()), - }, -) - -def homebrew_library( - name: str, - brew: str, - homebrew_header_path = "include", - exported_preprocessor_flags = [], - exported_linker_flags = [], - target_compatible_with = ["//os:macos-homebrew"], - **kwargs): - preproc_flags_rule_name = "__{}__{}__preproc_flags".format(name, brew) - native.genrule( - name = preproc_flags_rule_name, - type = "homebrew_library_preproc_flags", - out = "out", - cmd = "echo \"-I`brew --prefix {}`/{}\" > $OUT".format(brew, homebrew_header_path), - target_compatible_with = target_compatible_with, - ) - - linker_flags_rule_name = "__{}__{}__linker_flags".format(name, brew) - native.genrule( - name = linker_flags_rule_name, - type = "homebrew_library_linker_flags", - out = "out", - cmd = "echo \"-L`brew --prefix {}`/lib\" > $OUT".format(brew), - target_compatible_with = target_compatible_with, - ) - - native.prebuilt_cxx_library( - name = name, - exported_preprocessor_flags = exported_preprocessor_flags + [ - "@$(location :{})/preproc_flags.txt".format(preproc_flags_rule_name), - ], - exported_linker_flags = exported_linker_flags + [ - "@$(location :{})/linker_flags.txt".format(linker_flags_rule_name), - ], - target_compatible_with = target_compatible_with, - **kwargs - ) diff --git a/shim/third-party/double_conversion/BUCK b/shim/third-party/double_conversion/BUCK deleted file mode 100644 index 750949b1c8c64..0000000000000 --- a/shim/third-party/double_conversion/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "double_conversion", - exported_linker_flags = ["-ldouble-conversion"], - packages = { - "//os:linux-fedora": ["double-conversion-devel"], - "//os:linux-ubuntu": ["libdouble-conversion-dev"], - "//os:macos-homebrew": ["double-conversion"], - }, -) diff --git a/shim/third-party/fast_float/BUCK b/shim/third-party/fast_float/BUCK deleted file mode 100644 index 35ce9db12848b..0000000000000 --- a/shim/third-party/fast_float/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "fast_float", - packages = { - "//os:linux-fedora": ["fast_float-devel"], - "//os:linux-ubuntu": ["libfast-float-dev"], - "//os:macos-homebrew": ["fast_float"], - }, -) diff --git a/shim/third-party/fmt/BUCK b/shim/third-party/fmt/BUCK deleted file mode 100644 index 024783475bc8d..0000000000000 --- a/shim/third-party/fmt/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "fmt", - packages = { - "//os:linux-fedora": ["fmt-devel"], - "//os:linux-ubuntu": ["libfmt-dev"], - "//os:macos-homebrew": ["fmt"], - }, -) diff --git a/shim/third-party/gflags/BUCK b/shim/third-party/gflags/BUCK deleted file mode 100644 index d6dac8a0d08ae..0000000000000 --- a/shim/third-party/gflags/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "gflags", - packages = { - "//os:linux-fedora": ["gflags-devel"], - "//os:linux-ubuntu": ["libgflags-dev"], - "//os:macos-homebrew": ["gflags"], - }, -) diff --git a/shim/third-party/glibc/BUCK b/shim/third-party/glibc/BUCK deleted file mode 100644 index eb46aa0cb7d12..0000000000000 --- a/shim/third-party/glibc/BUCK +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@shim//build_defs:prebuilt_cpp_library.bzl", "prebuilt_cpp_library") - -oncall("open_source") - -prebuilt_cpp_library(name = "glibc") - -alias( - name = "rt", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "ct", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "dl", - actual = ":glibc", - visibility = ["PUBLIC"], -) - -alias( - name = "pthread", - actual = ":glibc", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/glog/BUCK b/shim/third-party/glog/BUCK deleted file mode 100644 index 830b1dd11ba42..0000000000000 --- a/shim/third-party/glog/BUCK +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "glog", - packages = { - "//os:linux-fedora": ["glog-devel"], - "//os:linux-ubuntu": ["libgoogle-glog-dev"], - "//os:macos-homebrew": ["glog"], - }, - pkgconfig_name = "libglog", - exported_deps = [ - "//third-party/gflags:gflags", - ], -) diff --git a/shim/third-party/googletest/BUCK b/shim/third-party/googletest/BUCK deleted file mode 100644 index 89fed880abc42..0000000000000 --- a/shim/third-party/googletest/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "gtest", - packages = { - "//os:linux-fedora": ["gtest-devel"], - "//os:linux-ubuntu": ["libgtest-dev"], - "//os:macos-homebrew": ["googletest"], - }, -) - -pkgconfig_system_library( - name = "gmock", - packages = { - "//os:linux-fedora": ["gmock-devel"], - "//os:linux-ubuntu": ["libgmock-dev"], - "//os:macos-homebrew": ["googletest"], - }, -) - -cxx_library( - name = "cpp_unittest_main", - srcs = ["gtest_main.cpp"], - visibility = ["PUBLIC"], - deps = [":gtest"], -) diff --git a/shim/third-party/googletest/gtest_main.cpp b/shim/third-party/googletest/gtest_main.cpp deleted file mode 100644 index 8141caf4ca086..0000000000000 --- a/shim/third-party/googletest/gtest_main.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "gtest/gtest.h" - -#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32) || \ - (defined(GTEST_OS_NRF52) && defined(ARDUINO)) -// Arduino-like platforms: program entry points are setup/loop instead of main. - -#ifdef GTEST_OS_ESP8266 -extern "C" { -#endif - -void setup() { testing::InitGoogleTest(); } - -void loop() { RUN_ALL_TESTS(); } - -#ifdef GTEST_OS_ESP8266 -} -#endif - -#elif defined(GTEST_OS_QURT) -// QuRT: program entry point is main, but argc/argv are unusable. - -GTEST_API_ int main() { - printf("Running main() from %s\n", __FILE__); - testing::InitGoogleTest(); - return RUN_ALL_TESTS(); -} -#else -// Normal platforms: program entry point is main, argc/argv are initialized. - -GTEST_API_ int main(int argc, char **argv) { - printf("Running main() from %s\n", __FILE__); - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -#endif diff --git a/shim/third-party/jemalloc/BUCK b/shim/third-party/jemalloc/BUCK deleted file mode 100644 index 04cdb0c6c0465..0000000000000 --- a/shim/third-party/jemalloc/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "headers", - packages = { - "//os:linux-fedora": ["jemalloc-devel"], - "//os:linux-ubuntu": ["libjemalloc-dev"], - "//os:macos-homebrew": ["jemalloc"], - }, - pkgconfig_name = "jemalloc", -) diff --git a/shim/third-party/jvm/BUCK b/shim/third-party/jvm/BUCK deleted file mode 100644 index 88188c51c7fe9..0000000000000 --- a/shim/third-party/jvm/BUCK +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "jvm", - packages = { - "//os:macos-homebrew": ["openjdk"], - }, -) diff --git a/shim/third-party/libaegis/BUCK b/shim/third-party/libaegis/BUCK deleted file mode 100644 index 4d49fa66e261c..0000000000000 --- a/shim/third-party/libaegis/BUCK +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -oncall("open_source") - -git_fetch( - name = "libaegis.git", - repo = "https://github.com/jedisct1/libaegis.git", - rev = "9c7677d742aaae312e09b1574998acba620188d8", # tag 0.1.23 -) - -genrule( - name = "libaegis-cmake", - out = "out", - cmd = "cmake -DCMAKE_INSTALL_PREFIX=$OUT $(location :libaegis.git) && make install", -) - -prebuilt_cxx_library( - name = "aegis", - exported_linker_flags = [ - "-L$(location :libaegis-cmake)/lib64", - "-laegis", - ], - exported_preprocessor_flags = ["-I$(location :libaegis-cmake)/include"], - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/libaio/BUCK b/shim/third-party/libaio/BUCK deleted file mode 100644 index 65aef8962145d..0000000000000 --- a/shim/third-party/libaio/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "aio", - exported_linker_flags = ["-laio"], - packages = { - "//os:linux-fedora": ["libaio-devel"], - "//os:linux-ubuntu": ["libaio-dev"], - "//os:macos-homebrew": ["libaio"], - }, -) diff --git a/shim/third-party/libdwarf/BUCK b/shim/third-party/libdwarf/BUCK deleted file mode 100644 index 07efec9cd0105..0000000000000 --- a/shim/third-party/libdwarf/BUCK +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -prebuilt_cxx_library( - name = "pkgconfig_unsupported", - exported_preprocessor_flags = select({ - "//os:linux-ubuntu": ["-I/usr/include/libdwarf"], - "DEFAULT": [], - }), - target_compatible_with = [ - "//os:linux-ubuntu", - ], - visibility = [], -) - -pkgconfig_system_library( - name = "dwarf", - packages = { - "//os:linux-fedora": ["libdwarf-devel"], - "//os:linux-ubuntu": ["libdwarf-dev"], - "//os:macos-homebrew": ["libdwarf"], - }, - pkgconfig_name = "libdwarf", - unsupported = { - "//os:linux-ubuntu": [":pkgconfig_unsupported"], - }, -) diff --git a/shim/third-party/libevent/BUCK b/shim/third-party/libevent/BUCK deleted file mode 100644 index b69201e42c0b7..0000000000000 --- a/shim/third-party/libevent/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "libevent", - packages = { - "//os:linux-fedora": ["libevent-devel"], - "//os:linux-ubuntu": ["libevent-dev"], - "//os:macos-homebrew": ["libevent"], - }, -) diff --git a/shim/third-party/libgcc/BUCK b/shim/third-party/libgcc/BUCK deleted file mode 100644 index c95eb4209e61c..0000000000000 --- a/shim/third-party/libgcc/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "stdc++fs", - packages = { - "//os:linux-fedora": ["gcc"], - "//os:linux-ubuntu": ["gcc"], - "//os:macos-homebrew": ["gcc"], - }, -) diff --git a/shim/third-party/liboqs/BUCK b/shim/third-party/liboqs/BUCK deleted file mode 100644 index 74e4d23c70d19..0000000000000 --- a/shim/third-party/liboqs/BUCK +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -prebuilt_cxx_library( - name = "pkgconfig_unsupported", - target_compatible_with = [ - "//os:linux-ubuntu", - ], - visibility = [], -) - -pkgconfig_system_library( - name = "oqs", - packages = { - "//os:linux-fedora": ["liboqs-devel"], - "//os:macos-homebrew": ["liboqs"], - }, - pkgconfig_name = "liboqs", - unsupported = { - "//os:linux-ubuntu": [":pkgconfig_unsupported"], - }, -) diff --git a/shim/third-party/libsodium/BUCK b/shim/third-party/libsodium/BUCK deleted file mode 100644 index 915fb8bc4c5af..0000000000000 --- a/shim/third-party/libsodium/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "sodium", - packages = { - "//os:linux-fedora": ["libsodium-devel"], - "//os:linux-ubuntu": ["libsodium"], - "//os:macos-homebrew": ["libsodium-dev"], - }, - pkgconfig_name = "libsodium", -) diff --git a/shim/third-party/libunwind/BUCK b/shim/third-party/libunwind/BUCK deleted file mode 100644 index 67375ea8bc1d1..0000000000000 --- a/shim/third-party/libunwind/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "unwind", - packages = { - "//os:linux-fedora": ["libunwind-devel"], - "//os:linux-ubuntu": ["libunwind-dev"], - "//os:macos-homebrew": ["libunwind"], - }, - pkgconfig_name = "libunwind", -) diff --git a/shim/third-party/liburing/BUCK b/shim/third-party/liburing/BUCK deleted file mode 100644 index a2810945e1f19..0000000000000 --- a/shim/third-party/liburing/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "uring", - packages = { - "//os:linux-fedora": ["liburing-devel"], - "//os:linux-ubuntu": ["liburing-dev"], - "//os:macos-homebrew": ["liburing"], - }, - pkgconfig_name = "liburing", -) diff --git a/shim/third-party/lz4/BUCK b/shim/third-party/lz4/BUCK deleted file mode 100644 index 553bbd086bf59..0000000000000 --- a/shim/third-party/lz4/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "lz4", - packages = { - "//os:linux-fedora": ["lz4-devel"], - "//os:linux-ubuntu": ["liblz4-dev"], - "//os:macos-homebrew": ["lz4"], - }, - pkgconfig_name = "liblz4", -) diff --git a/shim/third-party/macros/rust_third_party.bzl b/shim/third-party/macros/rust_third_party.bzl deleted file mode 100644 index f6a0bd3d227ca..0000000000000 --- a/shim/third-party/macros/rust_third_party.bzl +++ /dev/null @@ -1,11 +0,0 @@ -# @nolint - -def third_party_rust_prebuilt_cxx_library(name, **kwargs): - # FIXME: This should probably be a fixup.toml, but it currently can't be expressed. - # The windows-sys crate does -lwindows to find windows. We pass libwindows.a on the command line, - # which resolves the symbols, but the linker still needs to "find" windows, so we also put its - # directory on the link options. - if name.endswith("libwindows.a"): - kwargs["exported_linker_flags"] = ["-Lshim/third-party/rust/" + kwargs["static_lib"].rpartition("/")[0]] - - native.prebuilt_cxx_library(name = name, **kwargs) diff --git a/shim/third-party/ocaml/BUCK b/shim/third-party/ocaml/BUCK deleted file mode 100644 index 2343d7b5ee9fa..0000000000000 --- a/shim/third-party/ocaml/BUCK +++ /dev/null @@ -1,7 +0,0 @@ -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -prebuilt_cxx_library( - name = "ocaml-dev", - header_dirs = ["opam/lib/ocaml"], - header_only = True, - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/ocaml/opam/lib/ocaml b/shim/third-party/ocaml/opam/lib/ocaml deleted file mode 100644 index 8bd17a7ca8148..0000000000000 --- a/shim/third-party/ocaml/opam/lib/ocaml +++ /dev/null @@ -1 +0,0 @@ -# Fake file so that buck2 can run in non-ocamlrep repos diff --git a/shim/third-party/openssl/BUCK b/shim/third-party/openssl/BUCK deleted file mode 100644 index beefbd19d2f6c..0000000000000 --- a/shim/third-party/openssl/BUCK +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "ssl", - packages = { - "//os:linux-fedora": ["openssl-devel"], - "//os:linux-ubuntu": ["libssl-dev"], - "//os:macos-homebrew": ["openssl"], - }, - pkgconfig_name = "openssl", -) - -alias( - name = "crypto", - actual = ":ssl", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/proto/BUCK b/shim/third-party/proto/BUCK deleted file mode 100644 index d8381b74dc03c..0000000000000 --- a/shim/third-party/proto/BUCK +++ /dev/null @@ -1,21 +0,0 @@ -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -load(":defs.bzl", "protoc_distribution") - -protoc_distribution( - name = "distribution", - version = "21.4", -) - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -alias( - name = "protoc", - actual = ":distribution[protoc]", - visibility = ["PUBLIC"], -) - -# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." -alias( - name = "google_protobuf", - actual = ":distribution[google_protobuf]", - visibility = ["PUBLIC"], -) diff --git a/shim/third-party/proto/defs.bzl b/shim/third-party/proto/defs.bzl deleted file mode 100644 index 18938c5a7fd73..0000000000000 --- a/shim/third-party/proto/defs.bzl +++ /dev/null @@ -1,105 +0,0 @@ -load("@prelude//http_archive/exec_deps.bzl", "HttpArchiveExecDeps") -load(":releases.bzl", "releases") - -ProtocReleaseInfo = provider(fields = [ - "version", - "url", - "sha256", -]) - -def _get_protoc_release( - version: str, - platform: str) -> ProtocReleaseInfo: - if not version in releases: - fail("Unknown protoc release version '{}'. Available versions: {}".format( - version, - ", ".join(releases.keys()), - )) - protoc_version = releases[version] - artifact = "protoc-{}-{}.zip".format(version, platform) - if not artifact in protoc_version: - fail("Unsupported platform '{}'. Available artifacts: {}".format( - platform, - ", ".join(protoc_version.keys()), - )) - protoc_artifact = protoc_version[artifact] - return ProtocReleaseInfo( - version = version, - url = protoc_artifact["url"], - sha256 = protoc_artifact["sha256"], - ) - -def _turn_http_archive_into_protoc_distribution( - providers: ProviderCollection, - protoc_filename: str) -> list[Provider]: - downloads = providers[DefaultInfo].sub_targets - include = downloads["include"][DefaultInfo] - protoc = downloads[protoc_filename][DefaultInfo] - - return [DefaultInfo( - sub_targets = { - "google_protobuf": [include], - "protoc": [ - protoc, - RunInfo(args = protoc.default_outputs[0]), - ], - }, - )] - -def _download_protoc_distribution_impl(ctx: AnalysisContext) -> Promise: - protoc_filename = "bin/protoc" + ctx.attrs.exe_extension - - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - return ctx.actions.anon_target(native.http_archive, { - "exec_deps": ctx.attrs._http_archive_exec_deps, - "sha256": ctx.attrs.sha256, - "sub_targets": [ - protoc_filename, - "include", - ], - "urls": [ctx.attrs.url], - }).promise.map(lambda providers: _turn_http_archive_into_protoc_distribution( - providers = providers, - protoc_filename = protoc_filename, - )) - -download_protoc_distribution = rule( - impl = _download_protoc_distribution_impl, - attrs = { - "exe_extension": attrs.string(), - "sha256": attrs.string(), - "url": attrs.string(), - "_http_archive_exec_deps": attrs.default_only(attrs.exec_dep(providers = [HttpArchiveExecDeps], default = "prelude//http_archive/tools:exec_deps")), - }, -) - -def _host_platform(): - os = host_info().os - arch = host_info().arch - if os.is_linux and arch.is_x86_64: - return "linux-x86_64" - elif os.is_linux and arch.is_aarch64: - return "linux-aarch_64" - elif os.is_macos and arch.is_x86_64: - return "osx-x86_64" - elif os.is_macos and arch.is_aarch64: - return "osx-aarch_64" - elif os.is_windows and arch.is_x86_64: - return "win64" - else: - fail("Unknown platform: os={}, arch={}".format(os, arch)) - -def protoc_distribution( - name: str, - version: str, - platform: [None, str] = None): - if platform == None: - platform = _host_platform() - exe_extension = ".exe" if platform.startswith("win") else "" - release = _get_protoc_release(version, platform) - download_protoc_distribution( - name = name, - url = release.url, - sha256 = release.sha256, - exe_extension = exe_extension, - ) diff --git a/shim/third-party/proto/releases.bzl b/shim/third-party/proto/releases.bzl deleted file mode 100644 index 153ca496e4c99..0000000000000 --- a/shim/third-party/proto/releases.bzl +++ /dev/null @@ -1,46 +0,0 @@ -# @generated -# Update with ./update.py > releases.bzl -releases = { - "21.4": { - "protoc-21.4-win32.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win32.zip", - "sha256": "09760ff98f76ac30c8bca7433715c47161fe305bf41573a7cd00b0afcc518617" - }, - "protoc-21.4-osx-x86_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-x86_64.zip", - "sha256": "27ac01aee3e8b95ebec017b7b3aee55d4eb095cbd2a5148d2a20350af006072e" - }, - "protoc-21.4-osx-universal_binary.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-universal_binary.zip", - "sha256": "0cf1a340d1fa1366cdf22043e3f92e5374096647037020b405acea706438c603" - }, - "protoc-21.4-osx-aarch_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-osx-aarch_64.zip", - "sha256": "6a677c88a5e5b032aaff96767461788a316408d4ed0afef3f1455390a689ec18" - }, - "protoc-21.4-linux-x86_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_64.zip", - "sha256": "d51e8f030162f08823a4738ab0ac00bee537e30b583a562e6962dbb040d86736" - }, - "protoc-21.4-linux-x86_32.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_32.zip", - "sha256": "2101e3a4dd490625c15d31274a599e3bfb1f8c9fdd381ca9501da17bb6f7a3d2" - }, - "protoc-21.4-linux-s390_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-s390_64.zip", - "sha256": "e0b69b4242bf409c825d787669a4683d63320d6e52280750df971a3376e0af56" - }, - "protoc-21.4-linux-ppcle_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-ppcle_64.zip", - "sha256": "58c1be8ca89b8b2712f95a9dd9aeb174f8f479be9f55e71f6ffe0b0e83ef8be9" - }, - "protoc-21.4-linux-aarch_64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-aarch_64.zip", - "sha256": "5a377b505cf8c3ed29ad0b6e3827c5eb27273c00147fcfd833b9686192143e8d" - }, - "protoc-21.4-win64.zip": { - "url": "https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-win64.zip", - "sha256": "090af381392abaf5fd8ae3070d8fc2a4ba2d0a9f8e52915d69b439c33be72da5" - } - } -} diff --git a/shim/third-party/proto/update.py b/shim/third-party/proto/update.py deleted file mode 100755 index cfee489f671ea..0000000000000 --- a/shim/third-party/proto/update.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python3 -"""Query recent Github release artifacts for protobuf. - -Use this script to update the releases.bzl file that contains metadata about -protoc releases. - -This script is not executed during the regular Buck2 build. -""" - -import aiohttp -import asyncio -from contextlib import asynccontextmanager -from copy import deepcopy -from gql import gql, Client -from gql.transport.aiohttp import AIOHTTPTransport -import hashlib -import json -import os - -GITHUB_GRAPHQL_URI = "https://api.github.com/graphql" -GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN") -GITHUB_QUERY = """\ -query { - repository(owner: "protocolbuffers", name: "protobuf") { - releases(last: 1) { - nodes { - tagName - releaseAssets(first: 100) { - nodes { - name - downloadUrl - } - } - } - } - } -} -""" - -async def query_releases(): - async with aiohttp.ClientSession(raise_for_status=True) as session: - assert GITHUB_TOKEN is not None, "Provide a Github API token in $GITHUB_TOKEN" - headers = {'Authorization': f'bearer {GITHUB_TOKEN}'} - body = {"query": GITHUB_QUERY} - async with session.post(GITHUB_GRAPHQL_URI, headers=headers, json=body) as resp: - response = await resp.json() - return response["data"] - - -def format_releases(releases): - return { - release["tagName"].strip("v"): { - asset["name"]: { - "url": asset["downloadUrl"], - } - for asset in release["releaseAssets"]["nodes"] - if asset["name"].startswith("protoc-") - } - for release in releases["repository"]["releases"]["nodes"] - } - - -async def fetch_sha256(session, url): - async with session.get(url) as resp: - hasher = hashlib.sha256() - async for chunk, _ in resp.content.iter_chunks(): - hasher.update(chunk) - return hasher.hexdigest() - - -async def hash_releases(releases): - async def hash_asset(session, version, name, url): - sha256 = await fetch_sha256(session, url) - return (version, name, sha256) - - tasks = [] - async with aiohttp.ClientSession() as session: - for version, assets in releases.items(): - for name, asset in assets.items(): - tasks.append(hash_asset(session, version, name, asset["url"])) - - result = deepcopy(releases) - hashes = await asyncio.gather(*tasks) - for version, name, sha256 in hashes: - result[version][name]["sha256"] = sha256 - - return result - - -async def main(): - releases = await query_releases() - formatted = format_releases(releases) - with_sha256 = await hash_releases(formatted) - print("# @" + "generated") - print("# Update with ./update.py > releases.bzl") - print("releases = ", json.dumps(with_sha256, indent=4)) - - -asyncio.run(main()) diff --git a/shim/third-party/python/BUCK b/shim/third-party/python/BUCK deleted file mode 100644 index d87d251b4f712..0000000000000 --- a/shim/third-party/python/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "python", - packages = { - "//os:linux-fedora": ["python3-devel"], - "//os:linux-ubuntu": ["python3-dev"], - "//os:macos-homebrew": ["python3"], - }, - pkgconfig_name = "python3", -) diff --git a/shim/third-party/range-v3/BUCK b/shim/third-party/range-v3/BUCK deleted file mode 100644 index b81a4de31cc3b..0000000000000 --- a/shim/third-party/range-v3/BUCK +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "system_library") - -oncall("open_source") - -system_library( - name = "range-v3", - packages = { - "//os:linux-fedora": ["range-v3-devel"], - "//os:linux-ubuntu": ["librange-v3-dev"], - "//os:macos-homebrew": ["range-v3"], - }, -) diff --git a/shim/third-party/rust/.gitignore b/shim/third-party/rust/.gitignore deleted file mode 100644 index c18f3dc437a24..0000000000000 --- a/shim/third-party/rust/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# Ignore Cargo-related stuff -.cargo/registry -.cargo/git -/registry -/git -.package-cache - -# Various cruft in vendored packages -vendor/*/target -vendor/*/Cargo.lock -vendor/**/.buckconfig -vendor/**/BUCK -vendor/**/OWNERS -vendor/**/*~ -vendor/**/*.bzl -vendor/*/.github/** -vendor/*/.appveyor.yml -vendor/*/.travis.yml -/target/** - -# Bad Windows names - oh for case-insensitive regex matching! -vendor/**/[Aa][Uu][Xx] -vendor/**/[Aa][Uu][Xx].* -vendor/**/[Cc][Oo][Mm][1-9] -vendor/**/[Cc][Oo][Mm][1-9].* -vendor/**/[Cc][Oo][Nn] -vendor/**/[Cc][Oo][Nn].* -vendor/**/[Ll][Pp][Tt][1-9] -vendor/**/[Ll][Pp][Tt][1-9].* -vendor/**/[Nn][Uu][Ll] -vendor/**/[Nn][Uu][Ll].* diff --git a/shim/third-party/rust/Cargo.toml b/shim/third-party/rust/Cargo.toml deleted file mode 100644 index 903e5fcb1c36a..0000000000000 --- a/shim/third-party/rust/Cargo.toml +++ /dev/null @@ -1,238 +0,0 @@ -# Definitions of third-party libraries used for buck2 build of buck2. -# This file is **not** used by cargo build of buck2. -# See the /docs/bootstrapping.md for more details. - -[workspace] - -[package] -# Pseudo-package whose dependencies are imported and buckified -name = "rust-third-party" -version = "0.0.0" -publish = false -edition = "2021" - -# Dummy target to keep Cargo happy -[[bin]] -name = "top" -path = "top/main.rs" - -# List of packages to be imported, with version constraints, features -# and all options Cargo supports. -[dependencies] - -gazebo = {version = "0.8.1", features = ["str_pattern_extensions"]} -fbinit = "0.2" -sorted_vector_map = "0.2" -watchman_client = "0.8.0" - -annotate-snippets = { version = "0.9.0", features = ["color"] } -anyhow = "1.0.65" -anymap = "0.12.1" -arc-swap = "1.6.0" -argfile = "0.1.0" -assert_matches = "1.5" -async-compression = { version = "0.4.1", features = ["tokio", "gzip", "zstd"] } -async-condvar-fair = { version = "0.2.2", features = ["parking_lot_0_11", "tokio"] } -async-recursion = "1.0" -async-scoped = { version = "0.8", features = ["use-tokio"] } -async-trait = "0.1.24" -atomic = "0.5.1" -backtrace = "0.3.51" -base64 = "0.21.7" -bincode = "1.3.3" -bitflags = "2.4" -blake3 = { version = "1.3.1", features = [ "default", "digest", "rayon", "std", "traits-preview" ] } -bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] } -bumpalo = { version = "3.14.0", features = ["allocator_api", "collections"] } -byteorder = "1.4.3" -bytes = "1.0" -bytesize = "1.1.0" -chrono = "0.4.28" -clap = { package = "clap", version = "4.5.4", features = ["derive", "env", "string"] } -clap-3 = { package = "clap", version = "3.2.24", features = ["derive", "env", "regex", "unicode", "wrap_help"] } -clap_complete = { package = "clap_complete", version = "4.5.1" } -common-path = "1.0.0" -compact_str = "0.6.1" -constant_time_eq = "0.2.4" -convert_case = "0.4.0" -criterion = { version = "0.3.1", features = [] } -crossbeam = "0.8" -crossbeam-channel = "0.5" -crossbeam-epoch = "0.9.7" -crossterm = "0.27" -csv = "1.1" -ctor = "0.1.16" -dashmap = "5.5.3" -debugserver-types = "0.5.0" -derivative = "2.2" -derive_more = { version = "1.0.0", features = ["full"] } -digest = "0.10" -dirs = "3.0.1" -dunce = "1.0.2" -either = "1.8" -elf = "0.7.4" -enum-iterator = "1.4.1" -enum-map = "0.6.3" -env_logger = "0.9.0" -equivalent = "1.0.0" -erased-serde = "0.3.20" -faccess = "0.2.3" -fancy-regex = "0.10.0" -flate2 = "1.0.22" -fnv = "1.0.7" -fs4 = { version = "0.6", features = ["sync"] } -futures = { version = "0.3.28", features = ["async-await", "compat"] } -futures-intrusive = "0.4" -fxhash = "0.2.1" -glob = "0.3.0" -globset = "0.4.10" -hashbrown = { version = "0.14.3", features = ["raw"] } -hex = "0.4.3" -higher-order-closure = "0.0.5" -hostname = "0.3.1" -http = "0.2" -httparse = "1.7.1" -httptest = "0.15" -humantime = "2.0.1" -hyper = { version = "0.14.26", features = ["client", "http1", "http2"] } -hyper-proxy = { git = "https://github.com/get9/hyper-proxy", rev = "205e9fee42d469444d654d9fa207897f4a77d5b6", features = ["rustls"], default_features = false } # branch = tokio-rustls-0.23 Many PRs to bump versions (#28, #30, #31) are several years old, possibly abandoned crate. This fork contains changes from #28 + changes to upgrade rustls to 0.21. -hyper-rustls = { version = "0.24.0", features = ["http2"] } -hyper-timeout = "0.4" -hyper-unix-connector = "0.2" -indent_write = "2.2.0" -indenter = "0.3.3" -indexmap = { version = "2.1.0", features = ["arbitrary", "rayon", "serde"] } -indoc = "1.0.3" -inferno = { version = "0.11.11", default-features = false } -internment = { version = "0.7", features = ["arc"] } -inventory = "0.3.8" -ipnetwork = "0.20.0" -is_proc_translated = "0.1.1" -itertools = "0.10.3" -jemallocator = { version = "0.5.0", features = ["profiling"] } -lalrpop = { version = "0.19.7", artifact = "bin", features = ["pico-args"] } -lalrpop-util = "0.19.7" -libc = "0.2.132" -linked-hash-map = { version = "0.5", features = ["serde_impl"] } -linkme = { version = "0.3.17", features = ["used_linker"] } -log = "0.4" -logos = "0.12" -lru = "0.12.3" -lsp-server = "0.7.2" -lsp-types = "0.94.1" -maplit = "1.0.2" -mappable-rc = { version = "0.1.1", features = ["std"] } -md-5 = "0.10" -memchr = "2.4.1" -memmap2 = "0.5.0" -memoffset = "0.6.4" -multimap = "0.8.2" -nix = "0.22" -nom = "7.1.3" -notify = "=5.0.0-pre.16" -num-bigint = "0.4.3" -num-traits = "0.2" -num_cpus = "1.11" -num_enum = "0.5" -object = "0.29.0" -oid-registry = "0.6.1" -once_cell = "1.8" -os_str_bytes = { version = "6.6.0", features = ["conversions"] } -parking_lot = { version = "0.11.2", features = ["send_guard"] } -paste = "1.0" -pathdiff = "0.2" -perf-event = "0.4" -perf-event-open-sys = "4.0" -pin-project = "0.4.29" -plist = "0.5" -pretty_assertions = "1.2.1" -proc-macro2 = { version = "1.0.70", features = ["span-locations"] } -prost = "0.11.9" -prost-build = "0.11.9" -prost-derive = "0.11.9" -prost-types = "0.11.9" -protoc-bin-vendored = "3.0.0" -psutil = "3.2" -quote = "1.0.3" -rand = { version = "0.8.4", features = ["small_rng"] } -rand_chacha = "0.3" -rand_distr = "0.4" -ref-cast = "1.0.0" -regex = "1.5.4" -relative-path = { version = "1.7.0", features = ["serde"] } -ring = "=0.17.5" # Upgrading this is possible, but a pain, so we don't want to pick up every new minor version -rusqlite = { version = "0.29.0", features = ["bundled"] } -rustc-hash = "1.1.0" -rustls = "0.21.0" -rustls-native-certs = { package = "rustls-native-certs", version = "0.6.2" } -rustls-pemfile = { package = "rustls-pemfile", version = "1.0.0" } -rustyline = "11.0" -scopeguard = "1.0.0" -sequence_trie = "0.3.6" -serde = { version = "1.0.173", features = ["derive", "rc"] } -serde_json = { version = "1.0.48", features = ["raw_value"] } -sha1 = "0.10" -sha2 = "0.10" -shlex = "1.3" -similar = { version = "2.2.0", features = ["inline"] } -siphasher = "0.3.3" -slab = "0.4.7" -slog = "2.7.0" -smallvec = { version = "1.10", features = ["const_generics", "const_new", "serde", "specialization", "union", "write"] } -static_assertions = "1.1.0" -strsim = "0.10.0" -structopt = "0.3.23" -strum = { version = "0.26.2", features = ["derive", "strum_macros"] } -syn = { version = "2", features = ["extra-traits", "full", "visit"] } -syn1 = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } -synstructure = "0.12" -sync_wrapper = "0.1.0" -sys-info = "0.9.1" -sysinfo = "0.30.11" -take_mut = "0.2.2" -tar = "0.4.38" -tempfile = "3.1.0" -termimad = "0.20.1" -termios = "0.3" -termwiz = "0.18" -test-case = "3.1.0" -textwrap = { version = "0.11", features = ["term_size"] } -thiserror = "1.0.36" -threadpool = "1.8.1" -tokio = { version = "1.25.0", features = ["full", "test-util", "tracing"] } -tokio-rustls = { package = "tokio-rustls", version = "0.24.0", features = ["dangerous_configuration"] } -tokio-stream = { version = "0.1.14", features = ["fs", "io-util", "net", "sync", "time", "signal"] } -tokio-util = { version = "0.6", features = ["full"] } -toml = "0.5" -tonic = { version = "0.9.2", features = ["tls", "tls-webpki-roots"] } -tonic-build = { version = "0.9.2", features = ["prost", "cleanup-markdown"] } -tower = "0.4" -tower-layer = "0.3.1" -tower-service = "0.3.2" -tracing = "0.1.22" -tracing-core = "0.1.32" -tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } -triomphe = "0.1.11" -trybuild = "1.0.56" -typed-arena = "2.0" -twox-hash = "1.6.1" -unicode-segmentation = "1.7" -uuid = { version = "1.2", features = ["v4"] } -walkdir = "2.3.2" -which = "4.3.0" -whoami = "1.5.1" -windows_x86_64_msvc = "=0.48.0" # our fixup only works if we are on precisely 0.48.0 -winapi = { version = "0.3", features = ["everything", "std"] } -x509-parser = { version = "0.14.0", features = ["verify"] } -xattr = "0.2.2" -zip = "0.5" -zstd = "0.13.0" - -[patch.crates-io] -# For https://github.com/jimblandy/perf-event/pull/29 -perf-event = { git = "https://github.com/krallin/perf-event.git", rev = "86224a9bc025d5d19f719542f27c8c629a08b167", version = "0.4" } -perf-event-open-sys = { git = "https://github.com/krallin/perf-event.git", rev = "86224a9bc025d5d19f719542f27c8c629a08b167", version = "4.0" } - -# Windows-specific dependencies -[target."cfg(windows)".dependencies] -winver = "1" diff --git a/shim/third-party/rust/defs.bzl b/shim/third-party/rust/defs.bzl deleted file mode 100644 index 6d295fdd565ce..0000000000000 --- a/shim/third-party/rust/defs.bzl +++ /dev/null @@ -1,7 +0,0 @@ -def rust_library_from_crates(name): - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.export_file(name = name, src = "BUCK", visibility = ["PUBLIC"]) - -def rust_binary_from_crates(name): - # @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." - native.genrule(name = name, cmd = "exit 1", executable = True, out = "out", visibility = ["PUBLIC"]) diff --git a/shim/third-party/rust/fixups/ahash/fixups.toml b/shim/third-party/rust/fixups/ahash/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/ahash/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/anyhow/fixups.toml b/shim/third-party/rust/fixups/anyhow/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/anyhow/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/async-trait/fixups.toml b/shim/third-party/rust/fixups/async-trait/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/async-trait/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/atomic/fixups.toml b/shim/third-party/rust/fixups/atomic/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/atomic/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/axum-core/fixups.toml b/shim/third-party/rust/fixups/axum-core/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/axum-core/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/axum/fixups.toml b/shim/third-party/rust/fixups/axum/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/axum/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/backtrace/fixups.toml b/shim/third-party/rust/fixups/backtrace/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/backtrace/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/blake3/fixups.toml b/shim/third-party/rust/fixups/blake3/fixups.toml deleted file mode 100644 index 389fd57acfc70..0000000000000 --- a/shim/third-party/rust/fixups/blake3/fixups.toml +++ /dev/null @@ -1,81 +0,0 @@ -buildscript = [] - -## The various X86 platform fixups - -[platform_fixup.'cfg(target_arch = "x86_64")'] -cfgs = ["blake3_sse2_ffi", "blake3_sse41_ffi", "blake3_avx2_ffi", "blake3_avx512_ffi"] -buildscript = [] - -# , any(target_env = "fbcode", target_env = "gnu") -[[platform_fixup.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))'.buildscript.cxx_library] -name = "simd_x86_unix" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_unix.S", - "c/blake3_sse41_x86-64_unix.S", - "c/blake3_avx2_x86-64_unix.S", - "c/blake3_avx512_x86-64_unix.S" -] -# Older versions of Clang require these flags, even for assembly. See -# https://github.com/BLAKE3-team/BLAKE3/issues/79. -compiler_flags = ["-mavx512f", "-mavx512vl"] -headers = ["c/*.h"] -compatible_with = [ - "prelude//os/constraints:linux", - "prelude//os/constraints:macos", -] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript.cxx_library] -name = "simd_x86_windows_gnu" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_windows_gnu.S", - "c/blake3_sse41_x86-64_windows_gnu.S", - "c/blake3_avx2_x86-64_windows_gnu.S", - "c/blake3_avx512_x86-64_windows_gnu.S" -] -# Older versions of Clang require these flags, even for assembly. See -# https://github.com/BLAKE3-team/BLAKE3/issues/79. -compiler_flags = ["-mavx512f", "-mavx512vl"] -headers = ["c/*.h"] -compatible_with = ["prelude//os/constraints:windows"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "simd_x86_windows_msvc" -srcs = [ - "c/blake3.c", - "c/blake3_dispatch.c", - "c/blake3_portable.c", - "c/blake3_sse2_x86-64_windows_msvc.asm", - "c/blake3_sse41_x86-64_windows_msvc.asm", - "c/blake3_avx2_x86-64_windows_msvc.asm", - "c/blake3_avx512_x86-64_windows_msvc.asm" -] -headers = ["c/*.h"] -compatible_with = ["prelude//os/constraints:windows"] - -## ARM and AArch64 fixups - -[platform_fixup.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'] -cfgs = ["blake3_neon"] -buildscript = [] - -[[platform_fixup.'cfg(target_arch = "aarch64")'.buildscript]] -[platform_fixup.'cfg(target_arch = "aarch64")'.buildscript.cxx_library] -name = "simd_neon-aarch64" -srcs = ["c/blake3_neon.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_arch = "arm")'.buildscript]] -[platform_fixup.'cfg(target_arch = "arm")'.buildscript.cxx_library] -name = "simd_neon-armv7" -srcs = ["c/blake3_neon.c"] -compiler_flags = ["-mfpu=neon-vfpv4", "-mfloat-abi=hard"] -headers = ["c/*.h"] diff --git a/shim/third-party/rust/fixups/bumpalo/fixups.toml b/shim/third-party/rust/fixups/bumpalo/fixups.toml deleted file mode 100644 index edd9a2079bd4c..0000000000000 --- a/shim/third-party/rust/fixups/bumpalo/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml b/shim/third-party/rust/fixups/bzip2-sys/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/bzip2-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/clap/fixups.toml b/shim/third-party/rust/fixups/clap/fixups.toml deleted file mode 100644 index ee94fdc2f29cc..0000000000000 --- a/shim/third-party/rust/fixups/clap/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/clap_builder/fixups.toml b/shim/third-party/rust/fixups/clap_builder/fixups.toml deleted file mode 100644 index edd9a2079bd4c..0000000000000 --- a/shim/third-party/rust/fixups/clap_builder/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/clap_derive/fixups.toml b/shim/third-party/rust/fixups/clap_derive/fixups.toml deleted file mode 100644 index ee94fdc2f29cc..0000000000000 --- a/shim/third-party/rust/fixups/clap_derive/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -omit_features = ["deprecated"] diff --git a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml b/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/core-foundation-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/crc32fast/fixups.toml b/shim/third-party/rust/fixups/crc32fast/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/crc32fast/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/criterion/fixups.toml b/shim/third-party/rust/fixups/criterion/fixups.toml deleted file mode 100644 index 41439d3356a5e..0000000000000 --- a/shim/third-party/rust/fixups/criterion/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml b/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/crossbeam-epoch/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml b/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/crossbeam-queue/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml b/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/crossbeam-utils/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/crunchy/fixups.toml b/shim/third-party/rust/fixups/crunchy/fixups.toml deleted file mode 100644 index ac9ebfb4af71d..0000000000000 --- a/shim/third-party/rust/fixups/crunchy/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml b/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/darwin-libproc-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/debugserver-types/fixups.toml b/shim/third-party/rust/fixups/debugserver-types/fixups.toml deleted file mode 100644 index 50645274fe787..0000000000000 --- a/shim/third-party/rust/fixups/debugserver-types/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -extra_srcs = ["src/schema.json"] -cargo_env = true diff --git a/shim/third-party/rust/fixups/derive_more-impl/fixups.toml b/shim/third-party/rust/fixups/derive_more-impl/fixups.toml deleted file mode 100644 index 2b26bb6745cce..0000000000000 --- a/shim/third-party/rust/fixups/derive_more-impl/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["README.md", "doc/*.md"] diff --git a/shim/third-party/rust/fixups/derive_more/fixups.toml b/shim/third-party/rust/fixups/derive_more/fixups.toml deleted file mode 100644 index edd9a2079bd4c..0000000000000 --- a/shim/third-party/rust/fixups/derive_more/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["README.md"] diff --git a/shim/third-party/rust/fixups/erased-serde/fixups.toml b/shim/third-party/rust/fixups/erased-serde/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/erased-serde/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/fs-err/fixups.toml b/shim/third-party/rust/fixups/fs-err/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/fs-err/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/fs4/fixups.toml b/shim/third-party/rust/fixups/fs4/fixups.toml deleted file mode 100644 index af7edb27e3bb7..0000000000000 --- a/shim/third-party/rust/fixups/fs4/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/futures-channel/fixups.toml b/shim/third-party/rust/fixups/futures-channel/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/futures-channel/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-core/fixups.toml b/shim/third-party/rust/fixups/futures-core/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/futures-core/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-task/fixups.toml b/shim/third-party/rust/fixups/futures-task/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/futures-task/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/futures-util/fixups.toml b/shim/third-party/rust/fixups/futures-util/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/futures-util/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/generic-array/fixups.toml b/shim/third-party/rust/fixups/generic-array/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/generic-array/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/getrandom/fixups.toml b/shim/third-party/rust/fixups/getrandom/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/getrandom/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/httparse/fixups.toml b/shim/third-party/rust/fixups/httparse/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/httparse/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/hyper/fixups.toml b/shim/third-party/rust/fixups/hyper/fixups.toml deleted file mode 100644 index 9118e9de767c8..0000000000000 --- a/shim/third-party/rust/fixups/hyper/fixups.toml +++ /dev/null @@ -1,5 +0,0 @@ -# reindeer cannot see through `cfg_proto!` macros and the like -extra_srcs = ["src/**/*.rs"] - -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/indexmap/fixups.toml b/shim/third-party/rust/fixups/indexmap/fixups.toml deleted file mode 100644 index 4aa45eda12c3c..0000000000000 --- a/shim/third-party/rust/fixups/indexmap/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cfgs = ["has_std"] diff --git a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml b/shim/third-party/rust/fixups/io-lifetimes/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/io-lifetimes/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml b/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/jemalloc-sys/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/lalrpop/fixups.toml b/shim/third-party/rust/fixups/lalrpop/fixups.toml deleted file mode 100644 index 41439d3356a5e..0000000000000 --- a/shim/third-party/rust/fixups/lalrpop/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/lexical-core/fixups.toml b/shim/third-party/rust/fixups/lexical-core/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/lexical-core/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libc/fixups.toml b/shim/third-party/rust/fixups/libc/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/libc/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/libm/fixups.toml b/shim/third-party/rust/fixups/libm/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/libm/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/BUCK b/shim/third-party/rust/fixups/libsqlite3-sys/BUCK deleted file mode 100644 index de78a99d5a5a5..0000000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/BUCK +++ /dev/null @@ -1,5 +0,0 @@ -filegroup( - name = "out_dir", - srcs = ["bindgen.rs"], - visibility = ["//third-party/rust/..."], -) diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs b/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs deleted file mode 100644 index fbe2d39fe0be8..0000000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/bindgen.rs +++ /dev/null @@ -1,3594 +0,0 @@ -/* automatically generated by rust-bindgen 0.64.0 */ - -pub const SQLITE_VERSION: &[u8; 7usize] = b"3.41.2\0"; -pub const SQLITE_VERSION_NUMBER: i32 = 3041002; -pub const SQLITE_SOURCE_ID: &[u8; 85usize] = - b"2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da\0"; -pub const SQLITE_OK: i32 = 0; -pub const SQLITE_ERROR: i32 = 1; -pub const SQLITE_INTERNAL: i32 = 2; -pub const SQLITE_PERM: i32 = 3; -pub const SQLITE_ABORT: i32 = 4; -pub const SQLITE_BUSY: i32 = 5; -pub const SQLITE_LOCKED: i32 = 6; -pub const SQLITE_NOMEM: i32 = 7; -pub const SQLITE_READONLY: i32 = 8; -pub const SQLITE_INTERRUPT: i32 = 9; -pub const SQLITE_IOERR: i32 = 10; -pub const SQLITE_CORRUPT: i32 = 11; -pub const SQLITE_NOTFOUND: i32 = 12; -pub const SQLITE_FULL: i32 = 13; -pub const SQLITE_CANTOPEN: i32 = 14; -pub const SQLITE_PROTOCOL: i32 = 15; -pub const SQLITE_EMPTY: i32 = 16; -pub const SQLITE_SCHEMA: i32 = 17; -pub const SQLITE_TOOBIG: i32 = 18; -pub const SQLITE_CONSTRAINT: i32 = 19; -pub const SQLITE_MISMATCH: i32 = 20; -pub const SQLITE_MISUSE: i32 = 21; -pub const SQLITE_NOLFS: i32 = 22; -pub const SQLITE_AUTH: i32 = 23; -pub const SQLITE_FORMAT: i32 = 24; -pub const SQLITE_RANGE: i32 = 25; -pub const SQLITE_NOTADB: i32 = 26; -pub const SQLITE_NOTICE: i32 = 27; -pub const SQLITE_WARNING: i32 = 28; -pub const SQLITE_ROW: i32 = 100; -pub const SQLITE_DONE: i32 = 101; -pub const SQLITE_ERROR_MISSING_COLLSEQ: i32 = 257; -pub const SQLITE_ERROR_RETRY: i32 = 513; -pub const SQLITE_ERROR_SNAPSHOT: i32 = 769; -pub const SQLITE_IOERR_READ: i32 = 266; -pub const SQLITE_IOERR_SHORT_READ: i32 = 522; -pub const SQLITE_IOERR_WRITE: i32 = 778; -pub const SQLITE_IOERR_FSYNC: i32 = 1034; -pub const SQLITE_IOERR_DIR_FSYNC: i32 = 1290; -pub const SQLITE_IOERR_TRUNCATE: i32 = 1546; -pub const SQLITE_IOERR_FSTAT: i32 = 1802; -pub const SQLITE_IOERR_UNLOCK: i32 = 2058; -pub const SQLITE_IOERR_RDLOCK: i32 = 2314; -pub const SQLITE_IOERR_DELETE: i32 = 2570; -pub const SQLITE_IOERR_BLOCKED: i32 = 2826; -pub const SQLITE_IOERR_NOMEM: i32 = 3082; -pub const SQLITE_IOERR_ACCESS: i32 = 3338; -pub const SQLITE_IOERR_CHECKRESERVEDLOCK: i32 = 3594; -pub const SQLITE_IOERR_LOCK: i32 = 3850; -pub const SQLITE_IOERR_CLOSE: i32 = 4106; -pub const SQLITE_IOERR_DIR_CLOSE: i32 = 4362; -pub const SQLITE_IOERR_SHMOPEN: i32 = 4618; -pub const SQLITE_IOERR_SHMSIZE: i32 = 4874; -pub const SQLITE_IOERR_SHMLOCK: i32 = 5130; -pub const SQLITE_IOERR_SHMMAP: i32 = 5386; -pub const SQLITE_IOERR_SEEK: i32 = 5642; -pub const SQLITE_IOERR_DELETE_NOENT: i32 = 5898; -pub const SQLITE_IOERR_MMAP: i32 = 6154; -pub const SQLITE_IOERR_GETTEMPPATH: i32 = 6410; -pub const SQLITE_IOERR_CONVPATH: i32 = 6666; -pub const SQLITE_IOERR_VNODE: i32 = 6922; -pub const SQLITE_IOERR_AUTH: i32 = 7178; -pub const SQLITE_IOERR_BEGIN_ATOMIC: i32 = 7434; -pub const SQLITE_IOERR_COMMIT_ATOMIC: i32 = 7690; -pub const SQLITE_IOERR_ROLLBACK_ATOMIC: i32 = 7946; -pub const SQLITE_IOERR_DATA: i32 = 8202; -pub const SQLITE_IOERR_CORRUPTFS: i32 = 8458; -pub const SQLITE_LOCKED_SHAREDCACHE: i32 = 262; -pub const SQLITE_LOCKED_VTAB: i32 = 518; -pub const SQLITE_BUSY_RECOVERY: i32 = 261; -pub const SQLITE_BUSY_SNAPSHOT: i32 = 517; -pub const SQLITE_BUSY_TIMEOUT: i32 = 773; -pub const SQLITE_CANTOPEN_NOTEMPDIR: i32 = 270; -pub const SQLITE_CANTOPEN_ISDIR: i32 = 526; -pub const SQLITE_CANTOPEN_FULLPATH: i32 = 782; -pub const SQLITE_CANTOPEN_CONVPATH: i32 = 1038; -pub const SQLITE_CANTOPEN_DIRTYWAL: i32 = 1294; -pub const SQLITE_CANTOPEN_SYMLINK: i32 = 1550; -pub const SQLITE_CORRUPT_VTAB: i32 = 267; -pub const SQLITE_CORRUPT_SEQUENCE: i32 = 523; -pub const SQLITE_CORRUPT_INDEX: i32 = 779; -pub const SQLITE_READONLY_RECOVERY: i32 = 264; -pub const SQLITE_READONLY_CANTLOCK: i32 = 520; -pub const SQLITE_READONLY_ROLLBACK: i32 = 776; -pub const SQLITE_READONLY_DBMOVED: i32 = 1032; -pub const SQLITE_READONLY_CANTINIT: i32 = 1288; -pub const SQLITE_READONLY_DIRECTORY: i32 = 1544; -pub const SQLITE_ABORT_ROLLBACK: i32 = 516; -pub const SQLITE_CONSTRAINT_CHECK: i32 = 275; -pub const SQLITE_CONSTRAINT_COMMITHOOK: i32 = 531; -pub const SQLITE_CONSTRAINT_FOREIGNKEY: i32 = 787; -pub const SQLITE_CONSTRAINT_FUNCTION: i32 = 1043; -pub const SQLITE_CONSTRAINT_NOTNULL: i32 = 1299; -pub const SQLITE_CONSTRAINT_PRIMARYKEY: i32 = 1555; -pub const SQLITE_CONSTRAINT_TRIGGER: i32 = 1811; -pub const SQLITE_CONSTRAINT_UNIQUE: i32 = 2067; -pub const SQLITE_CONSTRAINT_VTAB: i32 = 2323; -pub const SQLITE_CONSTRAINT_ROWID: i32 = 2579; -pub const SQLITE_CONSTRAINT_PINNED: i32 = 2835; -pub const SQLITE_CONSTRAINT_DATATYPE: i32 = 3091; -pub const SQLITE_NOTICE_RECOVER_WAL: i32 = 283; -pub const SQLITE_NOTICE_RECOVER_ROLLBACK: i32 = 539; -pub const SQLITE_NOTICE_RBU: i32 = 795; -pub const SQLITE_WARNING_AUTOINDEX: i32 = 284; -pub const SQLITE_AUTH_USER: i32 = 279; -pub const SQLITE_OK_LOAD_PERMANENTLY: i32 = 256; -pub const SQLITE_OK_SYMLINK: i32 = 512; -pub const SQLITE_OPEN_READONLY: i32 = 1; -pub const SQLITE_OPEN_READWRITE: i32 = 2; -pub const SQLITE_OPEN_CREATE: i32 = 4; -pub const SQLITE_OPEN_DELETEONCLOSE: i32 = 8; -pub const SQLITE_OPEN_EXCLUSIVE: i32 = 16; -pub const SQLITE_OPEN_AUTOPROXY: i32 = 32; -pub const SQLITE_OPEN_URI: i32 = 64; -pub const SQLITE_OPEN_MEMORY: i32 = 128; -pub const SQLITE_OPEN_MAIN_DB: i32 = 256; -pub const SQLITE_OPEN_TEMP_DB: i32 = 512; -pub const SQLITE_OPEN_TRANSIENT_DB: i32 = 1024; -pub const SQLITE_OPEN_MAIN_JOURNAL: i32 = 2048; -pub const SQLITE_OPEN_TEMP_JOURNAL: i32 = 4096; -pub const SQLITE_OPEN_SUBJOURNAL: i32 = 8192; -pub const SQLITE_OPEN_SUPER_JOURNAL: i32 = 16384; -pub const SQLITE_OPEN_NOMUTEX: i32 = 32768; -pub const SQLITE_OPEN_FULLMUTEX: i32 = 65536; -pub const SQLITE_OPEN_SHAREDCACHE: i32 = 131072; -pub const SQLITE_OPEN_PRIVATECACHE: i32 = 262144; -pub const SQLITE_OPEN_WAL: i32 = 524288; -pub const SQLITE_OPEN_NOFOLLOW: i32 = 16777216; -pub const SQLITE_OPEN_EXRESCODE: i32 = 33554432; -pub const SQLITE_OPEN_MASTER_JOURNAL: i32 = 16384; -pub const SQLITE_IOCAP_ATOMIC: i32 = 1; -pub const SQLITE_IOCAP_ATOMIC512: i32 = 2; -pub const SQLITE_IOCAP_ATOMIC1K: i32 = 4; -pub const SQLITE_IOCAP_ATOMIC2K: i32 = 8; -pub const SQLITE_IOCAP_ATOMIC4K: i32 = 16; -pub const SQLITE_IOCAP_ATOMIC8K: i32 = 32; -pub const SQLITE_IOCAP_ATOMIC16K: i32 = 64; -pub const SQLITE_IOCAP_ATOMIC32K: i32 = 128; -pub const SQLITE_IOCAP_ATOMIC64K: i32 = 256; -pub const SQLITE_IOCAP_SAFE_APPEND: i32 = 512; -pub const SQLITE_IOCAP_SEQUENTIAL: i32 = 1024; -pub const SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN: i32 = 2048; -pub const SQLITE_IOCAP_POWERSAFE_OVERWRITE: i32 = 4096; -pub const SQLITE_IOCAP_IMMUTABLE: i32 = 8192; -pub const SQLITE_IOCAP_BATCH_ATOMIC: i32 = 16384; -pub const SQLITE_LOCK_NONE: i32 = 0; -pub const SQLITE_LOCK_SHARED: i32 = 1; -pub const SQLITE_LOCK_RESERVED: i32 = 2; -pub const SQLITE_LOCK_PENDING: i32 = 3; -pub const SQLITE_LOCK_EXCLUSIVE: i32 = 4; -pub const SQLITE_SYNC_NORMAL: i32 = 2; -pub const SQLITE_SYNC_FULL: i32 = 3; -pub const SQLITE_SYNC_DATAONLY: i32 = 16; -pub const SQLITE_FCNTL_LOCKSTATE: i32 = 1; -pub const SQLITE_FCNTL_GET_LOCKPROXYFILE: i32 = 2; -pub const SQLITE_FCNTL_SET_LOCKPROXYFILE: i32 = 3; -pub const SQLITE_FCNTL_LAST_ERRNO: i32 = 4; -pub const SQLITE_FCNTL_SIZE_HINT: i32 = 5; -pub const SQLITE_FCNTL_CHUNK_SIZE: i32 = 6; -pub const SQLITE_FCNTL_FILE_POINTER: i32 = 7; -pub const SQLITE_FCNTL_SYNC_OMITTED: i32 = 8; -pub const SQLITE_FCNTL_WIN32_AV_RETRY: i32 = 9; -pub const SQLITE_FCNTL_PERSIST_WAL: i32 = 10; -pub const SQLITE_FCNTL_OVERWRITE: i32 = 11; -pub const SQLITE_FCNTL_VFSNAME: i32 = 12; -pub const SQLITE_FCNTL_POWERSAFE_OVERWRITE: i32 = 13; -pub const SQLITE_FCNTL_PRAGMA: i32 = 14; -pub const SQLITE_FCNTL_BUSYHANDLER: i32 = 15; -pub const SQLITE_FCNTL_TEMPFILENAME: i32 = 16; -pub const SQLITE_FCNTL_MMAP_SIZE: i32 = 18; -pub const SQLITE_FCNTL_TRACE: i32 = 19; -pub const SQLITE_FCNTL_HAS_MOVED: i32 = 20; -pub const SQLITE_FCNTL_SYNC: i32 = 21; -pub const SQLITE_FCNTL_COMMIT_PHASETWO: i32 = 22; -pub const SQLITE_FCNTL_WIN32_SET_HANDLE: i32 = 23; -pub const SQLITE_FCNTL_WAL_BLOCK: i32 = 24; -pub const SQLITE_FCNTL_ZIPVFS: i32 = 25; -pub const SQLITE_FCNTL_RBU: i32 = 26; -pub const SQLITE_FCNTL_VFS_POINTER: i32 = 27; -pub const SQLITE_FCNTL_JOURNAL_POINTER: i32 = 28; -pub const SQLITE_FCNTL_WIN32_GET_HANDLE: i32 = 29; -pub const SQLITE_FCNTL_PDB: i32 = 30; -pub const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE: i32 = 31; -pub const SQLITE_FCNTL_COMMIT_ATOMIC_WRITE: i32 = 32; -pub const SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE: i32 = 33; -pub const SQLITE_FCNTL_LOCK_TIMEOUT: i32 = 34; -pub const SQLITE_FCNTL_DATA_VERSION: i32 = 35; -pub const SQLITE_FCNTL_SIZE_LIMIT: i32 = 36; -pub const SQLITE_FCNTL_CKPT_DONE: i32 = 37; -pub const SQLITE_FCNTL_RESERVE_BYTES: i32 = 38; -pub const SQLITE_FCNTL_CKPT_START: i32 = 39; -pub const SQLITE_FCNTL_EXTERNAL_READER: i32 = 40; -pub const SQLITE_FCNTL_CKSM_FILE: i32 = 41; -pub const SQLITE_FCNTL_RESET_CACHE: i32 = 42; -pub const SQLITE_GET_LOCKPROXYFILE: i32 = 2; -pub const SQLITE_SET_LOCKPROXYFILE: i32 = 3; -pub const SQLITE_LAST_ERRNO: i32 = 4; -pub const SQLITE_ACCESS_EXISTS: i32 = 0; -pub const SQLITE_ACCESS_READWRITE: i32 = 1; -pub const SQLITE_ACCESS_READ: i32 = 2; -pub const SQLITE_SHM_UNLOCK: i32 = 1; -pub const SQLITE_SHM_LOCK: i32 = 2; -pub const SQLITE_SHM_SHARED: i32 = 4; -pub const SQLITE_SHM_EXCLUSIVE: i32 = 8; -pub const SQLITE_SHM_NLOCK: i32 = 8; -pub const SQLITE_CONFIG_SINGLETHREAD: i32 = 1; -pub const SQLITE_CONFIG_MULTITHREAD: i32 = 2; -pub const SQLITE_CONFIG_SERIALIZED: i32 = 3; -pub const SQLITE_CONFIG_MALLOC: i32 = 4; -pub const SQLITE_CONFIG_GETMALLOC: i32 = 5; -pub const SQLITE_CONFIG_SCRATCH: i32 = 6; -pub const SQLITE_CONFIG_PAGECACHE: i32 = 7; -pub const SQLITE_CONFIG_HEAP: i32 = 8; -pub const SQLITE_CONFIG_MEMSTATUS: i32 = 9; -pub const SQLITE_CONFIG_MUTEX: i32 = 10; -pub const SQLITE_CONFIG_GETMUTEX: i32 = 11; -pub const SQLITE_CONFIG_LOOKASIDE: i32 = 13; -pub const SQLITE_CONFIG_PCACHE: i32 = 14; -pub const SQLITE_CONFIG_GETPCACHE: i32 = 15; -pub const SQLITE_CONFIG_LOG: i32 = 16; -pub const SQLITE_CONFIG_URI: i32 = 17; -pub const SQLITE_CONFIG_PCACHE2: i32 = 18; -pub const SQLITE_CONFIG_GETPCACHE2: i32 = 19; -pub const SQLITE_CONFIG_COVERING_INDEX_SCAN: i32 = 20; -pub const SQLITE_CONFIG_SQLLOG: i32 = 21; -pub const SQLITE_CONFIG_MMAP_SIZE: i32 = 22; -pub const SQLITE_CONFIG_WIN32_HEAPSIZE: i32 = 23; -pub const SQLITE_CONFIG_PCACHE_HDRSZ: i32 = 24; -pub const SQLITE_CONFIG_PMASZ: i32 = 25; -pub const SQLITE_CONFIG_STMTJRNL_SPILL: i32 = 26; -pub const SQLITE_CONFIG_SMALL_MALLOC: i32 = 27; -pub const SQLITE_CONFIG_SORTERREF_SIZE: i32 = 28; -pub const SQLITE_CONFIG_MEMDB_MAXSIZE: i32 = 29; -pub const SQLITE_DBCONFIG_MAINDBNAME: i32 = 1000; -pub const SQLITE_DBCONFIG_LOOKASIDE: i32 = 1001; -pub const SQLITE_DBCONFIG_ENABLE_FKEY: i32 = 1002; -pub const SQLITE_DBCONFIG_ENABLE_TRIGGER: i32 = 1003; -pub const SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER: i32 = 1004; -pub const SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION: i32 = 1005; -pub const SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE: i32 = 1006; -pub const SQLITE_DBCONFIG_ENABLE_QPSG: i32 = 1007; -pub const SQLITE_DBCONFIG_TRIGGER_EQP: i32 = 1008; -pub const SQLITE_DBCONFIG_RESET_DATABASE: i32 = 1009; -pub const SQLITE_DBCONFIG_DEFENSIVE: i32 = 1010; -pub const SQLITE_DBCONFIG_WRITABLE_SCHEMA: i32 = 1011; -pub const SQLITE_DBCONFIG_LEGACY_ALTER_TABLE: i32 = 1012; -pub const SQLITE_DBCONFIG_DQS_DML: i32 = 1013; -pub const SQLITE_DBCONFIG_DQS_DDL: i32 = 1014; -pub const SQLITE_DBCONFIG_ENABLE_VIEW: i32 = 1015; -pub const SQLITE_DBCONFIG_LEGACY_FILE_FORMAT: i32 = 1016; -pub const SQLITE_DBCONFIG_TRUSTED_SCHEMA: i32 = 1017; -pub const SQLITE_DBCONFIG_MAX: i32 = 1017; -pub const SQLITE_DENY: i32 = 1; -pub const SQLITE_IGNORE: i32 = 2; -pub const SQLITE_CREATE_INDEX: i32 = 1; -pub const SQLITE_CREATE_TABLE: i32 = 2; -pub const SQLITE_CREATE_TEMP_INDEX: i32 = 3; -pub const SQLITE_CREATE_TEMP_TABLE: i32 = 4; -pub const SQLITE_CREATE_TEMP_TRIGGER: i32 = 5; -pub const SQLITE_CREATE_TEMP_VIEW: i32 = 6; -pub const SQLITE_CREATE_TRIGGER: i32 = 7; -pub const SQLITE_CREATE_VIEW: i32 = 8; -pub const SQLITE_DELETE: i32 = 9; -pub const SQLITE_DROP_INDEX: i32 = 10; -pub const SQLITE_DROP_TABLE: i32 = 11; -pub const SQLITE_DROP_TEMP_INDEX: i32 = 12; -pub const SQLITE_DROP_TEMP_TABLE: i32 = 13; -pub const SQLITE_DROP_TEMP_TRIGGER: i32 = 14; -pub const SQLITE_DROP_TEMP_VIEW: i32 = 15; -pub const SQLITE_DROP_TRIGGER: i32 = 16; -pub const SQLITE_DROP_VIEW: i32 = 17; -pub const SQLITE_INSERT: i32 = 18; -pub const SQLITE_PRAGMA: i32 = 19; -pub const SQLITE_READ: i32 = 20; -pub const SQLITE_SELECT: i32 = 21; -pub const SQLITE_TRANSACTION: i32 = 22; -pub const SQLITE_UPDATE: i32 = 23; -pub const SQLITE_ATTACH: i32 = 24; -pub const SQLITE_DETACH: i32 = 25; -pub const SQLITE_ALTER_TABLE: i32 = 26; -pub const SQLITE_REINDEX: i32 = 27; -pub const SQLITE_ANALYZE: i32 = 28; -pub const SQLITE_CREATE_VTABLE: i32 = 29; -pub const SQLITE_DROP_VTABLE: i32 = 30; -pub const SQLITE_FUNCTION: i32 = 31; -pub const SQLITE_SAVEPOINT: i32 = 32; -pub const SQLITE_COPY: i32 = 0; -pub const SQLITE_RECURSIVE: i32 = 33; -pub const SQLITE_TRACE_STMT: i32 = 1; -pub const SQLITE_TRACE_PROFILE: i32 = 2; -pub const SQLITE_TRACE_ROW: i32 = 4; -pub const SQLITE_TRACE_CLOSE: i32 = 8; -pub const SQLITE_LIMIT_LENGTH: i32 = 0; -pub const SQLITE_LIMIT_SQL_LENGTH: i32 = 1; -pub const SQLITE_LIMIT_COLUMN: i32 = 2; -pub const SQLITE_LIMIT_EXPR_DEPTH: i32 = 3; -pub const SQLITE_LIMIT_COMPOUND_SELECT: i32 = 4; -pub const SQLITE_LIMIT_VDBE_OP: i32 = 5; -pub const SQLITE_LIMIT_FUNCTION_ARG: i32 = 6; -pub const SQLITE_LIMIT_ATTACHED: i32 = 7; -pub const SQLITE_LIMIT_LIKE_PATTERN_LENGTH: i32 = 8; -pub const SQLITE_LIMIT_VARIABLE_NUMBER: i32 = 9; -pub const SQLITE_LIMIT_TRIGGER_DEPTH: i32 = 10; -pub const SQLITE_LIMIT_WORKER_THREADS: i32 = 11; -pub const SQLITE_PREPARE_PERSISTENT: i32 = 1; -pub const SQLITE_PREPARE_NORMALIZE: i32 = 2; -pub const SQLITE_PREPARE_NO_VTAB: i32 = 4; -pub const SQLITE_INTEGER: i32 = 1; -pub const SQLITE_FLOAT: i32 = 2; -pub const SQLITE_BLOB: i32 = 4; -pub const SQLITE_NULL: i32 = 5; -pub const SQLITE_TEXT: i32 = 3; -pub const SQLITE3_TEXT: i32 = 3; -pub const SQLITE_UTF8: i32 = 1; -pub const SQLITE_UTF16LE: i32 = 2; -pub const SQLITE_UTF16BE: i32 = 3; -pub const SQLITE_UTF16: i32 = 4; -pub const SQLITE_ANY: i32 = 5; -pub const SQLITE_UTF16_ALIGNED: i32 = 8; -pub const SQLITE_DETERMINISTIC: i32 = 2048; -pub const SQLITE_DIRECTONLY: i32 = 524288; -pub const SQLITE_SUBTYPE: i32 = 1048576; -pub const SQLITE_INNOCUOUS: i32 = 2097152; -pub const SQLITE_WIN32_DATA_DIRECTORY_TYPE: i32 = 1; -pub const SQLITE_WIN32_TEMP_DIRECTORY_TYPE: i32 = 2; -pub const SQLITE_TXN_NONE: i32 = 0; -pub const SQLITE_TXN_READ: i32 = 1; -pub const SQLITE_TXN_WRITE: i32 = 2; -pub const SQLITE_INDEX_SCAN_UNIQUE: i32 = 1; -pub const SQLITE_INDEX_CONSTRAINT_EQ: i32 = 2; -pub const SQLITE_INDEX_CONSTRAINT_GT: i32 = 4; -pub const SQLITE_INDEX_CONSTRAINT_LE: i32 = 8; -pub const SQLITE_INDEX_CONSTRAINT_LT: i32 = 16; -pub const SQLITE_INDEX_CONSTRAINT_GE: i32 = 32; -pub const SQLITE_INDEX_CONSTRAINT_MATCH: i32 = 64; -pub const SQLITE_INDEX_CONSTRAINT_LIKE: i32 = 65; -pub const SQLITE_INDEX_CONSTRAINT_GLOB: i32 = 66; -pub const SQLITE_INDEX_CONSTRAINT_REGEXP: i32 = 67; -pub const SQLITE_INDEX_CONSTRAINT_NE: i32 = 68; -pub const SQLITE_INDEX_CONSTRAINT_ISNOT: i32 = 69; -pub const SQLITE_INDEX_CONSTRAINT_ISNOTNULL: i32 = 70; -pub const SQLITE_INDEX_CONSTRAINT_ISNULL: i32 = 71; -pub const SQLITE_INDEX_CONSTRAINT_IS: i32 = 72; -pub const SQLITE_INDEX_CONSTRAINT_LIMIT: i32 = 73; -pub const SQLITE_INDEX_CONSTRAINT_OFFSET: i32 = 74; -pub const SQLITE_INDEX_CONSTRAINT_FUNCTION: i32 = 150; -pub const SQLITE_MUTEX_FAST: i32 = 0; -pub const SQLITE_MUTEX_RECURSIVE: i32 = 1; -pub const SQLITE_MUTEX_STATIC_MAIN: i32 = 2; -pub const SQLITE_MUTEX_STATIC_MEM: i32 = 3; -pub const SQLITE_MUTEX_STATIC_MEM2: i32 = 4; -pub const SQLITE_MUTEX_STATIC_OPEN: i32 = 4; -pub const SQLITE_MUTEX_STATIC_PRNG: i32 = 5; -pub const SQLITE_MUTEX_STATIC_LRU: i32 = 6; -pub const SQLITE_MUTEX_STATIC_LRU2: i32 = 7; -pub const SQLITE_MUTEX_STATIC_PMEM: i32 = 7; -pub const SQLITE_MUTEX_STATIC_APP1: i32 = 8; -pub const SQLITE_MUTEX_STATIC_APP2: i32 = 9; -pub const SQLITE_MUTEX_STATIC_APP3: i32 = 10; -pub const SQLITE_MUTEX_STATIC_VFS1: i32 = 11; -pub const SQLITE_MUTEX_STATIC_VFS2: i32 = 12; -pub const SQLITE_MUTEX_STATIC_VFS3: i32 = 13; -pub const SQLITE_MUTEX_STATIC_MASTER: i32 = 2; -pub const SQLITE_TESTCTRL_FIRST: i32 = 5; -pub const SQLITE_TESTCTRL_PRNG_SAVE: i32 = 5; -pub const SQLITE_TESTCTRL_PRNG_RESTORE: i32 = 6; -pub const SQLITE_TESTCTRL_PRNG_RESET: i32 = 7; -pub const SQLITE_TESTCTRL_BITVEC_TEST: i32 = 8; -pub const SQLITE_TESTCTRL_FAULT_INSTALL: i32 = 9; -pub const SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: i32 = 10; -pub const SQLITE_TESTCTRL_PENDING_BYTE: i32 = 11; -pub const SQLITE_TESTCTRL_ASSERT: i32 = 12; -pub const SQLITE_TESTCTRL_ALWAYS: i32 = 13; -pub const SQLITE_TESTCTRL_RESERVE: i32 = 14; -pub const SQLITE_TESTCTRL_OPTIMIZATIONS: i32 = 15; -pub const SQLITE_TESTCTRL_ISKEYWORD: i32 = 16; -pub const SQLITE_TESTCTRL_SCRATCHMALLOC: i32 = 17; -pub const SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: i32 = 17; -pub const SQLITE_TESTCTRL_LOCALTIME_FAULT: i32 = 18; -pub const SQLITE_TESTCTRL_EXPLAIN_STMT: i32 = 19; -pub const SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD: i32 = 19; -pub const SQLITE_TESTCTRL_NEVER_CORRUPT: i32 = 20; -pub const SQLITE_TESTCTRL_VDBE_COVERAGE: i32 = 21; -pub const SQLITE_TESTCTRL_BYTEORDER: i32 = 22; -pub const SQLITE_TESTCTRL_ISINIT: i32 = 23; -pub const SQLITE_TESTCTRL_SORTER_MMAP: i32 = 24; -pub const SQLITE_TESTCTRL_IMPOSTER: i32 = 25; -pub const SQLITE_TESTCTRL_PARSER_COVERAGE: i32 = 26; -pub const SQLITE_TESTCTRL_RESULT_INTREAL: i32 = 27; -pub const SQLITE_TESTCTRL_PRNG_SEED: i32 = 28; -pub const SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS: i32 = 29; -pub const SQLITE_TESTCTRL_SEEK_COUNT: i32 = 30; -pub const SQLITE_TESTCTRL_TRACEFLAGS: i32 = 31; -pub const SQLITE_TESTCTRL_TUNE: i32 = 32; -pub const SQLITE_TESTCTRL_LOGEST: i32 = 33; -pub const SQLITE_TESTCTRL_LAST: i32 = 33; -pub const SQLITE_STATUS_MEMORY_USED: i32 = 0; -pub const SQLITE_STATUS_PAGECACHE_USED: i32 = 1; -pub const SQLITE_STATUS_PAGECACHE_OVERFLOW: i32 = 2; -pub const SQLITE_STATUS_SCRATCH_USED: i32 = 3; -pub const SQLITE_STATUS_SCRATCH_OVERFLOW: i32 = 4; -pub const SQLITE_STATUS_MALLOC_SIZE: i32 = 5; -pub const SQLITE_STATUS_PARSER_STACK: i32 = 6; -pub const SQLITE_STATUS_PAGECACHE_SIZE: i32 = 7; -pub const SQLITE_STATUS_SCRATCH_SIZE: i32 = 8; -pub const SQLITE_STATUS_MALLOC_COUNT: i32 = 9; -pub const SQLITE_DBSTATUS_LOOKASIDE_USED: i32 = 0; -pub const SQLITE_DBSTATUS_CACHE_USED: i32 = 1; -pub const SQLITE_DBSTATUS_SCHEMA_USED: i32 = 2; -pub const SQLITE_DBSTATUS_STMT_USED: i32 = 3; -pub const SQLITE_DBSTATUS_LOOKASIDE_HIT: i32 = 4; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: i32 = 5; -pub const SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: i32 = 6; -pub const SQLITE_DBSTATUS_CACHE_HIT: i32 = 7; -pub const SQLITE_DBSTATUS_CACHE_MISS: i32 = 8; -pub const SQLITE_DBSTATUS_CACHE_WRITE: i32 = 9; -pub const SQLITE_DBSTATUS_DEFERRED_FKS: i32 = 10; -pub const SQLITE_DBSTATUS_CACHE_USED_SHARED: i32 = 11; -pub const SQLITE_DBSTATUS_CACHE_SPILL: i32 = 12; -pub const SQLITE_DBSTATUS_MAX: i32 = 12; -pub const SQLITE_STMTSTATUS_FULLSCAN_STEP: i32 = 1; -pub const SQLITE_STMTSTATUS_SORT: i32 = 2; -pub const SQLITE_STMTSTATUS_AUTOINDEX: i32 = 3; -pub const SQLITE_STMTSTATUS_VM_STEP: i32 = 4; -pub const SQLITE_STMTSTATUS_REPREPARE: i32 = 5; -pub const SQLITE_STMTSTATUS_RUN: i32 = 6; -pub const SQLITE_STMTSTATUS_FILTER_MISS: i32 = 7; -pub const SQLITE_STMTSTATUS_FILTER_HIT: i32 = 8; -pub const SQLITE_STMTSTATUS_MEMUSED: i32 = 99; -pub const SQLITE_CHECKPOINT_PASSIVE: i32 = 0; -pub const SQLITE_CHECKPOINT_FULL: i32 = 1; -pub const SQLITE_CHECKPOINT_RESTART: i32 = 2; -pub const SQLITE_CHECKPOINT_TRUNCATE: i32 = 3; -pub const SQLITE_VTAB_CONSTRAINT_SUPPORT: i32 = 1; -pub const SQLITE_VTAB_INNOCUOUS: i32 = 2; -pub const SQLITE_VTAB_DIRECTONLY: i32 = 3; -pub const SQLITE_ROLLBACK: i32 = 1; -pub const SQLITE_FAIL: i32 = 3; -pub const SQLITE_REPLACE: i32 = 5; -pub const SQLITE_SCANSTAT_NLOOP: i32 = 0; -pub const SQLITE_SCANSTAT_NVISIT: i32 = 1; -pub const SQLITE_SCANSTAT_EST: i32 = 2; -pub const SQLITE_SCANSTAT_NAME: i32 = 3; -pub const SQLITE_SCANSTAT_EXPLAIN: i32 = 4; -pub const SQLITE_SCANSTAT_SELECTID: i32 = 5; -pub const SQLITE_SCANSTAT_PARENTID: i32 = 6; -pub const SQLITE_SCANSTAT_NCYCLE: i32 = 7; -pub const SQLITE_SCANSTAT_COMPLEX: i32 = 1; -pub const SQLITE_SERIALIZE_NOCOPY: i32 = 1; -pub const SQLITE_DESERIALIZE_FREEONCLOSE: i32 = 1; -pub const SQLITE_DESERIALIZE_RESIZEABLE: i32 = 2; -pub const SQLITE_DESERIALIZE_READONLY: i32 = 4; -pub const NOT_WITHIN: i32 = 0; -pub const PARTLY_WITHIN: i32 = 1; -pub const FULLY_WITHIN: i32 = 2; -pub const __SQLITESESSION_H_: i32 = 1; -pub const SQLITE_SESSION_OBJCONFIG_SIZE: i32 = 1; -pub const SQLITE_CHANGESETSTART_INVERT: i32 = 2; -pub const SQLITE_CHANGESETAPPLY_NOSAVEPOINT: i32 = 1; -pub const SQLITE_CHANGESETAPPLY_INVERT: i32 = 2; -pub const SQLITE_CHANGESET_DATA: i32 = 1; -pub const SQLITE_CHANGESET_NOTFOUND: i32 = 2; -pub const SQLITE_CHANGESET_CONFLICT: i32 = 3; -pub const SQLITE_CHANGESET_CONSTRAINT: i32 = 4; -pub const SQLITE_CHANGESET_FOREIGN_KEY: i32 = 5; -pub const SQLITE_CHANGESET_OMIT: i32 = 0; -pub const SQLITE_CHANGESET_REPLACE: i32 = 1; -pub const SQLITE_CHANGESET_ABORT: i32 = 2; -pub const SQLITE_SESSION_CONFIG_STRMSIZE: i32 = 1; -pub const FTS5_TOKENIZE_QUERY: i32 = 1; -pub const FTS5_TOKENIZE_PREFIX: i32 = 2; -pub const FTS5_TOKENIZE_DOCUMENT: i32 = 4; -pub const FTS5_TOKENIZE_AUX: i32 = 8; -pub const FTS5_TOKEN_COLOCATED: i32 = 1; -extern "C" { - pub static sqlite3_version: [::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn sqlite3_libversion() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_sourceid() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_libversion_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_used( - zOptName: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_compileoption_get(N: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_threadsafe() -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3 { - _unused: [u8; 0], -} -pub type sqlite_int64 = ::std::os::raw::c_longlong; -pub type sqlite_uint64 = ::std::os::raw::c_ulonglong; -pub type sqlite3_int64 = sqlite_int64; -pub type sqlite3_uint64 = sqlite_uint64; -extern "C" { - pub fn sqlite3_close(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_close_v2(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -pub type sqlite3_callback = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn sqlite3_exec( - arg1: *mut sqlite3, - sql: *const ::std::os::raw::c_char, - callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - arg2: *mut ::std::os::raw::c_void, - errmsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_file { - pub pMethods: *const sqlite3_io_methods, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_io_methods { - pub iVersion: ::std::os::raw::c_int, - pub xClose: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file) -> ::std::os::raw::c_int, - >, - pub xRead: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: *mut ::std::os::raw::c_void, - iAmt: ::std::os::raw::c_int, - iOfst: sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xWrite: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: *const ::std::os::raw::c_void, - iAmt: ::std::os::raw::c_int, - iOfst: sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xTruncate: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file, size: sqlite3_int64) -> ::std::os::raw::c_int, - >, - pub xSync: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFileSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - pSize: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xLock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xUnlock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xCheckReservedLock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - pResOut: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFileControl: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - op: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xSectorSize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file) -> ::std::os::raw::c_int, - >, - pub xDeviceCharacteristics: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_file) -> ::std::os::raw::c_int, - >, - pub xShmMap: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - iPg: ::std::os::raw::c_int, - pgsz: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xShmLock: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - offset: ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xShmBarrier: ::std::option::Option, - pub xShmUnmap: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - deleteFlag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - iOfst: sqlite3_int64, - iAmt: ::std::os::raw::c_int, - pp: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xUnfetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_file, - iOfst: sqlite3_int64, - p: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mutex { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_api_routines { - _unused: [u8; 0], -} -pub type sqlite3_filename = *const ::std::os::raw::c_char; -pub type sqlite3_syscall_ptr = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_vfs { - pub iVersion: ::std::os::raw::c_int, - pub szOsFile: ::std::os::raw::c_int, - pub mxPathname: ::std::os::raw::c_int, - pub pNext: *mut sqlite3_vfs, - pub zName: *const ::std::os::raw::c_char, - pub pAppData: *mut ::std::os::raw::c_void, - pub xOpen: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: sqlite3_filename, - arg2: *mut sqlite3_file, - flags: ::std::os::raw::c_int, - pOutFlags: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xDelete: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - syncDir: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xAccess: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - pResOut: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xFullPathname: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - nOut: ::std::os::raw::c_int, - zOut: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xDlOpen: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zFilename: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void, - >, - pub xDlError: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - nByte: ::std::os::raw::c_int, - zErrMsg: *mut ::std::os::raw::c_char, - ), - >, - pub xDlSym: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: *mut ::std::os::raw::c_void, - zSymbol: *const ::std::os::raw::c_char, - ) -> ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: *mut ::std::os::raw::c_void, - zSymbol: *const ::std::os::raw::c_char, - ), - >, - >, - pub xDlClose: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vfs, arg2: *mut ::std::os::raw::c_void), - >, - pub xRandomness: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - nByte: ::std::os::raw::c_int, - zOut: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xSleep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - microseconds: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xCurrentTime: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vfs, arg2: *mut f64) -> ::std::os::raw::c_int, - >, - pub xGetLastError: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xCurrentTimeInt64: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - arg2: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xSetSystemCall: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - arg2: sqlite3_syscall_ptr, - ) -> ::std::os::raw::c_int, - >, - pub xGetSystemCall: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - ) -> sqlite3_syscall_ptr, - >, - pub xNextSystemCall: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vfs, - zName: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char, - >, -} -extern "C" { - pub fn sqlite3_initialize() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_shutdown() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_os_init() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_os_end() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_config(arg1: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_config( - arg1: *mut sqlite3, - op: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mem_methods { - pub xMalloc: ::std::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void, - >, - pub xFree: ::std::option::Option, - pub xRealloc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, - >, - pub xSize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xRoundup: ::std::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int, - >, - pub xInit: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xShutdown: ::std::option::Option, - pub pAppData: *mut ::std::os::raw::c_void, -} -extern "C" { - pub fn sqlite3_extended_result_codes( - arg1: *mut sqlite3, - onoff: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_last_insert_rowid(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_set_last_insert_rowid(arg1: *mut sqlite3, arg2: sqlite3_int64); -} -extern "C" { - pub fn sqlite3_changes(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_changes64(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_total_changes(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_total_changes64(arg1: *mut sqlite3) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_interrupt(arg1: *mut sqlite3); -} -extern "C" { - pub fn sqlite3_is_interrupted(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_complete(sql: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_complete16(sql: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_busy_handler( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_busy_timeout( - arg1: *mut sqlite3, - ms: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_get_table( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - pazResult: *mut *mut *mut ::std::os::raw::c_char, - pnRow: *mut ::std::os::raw::c_int, - pnColumn: *mut ::std::os::raw::c_int, - pzErrmsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_free_table(result: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sqlite3_mprintf(arg1: *const ::std::os::raw::c_char, ...) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_snprintf( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ... - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_malloc(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_malloc64(arg1: sqlite3_uint64) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_realloc( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_realloc64( - arg1: *mut ::std::os::raw::c_void, - arg2: sqlite3_uint64, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_free(arg1: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_msize(arg1: *mut ::std::os::raw::c_void) -> sqlite3_uint64; -} -extern "C" { - pub fn sqlite3_memory_used() -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_memory_highwater(resetFlag: ::std::os::raw::c_int) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_randomness(N: ::std::os::raw::c_int, P: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn sqlite3_set_authorizer( - arg1: *mut sqlite3, - xAuth: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - arg5: *const ::std::os::raw::c_char, - arg6: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pUserData: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_trace( - arg1: *mut sqlite3, - xTrace: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - ), - >, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_profile( - arg1: *mut sqlite3, - xProfile: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: sqlite3_uint64, - ), - >, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_trace_v2( - arg1: *mut sqlite3, - uMask: ::std::os::raw::c_uint, - xCallback: ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_uint, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - arg4: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_progress_handler( - arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - arg4: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn sqlite3_open( - filename: *const ::std::os::raw::c_char, - ppDb: *mut *mut sqlite3, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_open16( - filename: *const ::std::os::raw::c_void, - ppDb: *mut *mut sqlite3, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_open_v2( - filename: *const ::std::os::raw::c_char, - ppDb: *mut *mut sqlite3, - flags: ::std::os::raw::c_int, - zVfs: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_uri_parameter( - z: sqlite3_filename, - zParam: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_uri_boolean( - z: sqlite3_filename, - zParam: *const ::std::os::raw::c_char, - bDefault: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_uri_int64( - arg1: sqlite3_filename, - arg2: *const ::std::os::raw::c_char, - arg3: sqlite3_int64, - ) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_uri_key( - z: sqlite3_filename, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_filename_database(arg1: sqlite3_filename) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_filename_journal(arg1: sqlite3_filename) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_filename_wal(arg1: sqlite3_filename) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_database_file_object(arg1: *const ::std::os::raw::c_char) -> *mut sqlite3_file; -} -extern "C" { - pub fn sqlite3_create_filename( - zDatabase: *const ::std::os::raw::c_char, - zJournal: *const ::std::os::raw::c_char, - zWal: *const ::std::os::raw::c_char, - nParam: ::std::os::raw::c_int, - azParam: *mut *const ::std::os::raw::c_char, - ) -> sqlite3_filename; -} -extern "C" { - pub fn sqlite3_free_filename(arg1: sqlite3_filename); -} -extern "C" { - pub fn sqlite3_errcode(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_extended_errcode(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_errmsg(arg1: *mut sqlite3) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_errmsg16(arg1: *mut sqlite3) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_errstr(arg1: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_error_offset(db: *mut sqlite3) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_stmt { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_limit( - arg1: *mut sqlite3, - id: ::std::os::raw::c_int, - newVal: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare_v2( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare_v3( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_char, - nByte: ::std::os::raw::c_int, - prepFlags: ::std::os::raw::c_uint, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16_v2( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_prepare16_v3( - db: *mut sqlite3, - zSql: *const ::std::os::raw::c_void, - nByte: ::std::os::raw::c_int, - prepFlags: ::std::os::raw::c_uint, - ppStmt: *mut *mut sqlite3_stmt, - pzTail: *mut *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_sql(pStmt: *mut sqlite3_stmt) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_expanded_sql(pStmt: *mut sqlite3_stmt) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_stmt_readonly(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_isexplain(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_busy(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_value { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_context { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_bind_blob( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_blob64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: sqlite3_uint64, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_double( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: f64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_int( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_int64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: sqlite3_int64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_null( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_text64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: sqlite3_uint64, - arg5: ::std::option::Option, - encoding: ::std::os::raw::c_uchar, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_value( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *const sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_pointer( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_void, - arg4: *const ::std::os::raw::c_char, - arg5: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_zeroblob( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_zeroblob64( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - arg3: sqlite3_uint64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_parameter_count(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_bind_parameter_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_bind_parameter_index( - arg1: *mut sqlite3_stmt, - zName: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_clear_bindings(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_count(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_name( - arg1: *mut sqlite3_stmt, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_name16( - arg1: *mut sqlite3_stmt, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_database_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_database_name16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_table_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_table_name16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_origin_name( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_origin_name16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_decltype( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_column_decltype16( - arg1: *mut sqlite3_stmt, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_step(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_data_count(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_blob( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_double(arg1: *mut sqlite3_stmt, iCol: ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn sqlite3_column_int( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_int64( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_column_text( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_column_text16( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_column_value( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> *mut sqlite3_value; -} -extern "C" { - pub fn sqlite3_column_bytes( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_bytes16( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_column_type( - arg1: *mut sqlite3_stmt, - iCol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_finalize(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_reset(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function16( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_void, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_function_v2( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xFunc: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_window_function( - db: *mut sqlite3, - zFunctionName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - eTextRep: ::std::os::raw::c_int, - pApp: *mut ::std::os::raw::c_void, - xStep: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xFinal: ::std::option::Option, - xValue: ::std::option::Option, - xInverse: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_aggregate_count(arg1: *mut sqlite3_context) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_expired(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_transfer_bindings( - arg1: *mut sqlite3_stmt, - arg2: *mut sqlite3_stmt, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_global_recover() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_thread_cleanup(); -} -extern "C" { - pub fn sqlite3_memory_alarm( - arg1: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: sqlite3_int64, - arg3: ::std::os::raw::c_int, - ), - >, - arg2: *mut ::std::os::raw::c_void, - arg3: sqlite3_int64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_blob(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_double(arg1: *mut sqlite3_value) -> f64; -} -extern "C" { - pub fn sqlite3_value_int(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_int64(arg1: *mut sqlite3_value) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_value_pointer( - arg1: *mut sqlite3_value, - arg2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_value_text16(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text16le(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_text16be(arg1: *mut sqlite3_value) -> *const ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_value_bytes(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_bytes16(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_type(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_numeric_type(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_nochange(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_frombind(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_encoding(arg1: *mut sqlite3_value) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_value_subtype(arg1: *mut sqlite3_value) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn sqlite3_value_dup(arg1: *const sqlite3_value) -> *mut sqlite3_value; -} -extern "C" { - pub fn sqlite3_value_free(arg1: *mut sqlite3_value); -} -extern "C" { - pub fn sqlite3_aggregate_context( - arg1: *mut sqlite3_context, - nBytes: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_user_data(arg1: *mut sqlite3_context) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_context_db_handle(arg1: *mut sqlite3_context) -> *mut sqlite3; -} -extern "C" { - pub fn sqlite3_get_auxdata( - arg1: *mut sqlite3_context, - N: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_set_auxdata( - arg1: *mut sqlite3_context, - N: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option, - ); -} -pub type sqlite3_destructor_type = - ::std::option::Option; -extern "C" { - pub fn sqlite3_result_blob( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_blob64( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: sqlite3_uint64, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_double(arg1: *mut sqlite3_context, arg2: f64); -} -extern "C" { - pub fn sqlite3_result_error( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn sqlite3_result_error16( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn sqlite3_result_error_toobig(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_error_nomem(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_error_code(arg1: *mut sqlite3_context, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_int(arg1: *mut sqlite3_context, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_int64(arg1: *mut sqlite3_context, arg2: sqlite3_int64); -} -extern "C" { - pub fn sqlite3_result_null(arg1: *mut sqlite3_context); -} -extern "C" { - pub fn sqlite3_result_text( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_text64( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_char, - arg3: sqlite3_uint64, - arg4: ::std::option::Option, - encoding: ::std::os::raw::c_uchar, - ); -} -extern "C" { - pub fn sqlite3_result_text16( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_text16le( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_text16be( - arg1: *mut sqlite3_context, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_value(arg1: *mut sqlite3_context, arg2: *mut sqlite3_value); -} -extern "C" { - pub fn sqlite3_result_pointer( - arg1: *mut sqlite3_context, - arg2: *mut ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::option::Option, - ); -} -extern "C" { - pub fn sqlite3_result_zeroblob(arg1: *mut sqlite3_context, n: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_result_zeroblob64( - arg1: *mut sqlite3_context, - n: sqlite3_uint64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_result_subtype(arg1: *mut sqlite3_context, arg2: ::std::os::raw::c_uint); -} -extern "C" { - pub fn sqlite3_create_collation( - arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - eTextRep: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - xCompare: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_collation_v2( - arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - eTextRep: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - xCompare: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_collation16( - arg1: *mut sqlite3, - zName: *const ::std::os::raw::c_void, - eTextRep: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - xCompare: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - arg4: ::std::os::raw::c_int, - arg5: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_collation_needed( - arg1: *mut sqlite3, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut sqlite3, - eTextRep: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_collation_needed16( - arg1: *mut sqlite3, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut sqlite3, - eTextRep: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_void, - ), - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_sleep(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub static mut sqlite3_temp_directory: *mut ::std::os::raw::c_char; -} -extern "C" { - pub static mut sqlite3_data_directory: *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_win32_set_directory( - type_: ::std::os::raw::c_ulong, - zValue: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_win32_set_directory8( - type_: ::std::os::raw::c_ulong, - zValue: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_win32_set_directory16( - type_: ::std::os::raw::c_ulong, - zValue: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_get_autocommit(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_handle(arg1: *mut sqlite3_stmt) -> *mut sqlite3; -} -extern "C" { - pub fn sqlite3_db_name( - db: *mut sqlite3, - N: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_db_filename( - db: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - ) -> sqlite3_filename; -} -extern "C" { - pub fn sqlite3_db_readonly( - db: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_txn_state( - arg1: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_next_stmt(pDb: *mut sqlite3, pStmt: *mut sqlite3_stmt) -> *mut sqlite3_stmt; -} -extern "C" { - pub fn sqlite3_commit_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_rollback_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_autovacuum_pages( - db: *mut sqlite3, - arg1: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_uint, - arg4: ::std::os::raw::c_uint, - arg5: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_uint, - >, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_update_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: *const ::std::os::raw::c_char, - arg5: sqlite3_int64, - ), - >, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_enable_shared_cache(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_release_memory(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_release_memory(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_soft_heap_limit64(N: sqlite3_int64) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_hard_heap_limit64(N: sqlite3_int64) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3_soft_heap_limit(N: ::std::os::raw::c_int); -} -extern "C" { - pub fn sqlite3_table_column_metadata( - db: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - zTableName: *const ::std::os::raw::c_char, - zColumnName: *const ::std::os::raw::c_char, - pzDataType: *mut *const ::std::os::raw::c_char, - pzCollSeq: *mut *const ::std::os::raw::c_char, - pNotNull: *mut ::std::os::raw::c_int, - pPrimaryKey: *mut ::std::os::raw::c_int, - pAutoinc: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_load_extension( - db: *mut sqlite3, - zFile: *const ::std::os::raw::c_char, - zProc: *const ::std::os::raw::c_char, - pzErrMsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_enable_load_extension( - db: *mut sqlite3, - onoff: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_cancel_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_reset_auto_extension(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_module { - pub iVersion: ::std::os::raw::c_int, - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3, - pAux: *mut ::std::os::raw::c_void, - argc: ::std::os::raw::c_int, - argv: *const *const ::std::os::raw::c_char, - ppVTab: *mut *mut sqlite3_vtab, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xConnect: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3, - pAux: *mut ::std::os::raw::c_void, - argc: ::std::os::raw::c_int, - argv: *const *const ::std::os::raw::c_char, - ppVTab: *mut *mut sqlite3_vtab, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xBestIndex: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: *mut sqlite3_index_info, - ) -> ::std::os::raw::c_int, - >, - pub xDisconnect: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xDestroy: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xOpen: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - ppCursor: *mut *mut sqlite3_vtab_cursor, - ) -> ::std::os::raw::c_int, - >, - pub xClose: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::std::os::raw::c_int, - >, - pub xFilter: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab_cursor, - idxNum: ::std::os::raw::c_int, - idxStr: *const ::std::os::raw::c_char, - argc: ::std::os::raw::c_int, - argv: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int, - >, - pub xNext: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::std::os::raw::c_int, - >, - pub xEof: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_vtab_cursor) -> ::std::os::raw::c_int, - >, - pub xColumn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab_cursor, - arg2: *mut sqlite3_context, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRowid: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab_cursor, - pRowid: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xUpdate: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_vtab, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - arg4: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xBegin: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xSync: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xCommit: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xRollback: ::std::option::Option< - unsafe extern "C" fn(pVTab: *mut sqlite3_vtab) -> ::std::os::raw::c_int, - >, - pub xFindFunction: ::std::option::Option< - unsafe extern "C" fn( - pVtab: *mut sqlite3_vtab, - nArg: ::std::os::raw::c_int, - zName: *const ::std::os::raw::c_char, - pxFunc: *mut ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_context, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ), - >, - ppArg: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - pub xRename: ::std::option::Option< - unsafe extern "C" fn( - pVtab: *mut sqlite3_vtab, - zNew: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub xSavepoint: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRelease: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRollbackTo: ::std::option::Option< - unsafe extern "C" fn( - pVTab: *mut sqlite3_vtab, - arg1: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xShadowName: ::std::option::Option< - unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int, - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_info { - pub nConstraint: ::std::os::raw::c_int, - pub aConstraint: *mut sqlite3_index_constraint, - pub nOrderBy: ::std::os::raw::c_int, - pub aOrderBy: *mut sqlite3_index_orderby, - pub aConstraintUsage: *mut sqlite3_index_constraint_usage, - pub idxNum: ::std::os::raw::c_int, - pub idxStr: *mut ::std::os::raw::c_char, - pub needToFreeIdxStr: ::std::os::raw::c_int, - pub orderByConsumed: ::std::os::raw::c_int, - pub estimatedCost: f64, - pub estimatedRows: sqlite3_int64, - pub idxFlags: ::std::os::raw::c_int, - pub colUsed: sqlite3_uint64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_constraint { - pub iColumn: ::std::os::raw::c_int, - pub op: ::std::os::raw::c_uchar, - pub usable: ::std::os::raw::c_uchar, - pub iTermOffset: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_orderby { - pub iColumn: ::std::os::raw::c_int, - pub desc: ::std::os::raw::c_uchar, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_index_constraint_usage { - pub argvIndex: ::std::os::raw::c_int, - pub omit: ::std::os::raw::c_uchar, -} -extern "C" { - pub fn sqlite3_create_module( - db: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - p: *const sqlite3_module, - pClientData: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_create_module_v2( - db: *mut sqlite3, - zName: *const ::std::os::raw::c_char, - p: *const sqlite3_module, - pClientData: *mut ::std::os::raw::c_void, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_drop_modules( - db: *mut sqlite3, - azKeep: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_vtab { - pub pModule: *const sqlite3_module, - pub nRef: ::std::os::raw::c_int, - pub zErrMsg: *mut ::std::os::raw::c_char, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_vtab_cursor { - pub pVtab: *mut sqlite3_vtab, -} -extern "C" { - pub fn sqlite3_declare_vtab( - arg1: *mut sqlite3, - zSQL: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_overload_function( - arg1: *mut sqlite3, - zFuncName: *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_blob { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_blob_open( - arg1: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - zTable: *const ::std::os::raw::c_char, - zColumn: *const ::std::os::raw::c_char, - iRow: sqlite3_int64, - flags: ::std::os::raw::c_int, - ppBlob: *mut *mut sqlite3_blob, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_reopen( - arg1: *mut sqlite3_blob, - arg2: sqlite3_int64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_close(arg1: *mut sqlite3_blob) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_bytes(arg1: *mut sqlite3_blob) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_read( - arg1: *mut sqlite3_blob, - Z: *mut ::std::os::raw::c_void, - N: ::std::os::raw::c_int, - iOffset: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_blob_write( - arg1: *mut sqlite3_blob, - z: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - iOffset: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vfs_find(zVfsName: *const ::std::os::raw::c_char) -> *mut sqlite3_vfs; -} -extern "C" { - pub fn sqlite3_vfs_register( - arg1: *mut sqlite3_vfs, - makeDflt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vfs_unregister(arg1: *mut sqlite3_vfs) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_alloc(arg1: ::std::os::raw::c_int) -> *mut sqlite3_mutex; -} -extern "C" { - pub fn sqlite3_mutex_free(arg1: *mut sqlite3_mutex); -} -extern "C" { - pub fn sqlite3_mutex_enter(arg1: *mut sqlite3_mutex); -} -extern "C" { - pub fn sqlite3_mutex_try(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_leave(arg1: *mut sqlite3_mutex); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_mutex_methods { - pub xMutexInit: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexEnd: ::std::option::Option ::std::os::raw::c_int>, - pub xMutexAlloc: ::std::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> *mut sqlite3_mutex, - >, - pub xMutexFree: ::std::option::Option, - pub xMutexEnter: ::std::option::Option, - pub xMutexTry: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int, - >, - pub xMutexLeave: ::std::option::Option, - pub xMutexHeld: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int, - >, - pub xMutexNotheld: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int, - >, -} -extern "C" { - pub fn sqlite3_mutex_held(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_mutex_notheld(arg1: *mut sqlite3_mutex) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_mutex(arg1: *mut sqlite3) -> *mut sqlite3_mutex; -} -extern "C" { - pub fn sqlite3_file_control( - arg1: *mut sqlite3, - zDbName: *const ::std::os::raw::c_char, - op: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_test_control(op: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_keyword_count() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_keyword_name( - arg1: ::std::os::raw::c_int, - arg2: *mut *const ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_keyword_check( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_str { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_str_new(arg1: *mut sqlite3) -> *mut sqlite3_str; -} -extern "C" { - pub fn sqlite3_str_finish(arg1: *mut sqlite3_str) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_str_appendf(arg1: *mut sqlite3_str, zFormat: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn sqlite3_str_append( - arg1: *mut sqlite3_str, - zIn: *const ::std::os::raw::c_char, - N: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn sqlite3_str_appendall(arg1: *mut sqlite3_str, zIn: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn sqlite3_str_appendchar( - arg1: *mut sqlite3_str, - N: ::std::os::raw::c_int, - C: ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn sqlite3_str_reset(arg1: *mut sqlite3_str); -} -extern "C" { - pub fn sqlite3_str_errcode(arg1: *mut sqlite3_str) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_str_length(arg1: *mut sqlite3_str) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_str_value(arg1: *mut sqlite3_str) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_status( - op: ::std::os::raw::c_int, - pCurrent: *mut ::std::os::raw::c_int, - pHighwater: *mut ::std::os::raw::c_int, - resetFlag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_status64( - op: ::std::os::raw::c_int, - pCurrent: *mut sqlite3_int64, - pHighwater: *mut sqlite3_int64, - resetFlag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_db_status( - arg1: *mut sqlite3, - op: ::std::os::raw::c_int, - pCur: *mut ::std::os::raw::c_int, - pHiwtr: *mut ::std::os::raw::c_int, - resetFlg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_status( - arg1: *mut sqlite3_stmt, - op: ::std::os::raw::c_int, - resetFlg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache_page { - pub pBuf: *mut ::std::os::raw::c_void, - pub pExtra: *mut ::std::os::raw::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache_methods2 { - pub iVersion: ::std::os::raw::c_int, - pub pArg: *mut ::std::os::raw::c_void, - pub xInit: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xShutdown: ::std::option::Option, - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - szPage: ::std::os::raw::c_int, - szExtra: ::std::os::raw::c_int, - bPurgeable: ::std::os::raw::c_int, - ) -> *mut sqlite3_pcache, - >, - pub xCachesize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, nCachesize: ::std::os::raw::c_int), - >, - pub xPagecount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache) -> ::std::os::raw::c_int, - >, - pub xFetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - key: ::std::os::raw::c_uint, - createFlag: ::std::os::raw::c_int, - ) -> *mut sqlite3_pcache_page, - >, - pub xUnpin: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut sqlite3_pcache_page, - discard: ::std::os::raw::c_int, - ), - >, - pub xRekey: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut sqlite3_pcache_page, - oldKey: ::std::os::raw::c_uint, - newKey: ::std::os::raw::c_uint, - ), - >, - pub xTruncate: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, iLimit: ::std::os::raw::c_uint), - >, - pub xDestroy: ::std::option::Option, - pub xShrink: ::std::option::Option, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_pcache_methods { - pub pArg: *mut ::std::os::raw::c_void, - pub xInit: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub xShutdown: ::std::option::Option, - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - szPage: ::std::os::raw::c_int, - bPurgeable: ::std::os::raw::c_int, - ) -> *mut sqlite3_pcache, - >, - pub xCachesize: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, nCachesize: ::std::os::raw::c_int), - >, - pub xPagecount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache) -> ::std::os::raw::c_int, - >, - pub xFetch: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - key: ::std::os::raw::c_uint, - createFlag: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, - >, - pub xUnpin: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut ::std::os::raw::c_void, - discard: ::std::os::raw::c_int, - ), - >, - pub xRekey: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_pcache, - arg2: *mut ::std::os::raw::c_void, - oldKey: ::std::os::raw::c_uint, - newKey: ::std::os::raw::c_uint, - ), - >, - pub xTruncate: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_pcache, iLimit: ::std::os::raw::c_uint), - >, - pub xDestroy: ::std::option::Option, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_backup { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3_backup_init( - pDest: *mut sqlite3, - zDestName: *const ::std::os::raw::c_char, - pSource: *mut sqlite3, - zSourceName: *const ::std::os::raw::c_char, - ) -> *mut sqlite3_backup; -} -extern "C" { - pub fn sqlite3_backup_step( - p: *mut sqlite3_backup, - nPage: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_finish(p: *mut sqlite3_backup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_remaining(p: *mut sqlite3_backup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_backup_pagecount(p: *mut sqlite3_backup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_unlock_notify( - pBlocked: *mut sqlite3, - xNotify: ::std::option::Option< - unsafe extern "C" fn( - apArg: *mut *mut ::std::os::raw::c_void, - nArg: ::std::os::raw::c_int, - ), - >, - pNotifyArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stricmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strnicmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strglob( - zGlob: *const ::std::os::raw::c_char, - zStr: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_strlike( - zGlob: *const ::std::os::raw::c_char, - zStr: *const ::std::os::raw::c_char, - cEsc: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_log( - iErrCode: ::std::os::raw::c_int, - zFormat: *const ::std::os::raw::c_char, - ... - ); -} -extern "C" { - pub fn sqlite3_wal_hook( - arg1: *mut sqlite3, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut sqlite3, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_wal_autocheckpoint( - db: *mut sqlite3, - N: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_wal_checkpoint( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_wal_checkpoint_v2( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - eMode: ::std::os::raw::c_int, - pnLog: *mut ::std::os::raw::c_int, - pnCkpt: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_config( - arg1: *mut sqlite3, - op: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_on_conflict(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_nochange(arg1: *mut sqlite3_context) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_collation( - arg1: *mut sqlite3_index_info, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sqlite3_vtab_distinct(arg1: *mut sqlite3_index_info) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_in( - arg1: *mut sqlite3_index_info, - iCons: ::std::os::raw::c_int, - bHandle: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_in_first( - pVal: *mut sqlite3_value, - ppOut: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_in_next( - pVal: *mut sqlite3_value, - ppOut: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_vtab_rhs_value( - arg1: *mut sqlite3_index_info, - arg2: ::std::os::raw::c_int, - ppVal: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_scanstatus( - pStmt: *mut sqlite3_stmt, - idx: ::std::os::raw::c_int, - iScanStatusOp: ::std::os::raw::c_int, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_scanstatus_v2( - pStmt: *mut sqlite3_stmt, - idx: ::std::os::raw::c_int, - iScanStatusOp: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_stmt_scanstatus_reset(arg1: *mut sqlite3_stmt); -} -extern "C" { - pub fn sqlite3_db_cacheflush(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_hook( - db: *mut sqlite3, - xPreUpdate: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - db: *mut sqlite3, - op: ::std::os::raw::c_int, - zDb: *const ::std::os::raw::c_char, - zName: *const ::std::os::raw::c_char, - iKey1: sqlite3_int64, - iKey2: sqlite3_int64, - ), - >, - arg1: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn sqlite3_preupdate_old( - arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_count(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_depth(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_new( - arg1: *mut sqlite3, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_preupdate_blobwrite(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_system_errno(arg1: *mut sqlite3) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_snapshot { - pub hidden: [::std::os::raw::c_uchar; 48usize], -} -extern "C" { - pub fn sqlite3_snapshot_get( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - ppSnapshot: *mut *mut sqlite3_snapshot, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_snapshot_open( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - pSnapshot: *mut sqlite3_snapshot, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_snapshot_free(arg1: *mut sqlite3_snapshot); -} -extern "C" { - pub fn sqlite3_snapshot_cmp( - p1: *mut sqlite3_snapshot, - p2: *mut sqlite3_snapshot, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_snapshot_recover( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3_serialize( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - piSize: *mut sqlite3_int64, - mFlags: ::std::os::raw::c_uint, - ) -> *mut ::std::os::raw::c_uchar; -} -extern "C" { - pub fn sqlite3_deserialize( - db: *mut sqlite3, - zSchema: *const ::std::os::raw::c_char, - pData: *mut ::std::os::raw::c_uchar, - szDb: sqlite3_int64, - szBuf: sqlite3_int64, - mFlags: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -pub type sqlite3_rtree_dbl = f64; -extern "C" { - pub fn sqlite3_rtree_geometry_callback( - db: *mut sqlite3, - zGeom: *const ::std::os::raw::c_char, - xGeom: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut sqlite3_rtree_geometry, - arg2: ::std::os::raw::c_int, - arg3: *mut sqlite3_rtree_dbl, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pContext: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_rtree_geometry { - pub pContext: *mut ::std::os::raw::c_void, - pub nParam: ::std::os::raw::c_int, - pub aParam: *mut sqlite3_rtree_dbl, - pub pUser: *mut ::std::os::raw::c_void, - pub xDelUser: ::std::option::Option, -} -extern "C" { - pub fn sqlite3_rtree_query_callback( - db: *mut sqlite3, - zQueryFunc: *const ::std::os::raw::c_char, - xQueryFunc: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut sqlite3_rtree_query_info) -> ::std::os::raw::c_int, - >, - pContext: *mut ::std::os::raw::c_void, - xDestructor: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_rtree_query_info { - pub pContext: *mut ::std::os::raw::c_void, - pub nParam: ::std::os::raw::c_int, - pub aParam: *mut sqlite3_rtree_dbl, - pub pUser: *mut ::std::os::raw::c_void, - pub xDelUser: ::std::option::Option, - pub aCoord: *mut sqlite3_rtree_dbl, - pub anQueue: *mut ::std::os::raw::c_uint, - pub nCoord: ::std::os::raw::c_int, - pub iLevel: ::std::os::raw::c_int, - pub mxLevel: ::std::os::raw::c_int, - pub iRowid: sqlite3_int64, - pub rParentScore: sqlite3_rtree_dbl, - pub eParentWithin: ::std::os::raw::c_int, - pub eWithin: ::std::os::raw::c_int, - pub rScore: sqlite3_rtree_dbl, - pub apSqlParam: *mut *mut sqlite3_value, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_session { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_changeset_iter { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3session_create( - db: *mut sqlite3, - zDb: *const ::std::os::raw::c_char, - ppSession: *mut *mut sqlite3_session, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_delete(pSession: *mut sqlite3_session); -} -extern "C" { - pub fn sqlite3session_object_config( - arg1: *mut sqlite3_session, - op: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_enable( - pSession: *mut sqlite3_session, - bEnable: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_indirect( - pSession: *mut sqlite3_session, - bIndirect: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_attach( - pSession: *mut sqlite3_session, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_table_filter( - pSession: *mut sqlite3_session, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn sqlite3session_changeset( - pSession: *mut sqlite3_session, - pnChangeset: *mut ::std::os::raw::c_int, - ppChangeset: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_changeset_size(pSession: *mut sqlite3_session) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3session_diff( - pSession: *mut sqlite3_session, - zFromDb: *const ::std::os::raw::c_char, - zTbl: *const ::std::os::raw::c_char, - pzErrMsg: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_patchset( - pSession: *mut sqlite3_session, - pnPatchset: *mut ::std::os::raw::c_int, - ppPatchset: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_isempty(pSession: *mut sqlite3_session) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_memory_used(pSession: *mut sqlite3_session) -> sqlite3_int64; -} -extern "C" { - pub fn sqlite3changeset_start( - pp: *mut *mut sqlite3_changeset_iter, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_start_v2( - pp: *mut *mut sqlite3_changeset_iter, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_next(pIter: *mut sqlite3_changeset_iter) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_op( - pIter: *mut sqlite3_changeset_iter, - pzTab: *mut *const ::std::os::raw::c_char, - pnCol: *mut ::std::os::raw::c_int, - pOp: *mut ::std::os::raw::c_int, - pbIndirect: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_pk( - pIter: *mut sqlite3_changeset_iter, - pabPK: *mut *mut ::std::os::raw::c_uchar, - pnCol: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_old( - pIter: *mut sqlite3_changeset_iter, - iVal: ::std::os::raw::c_int, - ppValue: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_new( - pIter: *mut sqlite3_changeset_iter, - iVal: ::std::os::raw::c_int, - ppValue: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_conflict( - pIter: *mut sqlite3_changeset_iter, - iVal: ::std::os::raw::c_int, - ppValue: *mut *mut sqlite3_value, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_fk_conflicts( - pIter: *mut sqlite3_changeset_iter, - pnOut: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_finalize(pIter: *mut sqlite3_changeset_iter) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_invert( - nIn: ::std::os::raw::c_int, - pIn: *const ::std::os::raw::c_void, - pnOut: *mut ::std::os::raw::c_int, - ppOut: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_concat( - nA: ::std::os::raw::c_int, - pA: *mut ::std::os::raw::c_void, - nB: ::std::os::raw::c_int, - pB: *mut ::std::os::raw::c_void, - pnOut: *mut ::std::os::raw::c_int, - ppOut: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_changegroup { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3changegroup_new(pp: *mut *mut sqlite3_changegroup) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_add( - arg1: *mut sqlite3_changegroup, - nData: ::std::os::raw::c_int, - pData: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_output( - arg1: *mut sqlite3_changegroup, - pnData: *mut ::std::os::raw::c_int, - ppData: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_delete(arg1: *mut sqlite3_changegroup); -} -extern "C" { - pub fn sqlite3changeset_apply( - db: *mut sqlite3, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_apply_v2( - db: *mut sqlite3, - nChangeset: ::std::os::raw::c_int, - pChangeset: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ppRebase: *mut *mut ::std::os::raw::c_void, - pnRebase: *mut ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sqlite3_rebaser { - _unused: [u8; 0], -} -extern "C" { - pub fn sqlite3rebaser_create(ppNew: *mut *mut sqlite3_rebaser) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_configure( - arg1: *mut sqlite3_rebaser, - nRebase: ::std::os::raw::c_int, - pRebase: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_rebase( - arg1: *mut sqlite3_rebaser, - nIn: ::std::os::raw::c_int, - pIn: *const ::std::os::raw::c_void, - pnOut: *mut ::std::os::raw::c_int, - ppOut: *mut *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_delete(p: *mut sqlite3_rebaser); -} -extern "C" { - pub fn sqlite3changeset_apply_strm( - db: *mut sqlite3, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_apply_v2_strm( - db: *mut sqlite3, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xFilter: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - zTab: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - xConflict: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - eConflict: ::std::os::raw::c_int, - p: *mut sqlite3_changeset_iter, - ) -> ::std::os::raw::c_int, - >, - pCtx: *mut ::std::os::raw::c_void, - ppRebase: *mut *mut ::std::os::raw::c_void, - pnRebase: *mut ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_concat_strm( - xInputA: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pInA: *mut ::std::os::raw::c_void, - xInputB: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pInB: *mut ::std::os::raw::c_void, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_invert_strm( - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_start_strm( - pp: *mut *mut sqlite3_changeset_iter, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changeset_start_v2_strm( - pp: *mut *mut sqlite3_changeset_iter, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_changeset_strm( - pSession: *mut sqlite3_session, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_patchset_strm( - pSession: *mut sqlite3_session, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_add_strm( - arg1: *mut sqlite3_changegroup, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3changegroup_output_strm( - arg1: *mut sqlite3_changegroup, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3rebaser_rebase_strm( - pRebaser: *mut sqlite3_rebaser, - xInput: ::std::option::Option< - unsafe extern "C" fn( - pIn: *mut ::std::os::raw::c_void, - pData: *mut ::std::os::raw::c_void, - pnData: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pIn: *mut ::std::os::raw::c_void, - xOutput: ::std::option::Option< - unsafe extern "C" fn( - pOut: *mut ::std::os::raw::c_void, - pData: *const ::std::os::raw::c_void, - nData: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pOut: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sqlite3session_config( - op: ::std::os::raw::c_int, - pArg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5Context { - _unused: [u8; 0], -} -pub type fts5_extension_function = ::std::option::Option< - unsafe extern "C" fn( - pApi: *const Fts5ExtensionApi, - pFts: *mut Fts5Context, - pCtx: *mut sqlite3_context, - nVal: ::std::os::raw::c_int, - apVal: *mut *mut sqlite3_value, - ), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5PhraseIter { - pub a: *const ::std::os::raw::c_uchar, - pub b: *const ::std::os::raw::c_uchar, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5ExtensionApi { - pub iVersion: ::std::os::raw::c_int, - pub xUserData: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Fts5Context) -> *mut ::std::os::raw::c_void, - >, - pub xColumnCount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Fts5Context) -> ::std::os::raw::c_int, - >, - pub xRowCount: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pnRow: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xColumnTotalSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iCol: ::std::os::raw::c_int, - pnToken: *mut sqlite3_int64, - ) -> ::std::os::raw::c_int, - >, - pub xTokenize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pText: *const ::std::os::raw::c_char, - nText: ::std::os::raw::c_int, - pCtx: *mut ::std::os::raw::c_void, - xToken: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >, - pub xPhraseCount: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Fts5Context) -> ::std::os::raw::c_int, - >, - pub xPhraseSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xInstCount: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pnInst: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xInst: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iIdx: ::std::os::raw::c_int, - piPhrase: *mut ::std::os::raw::c_int, - piCol: *mut ::std::os::raw::c_int, - piOff: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xRowid: - ::std::option::Option sqlite3_int64>, - pub xColumnText: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iCol: ::std::os::raw::c_int, - pz: *mut *const ::std::os::raw::c_char, - pn: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xColumnSize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iCol: ::std::os::raw::c_int, - pnToken: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xQueryPhrase: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - pUserData: *mut ::std::os::raw::c_void, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const Fts5ExtensionApi, - arg2: *mut Fts5Context, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >, - pub xSetAuxdata: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - pAux: *mut ::std::os::raw::c_void, - xDelete: ::std::option::Option, - ) -> ::std::os::raw::c_int, - >, - pub xGetAuxdata: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - bClear: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, - >, - pub xPhraseFirst: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - arg2: *mut Fts5PhraseIter, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xPhraseNext: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - arg2: *mut Fts5PhraseIter, - piCol: *mut ::std::os::raw::c_int, - piOff: *mut ::std::os::raw::c_int, - ), - >, - pub xPhraseFirstColumn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - iPhrase: ::std::os::raw::c_int, - arg2: *mut Fts5PhraseIter, - arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub xPhraseNextColumn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Context, - arg2: *mut Fts5PhraseIter, - piCol: *mut ::std::os::raw::c_int, - ), - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Fts5Tokenizer { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fts5_tokenizer { - pub xCreate: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - azArg: *mut *const ::std::os::raw::c_char, - nArg: ::std::os::raw::c_int, - ppOut: *mut *mut Fts5Tokenizer, - ) -> ::std::os::raw::c_int, - >, - pub xDelete: ::std::option::Option, - pub xTokenize: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Fts5Tokenizer, - pCtx: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - pText: *const ::std::os::raw::c_char, - nText: ::std::os::raw::c_int, - xToken: ::std::option::Option< - unsafe extern "C" fn( - pCtx: *mut ::std::os::raw::c_void, - tflags: ::std::os::raw::c_int, - pToken: *const ::std::os::raw::c_char, - nToken: ::std::os::raw::c_int, - iStart: ::std::os::raw::c_int, - iEnd: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int, - >, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fts5_api { - pub iVersion: ::std::os::raw::c_int, - pub xCreateTokenizer: ::std::option::Option< - unsafe extern "C" fn( - pApi: *mut fts5_api, - zName: *const ::std::os::raw::c_char, - pContext: *mut ::std::os::raw::c_void, - pTokenizer: *mut fts5_tokenizer, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int, - >, - pub xFindTokenizer: ::std::option::Option< - unsafe extern "C" fn( - pApi: *mut fts5_api, - zName: *const ::std::os::raw::c_char, - ppContext: *mut *mut ::std::os::raw::c_void, - pTokenizer: *mut fts5_tokenizer, - ) -> ::std::os::raw::c_int, - >, - pub xCreateFunction: ::std::option::Option< - unsafe extern "C" fn( - pApi: *mut fts5_api, - zName: *const ::std::os::raw::c_char, - pContext: *mut ::std::os::raw::c_void, - xFunction: fts5_extension_function, - xDestroy: ::std::option::Option, - ) -> ::std::os::raw::c_int, - >, -} diff --git a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml b/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml deleted file mode 100644 index 240a5c89c3f6d..0000000000000 --- a/shim/third-party/rust/fixups/libsqlite3-sys/fixups.toml +++ /dev/null @@ -1,16 +0,0 @@ -# libsqlite3-sys uses a bindgen binding to libsqlite. -# We can't easily import bindgen because of its libclang dependency, -# so in the meantime we need to use pre-generated bindgen files. - -env = { "OUT_DIR" = "$(location //third-party/rust/fixups/libsqlite3-sys:out_dir)" } - -[[buildscript]] -[buildscript.cxx_library] -name = "sqlite3" -srcs = ["sqlite3/sqlite3.c"] -headers = ["sqlite3/*.h"] -preprocessor_flags = [ - "-DSQLITE_ENABLE_COLUMN_METADATA", - "-DSQLITE_ENABLE_FTS3", - "-DSQLITE_ENABLE_RTREE", -] diff --git a/shim/third-party/rust/fixups/lock_api/fixups.toml b/shim/third-party/rust/fixups/lock_api/fixups.toml deleted file mode 100644 index 6c1a3d45a5a33..0000000000000 --- a/shim/third-party/rust/fixups/lock_api/fixups.toml +++ /dev/null @@ -1,3 +0,0 @@ -# the build script for lock_api is a version check for rust 1.61. -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/log/fixups.toml b/shim/third-party/rust/fixups/log/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/log/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/memchr/fixups.toml b/shim/third-party/rust/fixups/memchr/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/memchr/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/memoffset/fixups.toml b/shim/third-party/rust/fixups/memoffset/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/memoffset/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/mio/fixups.toml b/shim/third-party/rust/fixups/mio/fixups.toml deleted file mode 100644 index af7edb27e3bb7..0000000000000 --- a/shim/third-party/rust/fixups/mio/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/native-tls/fixups.toml b/shim/third-party/rust/fixups/native-tls/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/native-tls/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/nix/fixups.toml b/shim/third-party/rust/fixups/nix/fixups.toml deleted file mode 100644 index 1849ea069d254..0000000000000 --- a/shim/third-party/rust/fixups/nix/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/nom/fixups.toml b/shim/third-party/rust/fixups/nom/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/nom/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/ntapi/fixups.toml b/shim/third-party/rust/fixups/ntapi/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/ntapi/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/num-bigint/fixups.toml b/shim/third-party/rust/fixups/num-bigint/fixups.toml deleted file mode 100644 index df0b424f49700..0000000000000 --- a/shim/third-party/rust/fixups/num-bigint/fixups.toml +++ /dev/null @@ -1,5 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/num-integer/fixups.toml b/shim/third-party/rust/fixups/num-integer/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/num-integer/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/num-traits/fixups.toml b/shim/third-party/rust/fixups/num-traits/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/num-traits/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/oid-registry/fixups.toml b/shim/third-party/rust/fixups/oid-registry/fixups.toml deleted file mode 100644 index 79d5cb979d12d..0000000000000 --- a/shim/third-party/rust/fixups/oid-registry/fixups.toml +++ /dev/null @@ -1,7 +0,0 @@ -cargo_env = [ - "CARGO_PKG_NAME", # Needed by _buck1_handle_manifest_dir - "CARGO_MANIFEST_DIR", -] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/parking_lot/fixups.toml b/shim/third-party/rust/fixups/parking_lot/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/parking_lot/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml b/shim/third-party/rust/fixups/parking_lot_core/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/parking_lot_core/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/paste/fixups.toml b/shim/third-party/rust/fixups/paste/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/paste/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/pest/fixups.toml b/shim/third-party/rust/fixups/pest/fixups.toml deleted file mode 100644 index af7edb27e3bb7..0000000000000 --- a/shim/third-party/rust/fixups/pest/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml b/shim/third-party/rust/fixups/pin-project-internal/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/pin-project-internal/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/platforms/fixups.toml b/shim/third-party/rust/fixups/platforms/fixups.toml deleted file mode 100644 index e086791cd2f5b..0000000000000 --- a/shim/third-party/rust/fixups/platforms/fixups.toml +++ /dev/null @@ -1,26 +0,0 @@ -# Buildscript sets TARGET in environment -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] -env = { TARGET = "aarch64-unknown-linux-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] -env = { TARGET = "x86_64-unknown-linux-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "macos", target_arch = "aarch64"))'] -env = { TARGET = "aarch64-apple-darwin" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "macos", target_arch = "x86_64"))'] -env = { TARGET = "x86_64-apple-darwin" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] -env = { TARGET = "x86_64-pc-windows-gnu" } -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] -env = { TARGET = "x86_64-pc-windows-msvc" } -buildscript = [] diff --git a/shim/third-party/rust/fixups/prettyplease/fixups.toml b/shim/third-party/rust/fixups/prettyplease/fixups.toml deleted file mode 100644 index 3510928422a31..0000000000000 --- a/shim/third-party/rust/fixups/prettyplease/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -buildscript = [] -cargo_env = true diff --git a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro-error-attr/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml b/shim/third-party/rust/fixups/proc-macro-error/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro-error/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml b/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro-hack/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/proc-macro2/fixups.toml b/shim/third-party/rust/fixups/proc-macro2/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/proc-macro2/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/prost-build/fixups.toml b/shim/third-party/rust/fixups/prost-build/fixups.toml deleted file mode 100644 index 5865e69048455..0000000000000 --- a/shim/third-party/rust/fixups/prost-build/fixups.toml +++ /dev/null @@ -1,7 +0,0 @@ -buildscript = [] - -# These are here because the crate uses the env! macro -# We override them at runtime. -[env] -PROTOC = "" -PROTOC_INCLUDE = "" diff --git a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml b/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/pulldown-cmark/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/quote/fixups.toml b/shim/third-party/rust/fixups/quote/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/quote/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/radium/fixups.toml b/shim/third-party/rust/fixups/radium/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/radium/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/rayon-core/fixups.toml b/shim/third-party/rust/fixups/rayon-core/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/rayon-core/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/ref-cast/fixups.toml b/shim/third-party/rust/fixups/ref-cast/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/ref-cast/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/reqwest/fixups.toml b/shim/third-party/rust/fixups/reqwest/fixups.toml deleted file mode 100644 index af7edb27e3bb7..0000000000000 --- a/shim/third-party/rust/fixups/reqwest/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/ring/fixups.toml b/shim/third-party/rust/fixups/ring/fixups.toml deleted file mode 100644 index d2c83589cf4de..0000000000000 --- a/shim/third-party/rust/fixups/ring/fixups.toml +++ /dev/null @@ -1,162 +0,0 @@ -# Copied from fbsource fixup. - -buildscript = [] - -# Generate a C/C++ build rule for all the C code - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.buildscript.cxx_library] -name = "ring-c-asm-elf-x86_84" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-elf.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -# redundant `any` is needed to differentiate key for config specific to v0.17.5 version -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "linux")))'.buildscript.cxx_library] -name = "ring-c-asm-elf-x86_84" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-elf.S", "third_party/fiat/asm/fiat_curve25519_adx_mul.S", "third_party/fiat/asm/fiat_curve25519_adx_square.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.buildscript.cxx_library] -name = "ring-c-asm-elf-aarch64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-linux64.S", "pregenerated/*armx*-linux64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "linux")))'.buildscript.cxx_library] -name = "ring-c-asm-elf-aarch64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-linux64.S", "pregenerated/*armx*-linux64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.buildscript.cxx_library] -name = "ring-c-asm-macos-x86_64" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-macosx.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "macos")))'.buildscript.cxx_library] -name = "ring-c-asm-macos-x86_64" -srcs = [ "crypto/**/*.c", "pregenerated/*x86_64*-macosx.S", "third_party/fiat/asm/fiat_curve25519_adx_mul.S", "third_party/fiat/asm/fiat_curve25519_adx_square.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "macos"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "aarch64", target_os = "macos"))'.buildscript.cxx_library] -name = "ring-c-asm-macos-arm64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-ios64.S", "pregenerated/*armx*-ios64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "aarch64", target_os = "macos")))'.buildscript.cxx_library] -name = "ring-c-asm-macos-arm64" -srcs = [ "crypto/**/*.c", "pregenerated/*armv8*-ios64.S", "pregenerated/*armx*-ios64.S" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -exclude = [ "crypto/cpu-intel.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu"))'.buildscript.cxx_library] -name = "ring-c-win-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "gnu")))'.buildscript.cxx_library] -name = "ring-c-win-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -compiler_flags = ["-Wno-error"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "ring-c-win-msvc-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'] -version = "=0.17.5" -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.env] -RING_CORE_PREFIX = "ring_core_0_17_5_" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows", target_env = "msvc")))'.buildscript.cxx_library] -name = "ring-c-win-msvc-x86_84" -srcs = [ "crypto/**/*.c" ] -headers = [ "include/**/*.h", "crypto/**/*.h", "third_party/**/*.h", "crypto/**/*.inl" ] -# Exclude C AES because we've got the x86_64 one -exclude = [ "crypto/fipsmodule/aes/aes.c" ] -include_paths = ["include"] -fixup_include_paths = ["include"] - -[[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.buildscript]] -[platform_fixup.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.buildscript.prebuilt_cxx_library] -name = "ring-asm-windows-x86_84" -static_libs = [ "pregenerated/*x86_64*-nasm.obj" ] - -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'] -version = "=0.17.5" -[[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'.buildscript]] -[platform_fixup.'cfg(any(all(target_arch = "x86_64", target_os = "windows")))'.buildscript.prebuilt_cxx_library] -name = "ring-asm-windows-x86_84" -static_libs = [ "pregenerated/*x86_64*-nasm.o" ] diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h deleted file mode 100644 index 9ee40055efdaf..0000000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols.h +++ /dev/null @@ -1,119 +0,0 @@ - -#ifndef ring_core_generated_PREFIX_SYMBOLS_H -#define ring_core_generated_PREFIX_SYMBOLS_H - -#define ecp_nistz256_point_double p256_point_double -#define ecp_nistz256_point_add p256_point_add -#define ecp_nistz256_point_add_affine p256_point_add_affine -#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -#define ecp_nistz256_mul_mont p256_mul_mont -#define ecp_nistz256_sqr_mont p256_sqr_mont -#define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -#define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -#define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -#define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -#define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -#define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -#define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -#define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -#define LIMBS_equal ring_core_0_17_5_LIMBS_equal -#define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -#define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -#define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -#define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -#define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -#define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -#define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -#define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -#define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -#define LIMB_shr ring_core_0_17_5_LIMB_shr -#define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -#define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -#define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -#define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -#define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -#define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -#define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -#define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -#define bn_gather5 ring_core_0_17_5_bn_gather5 -#define bn_mul_mont ring_core_0_17_5_bn_mul_mont -#define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -#define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define bn_power5 ring_core_0_17_5_bn_power5 -#define bn_scatter5 ring_core_0_17_5_bn_scatter5 -#define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -#define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -#define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -#define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -#define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -#define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -#define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -#define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -#define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -#define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -#define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -#define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -#define gcm_init_avx ring_core_0_17_5_gcm_init_avx -#define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -#define gcm_init_neon ring_core_0_17_5_gcm_init_neon -#define k25519Precomp ring_core_0_17_5_k25519Precomp -#define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -#define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -#define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -#define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -#define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -#define p256_mul_mont ring_core_0_17_5_p256_mul_mont -#define p256_point_add ring_core_0_17_5_p256_point_add -#define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -#define p256_point_double ring_core_0_17_5_p256_point_double -#define p256_point_mul ring_core_0_17_5_p256_point_mul -#define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -#define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -#define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -#define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -#define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -#define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -#define p384_elem_neg ring_core_0_17_5_p384_elem_neg -#define p384_elem_sub ring_core_0_17_5_p384_elem_sub -#define p384_point_add ring_core_0_17_5_p384_point_add -#define p384_point_double ring_core_0_17_5_p384_point_double -#define p384_point_mul ring_core_0_17_5_p384_point_mul -#define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -#define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -#define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -#define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -#define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -#define x25519_NEON ring_core_0_17_5_x25519_NEON -#define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -#define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -#define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -#define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -#define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -#define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -#define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -#define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -#define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -#define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -#define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -#define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -#define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#endif diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h deleted file mode 100644 index 84e487091503a..0000000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_asm.h +++ /dev/null @@ -1,236 +0,0 @@ - -#ifndef ring_core_generated_PREFIX_SYMBOLS_ASM_H -#define ring_core_generated_PREFIX_SYMBOLS_ASM_H - -#if defined(__APPLE__) -#define _ecp_nistz256_point_double _p256_point_double -#define _ecp_nistz256_point_add _p256_point_add -#define _ecp_nistz256_point_add_affine _p256_point_add_affine -#define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont -#define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont -#define _ecp_nistz256_mul_mont _p256_mul_mont -#define _ecp_nistz256_sqr_mont _p256_sqr_mont -#define _CRYPTO_memcmp _ring_core_0_17_5_CRYPTO_memcmp -#define _CRYPTO_poly1305_finish _ring_core_0_17_5_CRYPTO_poly1305_finish -#define _CRYPTO_poly1305_finish_neon _ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define _CRYPTO_poly1305_init _ring_core_0_17_5_CRYPTO_poly1305_init -#define _CRYPTO_poly1305_init_neon _ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define _CRYPTO_poly1305_update _ring_core_0_17_5_CRYPTO_poly1305_update -#define _CRYPTO_poly1305_update_neon _ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define _ChaCha20_ctr32 _ring_core_0_17_5_ChaCha20_ctr32 -#define _LIMBS_add_mod _ring_core_0_17_5_LIMBS_add_mod -#define _LIMBS_are_even _ring_core_0_17_5_LIMBS_are_even -#define _LIMBS_are_zero _ring_core_0_17_5_LIMBS_are_zero -#define _LIMBS_equal _ring_core_0_17_5_LIMBS_equal -#define _LIMBS_equal_limb _ring_core_0_17_5_LIMBS_equal_limb -#define _LIMBS_less_than _ring_core_0_17_5_LIMBS_less_than -#define _LIMBS_less_than_limb _ring_core_0_17_5_LIMBS_less_than_limb -#define _LIMBS_reduce_once _ring_core_0_17_5_LIMBS_reduce_once -#define _LIMBS_select_512_32 _ring_core_0_17_5_LIMBS_select_512_32 -#define _LIMBS_shl_mod _ring_core_0_17_5_LIMBS_shl_mod -#define _LIMBS_sub_mod _ring_core_0_17_5_LIMBS_sub_mod -#define _LIMBS_window5_split_window _ring_core_0_17_5_LIMBS_window5_split_window -#define _LIMBS_window5_unsplit_window _ring_core_0_17_5_LIMBS_window5_unsplit_window -#define _LIMB_shr _ring_core_0_17_5_LIMB_shr -#define _OPENSSL_armcap_P _ring_core_0_17_5_OPENSSL_armcap_P -#define _OPENSSL_cpuid_setup _ring_core_0_17_5_OPENSSL_cpuid_setup -#define _OPENSSL_ia32cap_P _ring_core_0_17_5_OPENSSL_ia32cap_P -#define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define _aes_hw_encrypt _ring_core_0_17_5_aes_hw_encrypt -#define _aes_hw_set_encrypt_key _ring_core_0_17_5_aes_hw_set_encrypt_key -#define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define _aes_nohw_encrypt _ring_core_0_17_5_aes_nohw_encrypt -#define _aes_nohw_set_encrypt_key _ring_core_0_17_5_aes_nohw_set_encrypt_key -#define _aesni_gcm_decrypt _ring_core_0_17_5_aesni_gcm_decrypt -#define _aesni_gcm_encrypt _ring_core_0_17_5_aesni_gcm_encrypt -#define _bn_from_montgomery_in_place _ring_core_0_17_5_bn_from_montgomery_in_place -#define _bn_gather5 _ring_core_0_17_5_bn_gather5 -#define _bn_mul_mont _ring_core_0_17_5_bn_mul_mont -#define _bn_mul_mont_gather5 _ring_core_0_17_5_bn_mul_mont_gather5 -#define _bn_neg_inv_mod_r_u64 _ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define _bn_power5 _ring_core_0_17_5_bn_power5 -#define _bn_scatter5 _ring_core_0_17_5_bn_scatter5 -#define _bn_sqr8x_internal _ring_core_0_17_5_bn_sqr8x_internal -#define _bn_sqrx8x_internal _ring_core_0_17_5_bn_sqrx8x_internal -#define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define _bssl_constant_time_test_main _ring_core_0_17_5_bssl_constant_time_test_main -#define _chacha20_poly1305_open _ring_core_0_17_5_chacha20_poly1305_open -#define _chacha20_poly1305_seal _ring_core_0_17_5_chacha20_poly1305_seal -#define _fiat_curve25519_adx_mul _ring_core_0_17_5_fiat_curve25519_adx_mul -#define _fiat_curve25519_adx_square _ring_core_0_17_5_fiat_curve25519_adx_square -#define _gcm_ghash_avx _ring_core_0_17_5_gcm_ghash_avx -#define _gcm_ghash_clmul _ring_core_0_17_5_gcm_ghash_clmul -#define _gcm_ghash_neon _ring_core_0_17_5_gcm_ghash_neon -#define _gcm_gmult_clmul _ring_core_0_17_5_gcm_gmult_clmul -#define _gcm_gmult_neon _ring_core_0_17_5_gcm_gmult_neon -#define _gcm_init_avx _ring_core_0_17_5_gcm_init_avx -#define _gcm_init_clmul _ring_core_0_17_5_gcm_init_clmul -#define _gcm_init_neon _ring_core_0_17_5_gcm_init_neon -#define _k25519Precomp _ring_core_0_17_5_k25519Precomp -#define _limbs_mul_add_limb _ring_core_0_17_5_limbs_mul_add_limb -#define _little_endian_bytes_from_scalar _ring_core_0_17_5_little_endian_bytes_from_scalar -#define _ecp_nistz256_neg _ring_core_0_17_5_ecp_nistz256_neg -#define _ecp_nistz256_select_w5 _ring_core_0_17_5_ecp_nistz256_select_w5 -#define _ecp_nistz256_select_w7 _ring_core_0_17_5_ecp_nistz256_select_w7 -#define _p256_mul_mont _ring_core_0_17_5_p256_mul_mont -#define _p256_point_add _ring_core_0_17_5_p256_point_add -#define _p256_point_add_affine _ring_core_0_17_5_p256_point_add_affine -#define _p256_point_double _ring_core_0_17_5_p256_point_double -#define _p256_point_mul _ring_core_0_17_5_p256_point_mul -#define _p256_point_mul_base _ring_core_0_17_5_p256_point_mul_base -#define _p256_point_mul_base_vartime _ring_core_0_17_5_p256_point_mul_base_vartime -#define _p256_scalar_mul_mont _ring_core_0_17_5_p256_scalar_mul_mont -#define _p256_scalar_sqr_rep_mont _ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define _p256_sqr_mont _ring_core_0_17_5_p256_sqr_mont -#define _p384_elem_div_by_2 _ring_core_0_17_5_p384_elem_div_by_2 -#define _p384_elem_mul_mont _ring_core_0_17_5_p384_elem_mul_mont -#define _p384_elem_neg _ring_core_0_17_5_p384_elem_neg -#define _p384_elem_sub _ring_core_0_17_5_p384_elem_sub -#define _p384_point_add _ring_core_0_17_5_p384_point_add -#define _p384_point_double _ring_core_0_17_5_p384_point_double -#define _p384_point_mul _ring_core_0_17_5_p384_point_mul -#define _p384_scalar_mul_mont _ring_core_0_17_5_p384_scalar_mul_mont -#define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define _openssl_poly1305_neon2_blocks _ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define _sha256_block_data_order _ring_core_0_17_5_sha256_block_data_order -#define _sha512_block_data_order _ring_core_0_17_5_sha512_block_data_order -#define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define _vpaes_encrypt _ring_core_0_17_5_vpaes_encrypt -#define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define _vpaes_set_encrypt_key _ring_core_0_17_5_vpaes_set_encrypt_key -#define _x25519_NEON _ring_core_0_17_5_x25519_NEON -#define _x25519_fe_invert _ring_core_0_17_5_x25519_fe_invert -#define _x25519_fe_isnegative _ring_core_0_17_5_x25519_fe_isnegative -#define _x25519_fe_mul_ttt _ring_core_0_17_5_x25519_fe_mul_ttt -#define _x25519_fe_neg _ring_core_0_17_5_x25519_fe_neg -#define _x25519_fe_tobytes _ring_core_0_17_5_x25519_fe_tobytes -#define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define _x25519_ge_frombytes_vartime _ring_core_0_17_5_x25519_ge_frombytes_vartime -#define _x25519_ge_scalarmult_base _ring_core_0_17_5_x25519_ge_scalarmult_base -#define _x25519_ge_scalarmult_base_adx _ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define _x25519_public_from_private_generic_masked _ring_core_0_17_5_x25519_public_from_private_generic_masked -#define _x25519_sc_mask _ring_core_0_17_5_x25519_sc_mask -#define _x25519_sc_muladd _ring_core_0_17_5_x25519_sc_muladd -#define _x25519_sc_reduce _ring_core_0_17_5_x25519_sc_reduce -#define _x25519_scalar_mult_adx _ring_core_0_17_5_x25519_scalar_mult_adx -#define _x25519_scalar_mult_generic_masked _ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#else -#define ecp_nistz256_point_double p256_point_double -#define ecp_nistz256_point_add p256_point_add -#define ecp_nistz256_point_add_affine p256_point_add_affine -#define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -#define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -#define ecp_nistz256_mul_mont p256_mul_mont -#define ecp_nistz256_sqr_mont p256_sqr_mont -#define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -#define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -#define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -#define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -#define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -#define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -#define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -#define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -#define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -#define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -#define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -#define LIMBS_equal ring_core_0_17_5_LIMBS_equal -#define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -#define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -#define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -#define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -#define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -#define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -#define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -#define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -#define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -#define LIMB_shr ring_core_0_17_5_LIMB_shr -#define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -#define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -#define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -#define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -#define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -#define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -#define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -#define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -#define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -#define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -#define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -#define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -#define bn_gather5 ring_core_0_17_5_bn_gather5 -#define bn_mul_mont ring_core_0_17_5_bn_mul_mont -#define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -#define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -#define bn_power5 ring_core_0_17_5_bn_power5 -#define bn_scatter5 ring_core_0_17_5_bn_scatter5 -#define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -#define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -#define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -#define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -#define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -#define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -#define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -#define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -#define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -#define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -#define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -#define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -#define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -#define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -#define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -#define gcm_init_avx ring_core_0_17_5_gcm_init_avx -#define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -#define gcm_init_neon ring_core_0_17_5_gcm_init_neon -#define k25519Precomp ring_core_0_17_5_k25519Precomp -#define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -#define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -#define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -#define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -#define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -#define p256_mul_mont ring_core_0_17_5_p256_mul_mont -#define p256_point_add ring_core_0_17_5_p256_point_add -#define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -#define p256_point_double ring_core_0_17_5_p256_point_double -#define p256_point_mul ring_core_0_17_5_p256_point_mul -#define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -#define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -#define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -#define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -#define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -#define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -#define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -#define p384_elem_neg ring_core_0_17_5_p384_elem_neg -#define p384_elem_sub ring_core_0_17_5_p384_elem_sub -#define p384_point_add ring_core_0_17_5_p384_point_add -#define p384_point_double ring_core_0_17_5_p384_point_double -#define p384_point_mul ring_core_0_17_5_p384_point_mul -#define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -#define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -#define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -#define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -#define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -#define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -#define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -#define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -#define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -#define x25519_NEON ring_core_0_17_5_x25519_NEON -#define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -#define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -#define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -#define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -#define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -#define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -#define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -#define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -#define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -#define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -#define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -#define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -#define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -#define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -#define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -#endif -#endif diff --git a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc b/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc deleted file mode 100644 index 50e986a6a6aeb..0000000000000 --- a/shim/third-party/rust/fixups/ring/include/ring_core_generated/prefix_symbols_nasm.inc +++ /dev/null @@ -1,236 +0,0 @@ - -%ifndef ring_core_generated_PREFIX_SYMBOLS_NASM_INC -%define ring_core_generated_PREFIX_SYMBOLS_NASM_INC - -%ifidn __OUTPUT_FORMAT__,win32 -%define _ecp_nistz256_point_double _p256_point_double -%define _ecp_nistz256_point_add _p256_point_add -%define _ecp_nistz256_point_add_affine _p256_point_add_affine -%define _ecp_nistz256_ord_mul_mont _p256_scalar_mul_mont -%define _ecp_nistz256_ord_sqr_mont _p256_scalar_sqr_rep_mont -%define _ecp_nistz256_mul_mont _p256_mul_mont -%define _ecp_nistz256_sqr_mont _p256_sqr_mont -%define _CRYPTO_memcmp _ring_core_0_17_5_CRYPTO_memcmp -%define _CRYPTO_poly1305_finish _ring_core_0_17_5_CRYPTO_poly1305_finish -%define _CRYPTO_poly1305_finish_neon _ring_core_0_17_5_CRYPTO_poly1305_finish_neon -%define _CRYPTO_poly1305_init _ring_core_0_17_5_CRYPTO_poly1305_init -%define _CRYPTO_poly1305_init_neon _ring_core_0_17_5_CRYPTO_poly1305_init_neon -%define _CRYPTO_poly1305_update _ring_core_0_17_5_CRYPTO_poly1305_update -%define _CRYPTO_poly1305_update_neon _ring_core_0_17_5_CRYPTO_poly1305_update_neon -%define _ChaCha20_ctr32 _ring_core_0_17_5_ChaCha20_ctr32 -%define _LIMBS_add_mod _ring_core_0_17_5_LIMBS_add_mod -%define _LIMBS_are_even _ring_core_0_17_5_LIMBS_are_even -%define _LIMBS_are_zero _ring_core_0_17_5_LIMBS_are_zero -%define _LIMBS_equal _ring_core_0_17_5_LIMBS_equal -%define _LIMBS_equal_limb _ring_core_0_17_5_LIMBS_equal_limb -%define _LIMBS_less_than _ring_core_0_17_5_LIMBS_less_than -%define _LIMBS_less_than_limb _ring_core_0_17_5_LIMBS_less_than_limb -%define _LIMBS_reduce_once _ring_core_0_17_5_LIMBS_reduce_once -%define _LIMBS_select_512_32 _ring_core_0_17_5_LIMBS_select_512_32 -%define _LIMBS_shl_mod _ring_core_0_17_5_LIMBS_shl_mod -%define _LIMBS_sub_mod _ring_core_0_17_5_LIMBS_sub_mod -%define _LIMBS_window5_split_window _ring_core_0_17_5_LIMBS_window5_split_window -%define _LIMBS_window5_unsplit_window _ring_core_0_17_5_LIMBS_window5_unsplit_window -%define _LIMB_shr _ring_core_0_17_5_LIMB_shr -%define _OPENSSL_armcap_P _ring_core_0_17_5_OPENSSL_armcap_P -%define _OPENSSL_cpuid_setup _ring_core_0_17_5_OPENSSL_cpuid_setup -%define _OPENSSL_ia32cap_P _ring_core_0_17_5_OPENSSL_ia32cap_P -%define _aes_hw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -%define _aes_hw_encrypt _ring_core_0_17_5_aes_hw_encrypt -%define _aes_hw_set_encrypt_key _ring_core_0_17_5_aes_hw_set_encrypt_key -%define _aes_nohw_ctr32_encrypt_blocks _ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -%define _aes_nohw_encrypt _ring_core_0_17_5_aes_nohw_encrypt -%define _aes_nohw_set_encrypt_key _ring_core_0_17_5_aes_nohw_set_encrypt_key -%define _aesni_gcm_decrypt _ring_core_0_17_5_aesni_gcm_decrypt -%define _aesni_gcm_encrypt _ring_core_0_17_5_aesni_gcm_encrypt -%define _bn_from_montgomery_in_place _ring_core_0_17_5_bn_from_montgomery_in_place -%define _bn_gather5 _ring_core_0_17_5_bn_gather5 -%define _bn_mul_mont _ring_core_0_17_5_bn_mul_mont -%define _bn_mul_mont_gather5 _ring_core_0_17_5_bn_mul_mont_gather5 -%define _bn_neg_inv_mod_r_u64 _ring_core_0_17_5_bn_neg_inv_mod_r_u64 -%define _bn_power5 _ring_core_0_17_5_bn_power5 -%define _bn_scatter5 _ring_core_0_17_5_bn_scatter5 -%define _bn_sqr8x_internal _ring_core_0_17_5_bn_sqr8x_internal -%define _bn_sqrx8x_internal _ring_core_0_17_5_bn_sqrx8x_internal -%define _bsaes_ctr32_encrypt_blocks _ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -%define _bssl_constant_time_test_conditional_memcpy _ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -%define _bssl_constant_time_test_conditional_memxor _ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -%define _bssl_constant_time_test_main _ring_core_0_17_5_bssl_constant_time_test_main -%define _chacha20_poly1305_open _ring_core_0_17_5_chacha20_poly1305_open -%define _chacha20_poly1305_seal _ring_core_0_17_5_chacha20_poly1305_seal -%define _fiat_curve25519_adx_mul _ring_core_0_17_5_fiat_curve25519_adx_mul -%define _fiat_curve25519_adx_square _ring_core_0_17_5_fiat_curve25519_adx_square -%define _gcm_ghash_avx _ring_core_0_17_5_gcm_ghash_avx -%define _gcm_ghash_clmul _ring_core_0_17_5_gcm_ghash_clmul -%define _gcm_ghash_neon _ring_core_0_17_5_gcm_ghash_neon -%define _gcm_gmult_clmul _ring_core_0_17_5_gcm_gmult_clmul -%define _gcm_gmult_neon _ring_core_0_17_5_gcm_gmult_neon -%define _gcm_init_avx _ring_core_0_17_5_gcm_init_avx -%define _gcm_init_clmul _ring_core_0_17_5_gcm_init_clmul -%define _gcm_init_neon _ring_core_0_17_5_gcm_init_neon -%define _k25519Precomp _ring_core_0_17_5_k25519Precomp -%define _limbs_mul_add_limb _ring_core_0_17_5_limbs_mul_add_limb -%define _little_endian_bytes_from_scalar _ring_core_0_17_5_little_endian_bytes_from_scalar -%define _ecp_nistz256_neg _ring_core_0_17_5_ecp_nistz256_neg -%define _ecp_nistz256_select_w5 _ring_core_0_17_5_ecp_nistz256_select_w5 -%define _ecp_nistz256_select_w7 _ring_core_0_17_5_ecp_nistz256_select_w7 -%define _p256_mul_mont _ring_core_0_17_5_p256_mul_mont -%define _p256_point_add _ring_core_0_17_5_p256_point_add -%define _p256_point_add_affine _ring_core_0_17_5_p256_point_add_affine -%define _p256_point_double _ring_core_0_17_5_p256_point_double -%define _p256_point_mul _ring_core_0_17_5_p256_point_mul -%define _p256_point_mul_base _ring_core_0_17_5_p256_point_mul_base -%define _p256_point_mul_base_vartime _ring_core_0_17_5_p256_point_mul_base_vartime -%define _p256_scalar_mul_mont _ring_core_0_17_5_p256_scalar_mul_mont -%define _p256_scalar_sqr_rep_mont _ring_core_0_17_5_p256_scalar_sqr_rep_mont -%define _p256_sqr_mont _ring_core_0_17_5_p256_sqr_mont -%define _p384_elem_div_by_2 _ring_core_0_17_5_p384_elem_div_by_2 -%define _p384_elem_mul_mont _ring_core_0_17_5_p384_elem_mul_mont -%define _p384_elem_neg _ring_core_0_17_5_p384_elem_neg -%define _p384_elem_sub _ring_core_0_17_5_p384_elem_sub -%define _p384_point_add _ring_core_0_17_5_p384_point_add -%define _p384_point_double _ring_core_0_17_5_p384_point_double -%define _p384_point_mul _ring_core_0_17_5_p384_point_mul -%define _p384_scalar_mul_mont _ring_core_0_17_5_p384_scalar_mul_mont -%define _openssl_poly1305_neon2_addmulmod _ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -%define _openssl_poly1305_neon2_blocks _ring_core_0_17_5_openssl_poly1305_neon2_blocks -%define _sha256_block_data_order _ring_core_0_17_5_sha256_block_data_order -%define _sha512_block_data_order _ring_core_0_17_5_sha512_block_data_order -%define _vpaes_ctr32_encrypt_blocks _ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -%define _vpaes_encrypt _ring_core_0_17_5_vpaes_encrypt -%define _vpaes_encrypt_key_to_bsaes _ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -%define _vpaes_set_encrypt_key _ring_core_0_17_5_vpaes_set_encrypt_key -%define _x25519_NEON _ring_core_0_17_5_x25519_NEON -%define _x25519_fe_invert _ring_core_0_17_5_x25519_fe_invert -%define _x25519_fe_isnegative _ring_core_0_17_5_x25519_fe_isnegative -%define _x25519_fe_mul_ttt _ring_core_0_17_5_x25519_fe_mul_ttt -%define _x25519_fe_neg _ring_core_0_17_5_x25519_fe_neg -%define _x25519_fe_tobytes _ring_core_0_17_5_x25519_fe_tobytes -%define _x25519_ge_double_scalarmult_vartime _ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -%define _x25519_ge_frombytes_vartime _ring_core_0_17_5_x25519_ge_frombytes_vartime -%define _x25519_ge_scalarmult_base _ring_core_0_17_5_x25519_ge_scalarmult_base -%define _x25519_ge_scalarmult_base_adx _ring_core_0_17_5_x25519_ge_scalarmult_base_adx -%define _x25519_public_from_private_generic_masked _ring_core_0_17_5_x25519_public_from_private_generic_masked -%define _x25519_sc_mask _ring_core_0_17_5_x25519_sc_mask -%define _x25519_sc_muladd _ring_core_0_17_5_x25519_sc_muladd -%define _x25519_sc_reduce _ring_core_0_17_5_x25519_sc_reduce -%define _x25519_scalar_mult_adx _ring_core_0_17_5_x25519_scalar_mult_adx -%define _x25519_scalar_mult_generic_masked _ring_core_0_17_5_x25519_scalar_mult_generic_masked - -%else -%define ecp_nistz256_point_double p256_point_double -%define ecp_nistz256_point_add p256_point_add -%define ecp_nistz256_point_add_affine p256_point_add_affine -%define ecp_nistz256_ord_mul_mont p256_scalar_mul_mont -%define ecp_nistz256_ord_sqr_mont p256_scalar_sqr_rep_mont -%define ecp_nistz256_mul_mont p256_mul_mont -%define ecp_nistz256_sqr_mont p256_sqr_mont -%define CRYPTO_memcmp ring_core_0_17_5_CRYPTO_memcmp -%define CRYPTO_poly1305_finish ring_core_0_17_5_CRYPTO_poly1305_finish -%define CRYPTO_poly1305_finish_neon ring_core_0_17_5_CRYPTO_poly1305_finish_neon -%define CRYPTO_poly1305_init ring_core_0_17_5_CRYPTO_poly1305_init -%define CRYPTO_poly1305_init_neon ring_core_0_17_5_CRYPTO_poly1305_init_neon -%define CRYPTO_poly1305_update ring_core_0_17_5_CRYPTO_poly1305_update -%define CRYPTO_poly1305_update_neon ring_core_0_17_5_CRYPTO_poly1305_update_neon -%define ChaCha20_ctr32 ring_core_0_17_5_ChaCha20_ctr32 -%define LIMBS_add_mod ring_core_0_17_5_LIMBS_add_mod -%define LIMBS_are_even ring_core_0_17_5_LIMBS_are_even -%define LIMBS_are_zero ring_core_0_17_5_LIMBS_are_zero -%define LIMBS_equal ring_core_0_17_5_LIMBS_equal -%define LIMBS_equal_limb ring_core_0_17_5_LIMBS_equal_limb -%define LIMBS_less_than ring_core_0_17_5_LIMBS_less_than -%define LIMBS_less_than_limb ring_core_0_17_5_LIMBS_less_than_limb -%define LIMBS_reduce_once ring_core_0_17_5_LIMBS_reduce_once -%define LIMBS_select_512_32 ring_core_0_17_5_LIMBS_select_512_32 -%define LIMBS_shl_mod ring_core_0_17_5_LIMBS_shl_mod -%define LIMBS_sub_mod ring_core_0_17_5_LIMBS_sub_mod -%define LIMBS_window5_split_window ring_core_0_17_5_LIMBS_window5_split_window -%define LIMBS_window5_unsplit_window ring_core_0_17_5_LIMBS_window5_unsplit_window -%define LIMB_shr ring_core_0_17_5_LIMB_shr -%define OPENSSL_armcap_P ring_core_0_17_5_OPENSSL_armcap_P -%define OPENSSL_cpuid_setup ring_core_0_17_5_OPENSSL_cpuid_setup -%define OPENSSL_ia32cap_P ring_core_0_17_5_OPENSSL_ia32cap_P -%define aes_hw_ctr32_encrypt_blocks ring_core_0_17_5_aes_hw_ctr32_encrypt_blocks -%define aes_hw_encrypt ring_core_0_17_5_aes_hw_encrypt -%define aes_hw_set_encrypt_key ring_core_0_17_5_aes_hw_set_encrypt_key -%define aes_nohw_ctr32_encrypt_blocks ring_core_0_17_5_aes_nohw_ctr32_encrypt_blocks -%define aes_nohw_encrypt ring_core_0_17_5_aes_nohw_encrypt -%define aes_nohw_set_encrypt_key ring_core_0_17_5_aes_nohw_set_encrypt_key -%define aesni_gcm_decrypt ring_core_0_17_5_aesni_gcm_decrypt -%define aesni_gcm_encrypt ring_core_0_17_5_aesni_gcm_encrypt -%define bn_from_montgomery_in_place ring_core_0_17_5_bn_from_montgomery_in_place -%define bn_gather5 ring_core_0_17_5_bn_gather5 -%define bn_mul_mont ring_core_0_17_5_bn_mul_mont -%define bn_mul_mont_gather5 ring_core_0_17_5_bn_mul_mont_gather5 -%define bn_neg_inv_mod_r_u64 ring_core_0_17_5_bn_neg_inv_mod_r_u64 -%define bn_power5 ring_core_0_17_5_bn_power5 -%define bn_scatter5 ring_core_0_17_5_bn_scatter5 -%define bn_sqr8x_internal ring_core_0_17_5_bn_sqr8x_internal -%define bn_sqrx8x_internal ring_core_0_17_5_bn_sqrx8x_internal -%define bsaes_ctr32_encrypt_blocks ring_core_0_17_5_bsaes_ctr32_encrypt_blocks -%define bssl_constant_time_test_conditional_memcpy ring_core_0_17_5_bssl_constant_time_test_conditional_memcpy -%define bssl_constant_time_test_conditional_memxor ring_core_0_17_5_bssl_constant_time_test_conditional_memxor -%define bssl_constant_time_test_main ring_core_0_17_5_bssl_constant_time_test_main -%define chacha20_poly1305_open ring_core_0_17_5_chacha20_poly1305_open -%define chacha20_poly1305_seal ring_core_0_17_5_chacha20_poly1305_seal -%define fiat_curve25519_adx_mul ring_core_0_17_5_fiat_curve25519_adx_mul -%define fiat_curve25519_adx_square ring_core_0_17_5_fiat_curve25519_adx_square -%define gcm_ghash_avx ring_core_0_17_5_gcm_ghash_avx -%define gcm_ghash_clmul ring_core_0_17_5_gcm_ghash_clmul -%define gcm_ghash_neon ring_core_0_17_5_gcm_ghash_neon -%define gcm_gmult_clmul ring_core_0_17_5_gcm_gmult_clmul -%define gcm_gmult_neon ring_core_0_17_5_gcm_gmult_neon -%define gcm_init_avx ring_core_0_17_5_gcm_init_avx -%define gcm_init_clmul ring_core_0_17_5_gcm_init_clmul -%define gcm_init_neon ring_core_0_17_5_gcm_init_neon -%define k25519Precomp ring_core_0_17_5_k25519Precomp -%define limbs_mul_add_limb ring_core_0_17_5_limbs_mul_add_limb -%define little_endian_bytes_from_scalar ring_core_0_17_5_little_endian_bytes_from_scalar -%define ecp_nistz256_neg ring_core_0_17_5_ecp_nistz256_neg -%define ecp_nistz256_select_w5 ring_core_0_17_5_ecp_nistz256_select_w5 -%define ecp_nistz256_select_w7 ring_core_0_17_5_ecp_nistz256_select_w7 -%define p256_mul_mont ring_core_0_17_5_p256_mul_mont -%define p256_point_add ring_core_0_17_5_p256_point_add -%define p256_point_add_affine ring_core_0_17_5_p256_point_add_affine -%define p256_point_double ring_core_0_17_5_p256_point_double -%define p256_point_mul ring_core_0_17_5_p256_point_mul -%define p256_point_mul_base ring_core_0_17_5_p256_point_mul_base -%define p256_point_mul_base_vartime ring_core_0_17_5_p256_point_mul_base_vartime -%define p256_scalar_mul_mont ring_core_0_17_5_p256_scalar_mul_mont -%define p256_scalar_sqr_rep_mont ring_core_0_17_5_p256_scalar_sqr_rep_mont -%define p256_sqr_mont ring_core_0_17_5_p256_sqr_mont -%define p384_elem_div_by_2 ring_core_0_17_5_p384_elem_div_by_2 -%define p384_elem_mul_mont ring_core_0_17_5_p384_elem_mul_mont -%define p384_elem_neg ring_core_0_17_5_p384_elem_neg -%define p384_elem_sub ring_core_0_17_5_p384_elem_sub -%define p384_point_add ring_core_0_17_5_p384_point_add -%define p384_point_double ring_core_0_17_5_p384_point_double -%define p384_point_mul ring_core_0_17_5_p384_point_mul -%define p384_scalar_mul_mont ring_core_0_17_5_p384_scalar_mul_mont -%define openssl_poly1305_neon2_addmulmod ring_core_0_17_5_openssl_poly1305_neon2_addmulmod -%define openssl_poly1305_neon2_blocks ring_core_0_17_5_openssl_poly1305_neon2_blocks -%define sha256_block_data_order ring_core_0_17_5_sha256_block_data_order -%define sha512_block_data_order ring_core_0_17_5_sha512_block_data_order -%define vpaes_ctr32_encrypt_blocks ring_core_0_17_5_vpaes_ctr32_encrypt_blocks -%define vpaes_encrypt ring_core_0_17_5_vpaes_encrypt -%define vpaes_encrypt_key_to_bsaes ring_core_0_17_5_vpaes_encrypt_key_to_bsaes -%define vpaes_set_encrypt_key ring_core_0_17_5_vpaes_set_encrypt_key -%define x25519_NEON ring_core_0_17_5_x25519_NEON -%define x25519_fe_invert ring_core_0_17_5_x25519_fe_invert -%define x25519_fe_isnegative ring_core_0_17_5_x25519_fe_isnegative -%define x25519_fe_mul_ttt ring_core_0_17_5_x25519_fe_mul_ttt -%define x25519_fe_neg ring_core_0_17_5_x25519_fe_neg -%define x25519_fe_tobytes ring_core_0_17_5_x25519_fe_tobytes -%define x25519_ge_double_scalarmult_vartime ring_core_0_17_5_x25519_ge_double_scalarmult_vartime -%define x25519_ge_frombytes_vartime ring_core_0_17_5_x25519_ge_frombytes_vartime -%define x25519_ge_scalarmult_base ring_core_0_17_5_x25519_ge_scalarmult_base -%define x25519_ge_scalarmult_base_adx ring_core_0_17_5_x25519_ge_scalarmult_base_adx -%define x25519_public_from_private_generic_masked ring_core_0_17_5_x25519_public_from_private_generic_masked -%define x25519_sc_mask ring_core_0_17_5_x25519_sc_mask -%define x25519_sc_muladd ring_core_0_17_5_x25519_sc_muladd -%define x25519_sc_reduce ring_core_0_17_5_x25519_sc_reduce -%define x25519_scalar_mult_adx ring_core_0_17_5_x25519_scalar_mult_adx -%define x25519_scalar_mult_generic_masked ring_core_0_17_5_x25519_scalar_mult_generic_masked - -%endif -%endif diff --git a/shim/third-party/rust/fixups/rustix/fixups.toml b/shim/third-party/rust/fixups/rustix/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/rustix/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/rustls/fixups.toml b/shim/third-party/rust/fixups/rustls/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/rustls/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/rustversion/fixups.toml b/shim/third-party/rust/fixups/rustversion/fixups.toml deleted file mode 100644 index ac9ebfb4af71d..0000000000000 --- a/shim/third-party/rust/fixups/rustversion/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/serde/fixups.toml b/shim/third-party/rust/fixups/serde/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/serde/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_derive/fixups.toml b/shim/third-party/rust/fixups/serde_derive/fixups.toml deleted file mode 100644 index 7de4ebb3e1996..0000000000000 --- a/shim/third-party/rust/fixups/serde_derive/fixups.toml +++ /dev/null @@ -1,3 +0,0 @@ -# To set `CARGO_MANIFEST_DIR` -cargo_env = true -buildscript = [] diff --git a/shim/third-party/rust/fixups/serde_json/fixups.toml b/shim/third-party/rust/fixups/serde_json/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/serde_json/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/signal-hook/fixups.toml b/shim/third-party/rust/fixups/signal-hook/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/signal-hook/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/slab/fixups.toml b/shim/third-party/rust/fixups/slab/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/slab/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/slog/fixups.toml b/shim/third-party/rust/fixups/slog/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/slog/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/syn/fixups.toml b/shim/third-party/rust/fixups/syn/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/syn/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/sys-info/fixups.toml b/shim/third-party/rust/fixups/sys-info/fixups.toml deleted file mode 100644 index 5d124b3ad7ad2..0000000000000 --- a/shim/third-party/rust/fixups/sys-info/fixups.toml +++ /dev/null @@ -1,19 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(target_os = "linux")'.buildscript]] -[platform_fixup.'cfg(target_os = "linux")'.buildscript.cxx_library] -name = "linux" -srcs = ["c/linux.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_os = "macos")'.buildscript]] -[platform_fixup.'cfg(target_os = "macos")'.buildscript.cxx_library] -name = "macos" -srcs = ["c/darwin.c"] -headers = ["c/*.h"] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.cxx_library] -name = "windows" -srcs = ["c/windows.c"] -headers = ["c/*.h"] diff --git a/shim/third-party/rust/fixups/sysinfo/fixups.toml b/shim/third-party/rust/fixups/sysinfo/fixups.toml deleted file mode 100644 index 8518b1897006d..0000000000000 --- a/shim/third-party/rust/fixups/sysinfo/fixups.toml +++ /dev/null @@ -1,11 +0,0 @@ -extra_srcs = ["README.md", "md_doc/**/*.md"] -buildscript = [] - -[platform_fixup.'cfg(target_os = "macos")'] -buildscript = [] -rustc_flags = [ - "-lframework=IOKit", - "-lframework=Foundation", - "-lframework=CoreFoundation", - "-lframework=DiskArbitration", -] diff --git a/shim/third-party/rust/fixups/tempfile/fixups.toml b/shim/third-party/rust/fixups/tempfile/fixups.toml deleted file mode 100644 index 5e026f75e0de3..0000000000000 --- a/shim/third-party/rust/fixups/tempfile/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/terminfo/fixups.toml b/shim/third-party/rust/fixups/terminfo/fixups.toml deleted file mode 100644 index ac9ebfb4af71d..0000000000000 --- a/shim/third-party/rust/fixups/terminfo/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/termwiz/fixups.toml b/shim/third-party/rust/fixups/termwiz/fixups.toml deleted file mode 100644 index fdba1eb21b86a..0000000000000 --- a/shim/third-party/rust/fixups/termwiz/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -cargo_env = true -extra_srcs = ["src/**/*.pest"] diff --git a/shim/third-party/rust/fixups/test-case/fixups.toml b/shim/third-party/rust/fixups/test-case/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/test-case/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/thiserror/fixups.toml b/shim/third-party/rust/fixups/thiserror/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/thiserror/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml b/shim/third-party/rust/fixups/tiny-keccak/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/tiny-keccak/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/tokio-stream/fixups.toml b/shim/third-party/rust/fixups/tokio-stream/fixups.toml deleted file mode 100644 index a1f4f0e7091d5..0000000000000 --- a/shim/third-party/rust/fixups/tokio-stream/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -# reindeer cannot see through `cfg_sync!` macros and the like -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio-util/fixups.toml b/shim/third-party/rust/fixups/tokio-util/fixups.toml deleted file mode 100644 index af7edb27e3bb7..0000000000000 --- a/shim/third-party/rust/fixups/tokio-util/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/tokio/fixups.toml b/shim/third-party/rust/fixups/tokio/fixups.toml deleted file mode 100644 index d69dcefddb329..0000000000000 --- a/shim/third-party/rust/fixups/tokio/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -cfgs = ["tokio_unstable", "tokio_track_caller"] - -extra_srcs = ["src/**/*.rs"] - -buildscript = [] -features = ["tokio_track_caller"] - -extra_deps = [ ":tracing" ] diff --git a/shim/third-party/rust/fixups/tonic/fixups.toml b/shim/third-party/rust/fixups/tonic/fixups.toml deleted file mode 100644 index 41439d3356a5e..0000000000000 --- a/shim/third-party/rust/fixups/tonic/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml b/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml deleted file mode 100644 index 28683dbe3cbbf..0000000000000 --- a/shim/third-party/rust/fixups/tracing-subscriber/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -# Reindeer can't find the dependencies due to being confused by the feature! macro. -extra_srcs = ["src/**/*.rs"] diff --git a/shim/third-party/rust/fixups/trybuild/fixups.toml b/shim/third-party/rust/fixups/trybuild/fixups.toml deleted file mode 100644 index ac9ebfb4af71d..0000000000000 --- a/shim/third-party/rust/fixups/trybuild/fixups.toml +++ /dev/null @@ -1,2 +0,0 @@ -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/typenum/fixups.toml b/shim/third-party/rust/fixups/typenum/fixups.toml deleted file mode 100644 index 7ab02e4fd17cf..0000000000000 --- a/shim/third-party/rust/fixups/typenum/fixups.toml +++ /dev/null @@ -1,4 +0,0 @@ -features = ["force_unix_path_separator"] - -[[buildscript]] -[buildscript.gen_srcs] diff --git a/shim/third-party/rust/fixups/unicase/fixups.toml b/shim/third-party/rust/fixups/unicase/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/unicase/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml b/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml deleted file mode 100644 index 07c79834d924f..0000000000000 --- a/shim/third-party/rust/fixups/winapi-x86_64-pc-windows-gnu/fixups.toml +++ /dev/null @@ -1,9 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.prebuilt_cxx_library] -name = "extra_libraries" -# The static_libs this crate provides overlaps quite heavily with those in a default -# MinGW install, and there are also many that are DirectX specific. -# We list only those we actually need, since the others are more likely to cause problems. -static_libs = ["lib/libwinapi_ole32.a", "lib/libwinapi_shell32.a"] diff --git a/shim/third-party/rust/fixups/winapi/fixups.toml b/shim/third-party/rust/fixups/winapi/fixups.toml deleted file mode 100644 index ec4f86e500d0a..0000000000000 --- a/shim/third-party/rust/fixups/winapi/fixups.toml +++ /dev/null @@ -1,4 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(target_os = "windows")'.buildscript]] -[platform_fixup.'cfg(target_os = "windows")'.buildscript.rustc_flags] diff --git a/shim/third-party/rust/fixups/windows-targets/fixups.toml b/shim/third-party/rust/fixups/windows-targets/fixups.toml deleted file mode 100644 index b3555c7795e3d..0000000000000 --- a/shim/third-party/rust/fixups/windows-targets/fixups.toml +++ /dev/null @@ -1,3 +0,0 @@ -[platform_fixup.'cfg(any(target_os = "windows", target_os = "linux"))'] -version = ">=0.48.0" -cfgs = ["windows_raw_dylib"] diff --git a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml deleted file mode 100644 index f40e9f9cbe6b1..0000000000000 --- a/shim/third-party/rust/fixups/windows_aarch64_gnullvm/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "aarch64"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml deleted file mode 100644 index b25e7f05fa57c..0000000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_gnu/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "gnu"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml deleted file mode 100644 index a5579b6930ec1..0000000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_gnullvm/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.buildscript.prebuilt_cxx_library] -name = "libwindows" -static_libs = ["lib/libwindows.0.48.0.a"] diff --git a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml b/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml deleted file mode 100644 index 8e8dea3516505..0000000000000 --- a/shim/third-party/rust/fixups/windows_x86_64_msvc/fixups.toml +++ /dev/null @@ -1,8 +0,0 @@ -buildscript = [] - -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'] -version = "=0.48.0" -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript.prebuilt_cxx_library] -name = "windows" -static_libs = ["lib/windows.0.48.0.lib"] diff --git a/shim/third-party/rust/fixups/winreg/fixups.toml b/shim/third-party/rust/fixups/winreg/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/winreg/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/zerocopy/fixups.toml b/shim/third-party/rust/fixups/zerocopy/fixups.toml deleted file mode 100644 index 41439d3356a5e..0000000000000 --- a/shim/third-party/rust/fixups/zerocopy/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -cargo_env = true diff --git a/shim/third-party/rust/fixups/zstd-safe/fixups.toml b/shim/third-party/rust/fixups/zstd-safe/fixups.toml deleted file mode 100644 index db40d72cb2eaf..0000000000000 --- a/shim/third-party/rust/fixups/zstd-safe/fixups.toml +++ /dev/null @@ -1 +0,0 @@ -buildscript = [] diff --git a/shim/third-party/rust/fixups/zstd-sys/fixups.toml b/shim/third-party/rust/fixups/zstd-sys/fixups.toml deleted file mode 100644 index 2e2d704263ab5..0000000000000 --- a/shim/third-party/rust/fixups/zstd-sys/fixups.toml +++ /dev/null @@ -1,118 +0,0 @@ -buildscript = [] - -[[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript]] -[platform_fixup.'cfg(not(all(target_os = "windows", target_env = "msvc")))'.buildscript.cxx_library] -name = "zstd" -srcs = [ - "zstd/lib/common/debug.c", - "zstd/lib/common/entropy_common.c", - "zstd/lib/common/error_private.c", - "zstd/lib/common/fse_decompress.c", - "zstd/lib/common/pool.c", - "zstd/lib/common/threading.c", - #"zstd/lib/common/xxhash.c", - "zstd/lib/common/zstd_common.c", - "zstd/lib/compress/**/*.c", - "zstd/lib/decompress/**/*.c", - "zstd/lib/decompress/huf_decompress_amd64.S", - "zstd/lib/dictBuilder/**/*.c", - "zstd/lib/legacy/**/*.c", -] -headers = [ - "zdict.h", - "zstd.h", - "zstd/lib/common/allocations.h", - "zstd/lib/common/bits.h", - "zstd/lib/common/bitstream.h", - "zstd/lib/common/compiler.h", - "zstd/lib/common/cpu.h", - "zstd/lib/common/debug.h", - "zstd/lib/common/error_private.h", - "zstd/lib/common/fse.h", - "zstd/lib/common/huf.h", - "zstd/lib/common/mem.h", - "zstd/lib/common/pool.h", - "zstd/lib/common/portability_macros.h", - "zstd/lib/common/threading.h", - "zstd/lib/common/xxhash.h", - "zstd/lib/common/zstd_deps.h", - "zstd/lib/common/zstd_internal.h", - "zstd/lib/common/zstd_trace.h", - "zstd/lib/compress/**/*.h", - "zstd/lib/decompress/**/*.h", - "zstd/lib/deprecated/zbuff.h", - "zstd/lib/dictBuilder/cover.h", - "zstd/lib/dictBuilder/divsufsort.h", - "zstd/lib/legacy/**/*.h", - "zstd/lib/zdict.h", - "zstd/lib/zstd_errors.h", - "zstd/lib/zstd.h", -] -compiler_flags = [ - "-O3", - "-DZSTD_LIB_DEPRECATED=0", - "-fvisibility=hidden", - "-DXXH_PRIVATE_API=", - "-DZSTDLIB_VISIBILITY=", - "-DZDICTLIB_VISIBILITY=", - "-DZSTDERRORLIB_VISIBILITY=", - "-DZSTD_LEGACY_SUPPORT=1" -] - -[[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript]] -[platform_fixup.'cfg(all(target_os = "windows", target_env = "msvc"))'.buildscript.cxx_library] -name = "zstd-msvc" -srcs = [ - "zstd/lib/common/debug.c", - "zstd/lib/common/entropy_common.c", - "zstd/lib/common/error_private.c", - "zstd/lib/common/fse_decompress.c", - "zstd/lib/common/pool.c", - "zstd/lib/common/threading.c", - #"zstd/lib/common/xxhash.c", - "zstd/lib/common/zstd_common.c", - "zstd/lib/compress/**/*.c", - "zstd/lib/decompress/**/*.c", - #"zstd/lib/decompress/huf_decompress_amd64.S", - "zstd/lib/dictBuilder/**/*.c", - "zstd/lib/legacy/**/*.c", -] -headers = [ - "zdict.h", - "zstd.h", - "zstd/lib/common/allocations.h", - "zstd/lib/common/bits.h", - "zstd/lib/common/bitstream.h", - "zstd/lib/common/compiler.h", - "zstd/lib/common/cpu.h", - "zstd/lib/common/debug.h", - "zstd/lib/common/error_private.h", - "zstd/lib/common/fse.h", - "zstd/lib/common/huf.h", - "zstd/lib/common/mem.h", - "zstd/lib/common/pool.h", - "zstd/lib/common/portability_macros.h", - "zstd/lib/common/threading.h", - "zstd/lib/common/xxhash.h", - "zstd/lib/common/zstd_deps.h", - "zstd/lib/common/zstd_internal.h", - "zstd/lib/common/zstd_trace.h", - "zstd/lib/compress/**/*.h", - "zstd/lib/decompress/**/*.h", - "zstd/lib/deprecated/zbuff.h", - "zstd/lib/dictBuilder/cover.h", - "zstd/lib/dictBuilder/divsufsort.h", - "zstd/lib/legacy/**/*.h", - "zstd/lib/zdict.h", - "zstd/lib/zstd_errors.h", - "zstd/lib/zstd.h", -] -compiler_flags = [ - "/O2", - "-DZSTD_LIB_DEPRECATED=0", - "-DXXH_PRIVATE_API=", - "-DZSTDLIB_VISIBILITY=", - "-DZDICTLIB_VISIBILITY=", - "-DZSTDERRORLIB_VISIBILITY=", - "-DZSTD_LEGACY_SUPPORT=1" -] diff --git a/shim/third-party/rust/reindeer.toml b/shim/third-party/rust/reindeer.toml deleted file mode 100644 index ab3d1f8d4dbfa..0000000000000 --- a/shim/third-party/rust/reindeer.toml +++ /dev/null @@ -1,29 +0,0 @@ -# Configuration for Reindeer to generate Buck targets from Cargo.toml -# -# Overview of available options: -# https://github.com/facebookincubator/reindeer/blob/main/example/third-party/reindeer.toml - -# Parse Rust code to work out the precise set of source files for each crate. -precise_srcs = true - -# Include a public top-level target which depends on all other targets. -include_top_level = true - -[cargo] -# Support Cargo's unstable "artifact dependencies" functionality, RFC 3028. -bindeps = true - -[buck] -# Name of the generated file. -file_name = "BUCK" - -# Rules used for various kinds of targets. -rust_library = "cargo.rust_library" -rust_binary = "cargo.rust_binary" -prebuilt_cxx_library = "third_party_rust_prebuilt_cxx_library" - -buckfile_imports = """ -load("@prelude//rust:cargo_buildscript.bzl", "buildscript_run") -load("@prelude//rust:cargo_package.bzl", "cargo") -load("@shim//third-party/macros:rust_third_party.bzl", "third_party_rust_prebuilt_cxx_library") -""" diff --git a/shim/third-party/rust/top/main.rs b/shim/third-party/rust/top/main.rs deleted file mode 100644 index 7dde67dd19b09..0000000000000 --- a/shim/third-party/rust/top/main.rs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Meta Platforms, Inc. and affiliates. -// -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. - -#![allow(unused_crate_dependencies)] - -fn main() {} diff --git a/shim/third-party/snappy/BUCK b/shim/third-party/snappy/BUCK deleted file mode 100644 index 295d5a6c2b78c..0000000000000 --- a/shim/third-party/snappy/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "snappy", - packages = { - "//os:linux-fedora": ["snappy-devel"], - "//os:linux-ubuntu": ["libsnappy-dev"], - "//os:macos-homebrew": ["snappy"], - }, - pkgconfig_name = "snappy", -) diff --git a/shim/third-party/xz/BUCK b/shim/third-party/xz/BUCK deleted file mode 100644 index 5b427a9753902..0000000000000 --- a/shim/third-party/xz/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "lzma", - packages = { - "//os:linux-fedora": ["xz-devel"], - "//os:linux-ubuntu": ["liblz4-dev"], - "//os:macos-homebrew": ["liblzma"], - }, - pkgconfig_name = "liblzma", -) diff --git a/shim/third-party/zlib/BUCK b/shim/third-party/zlib/BUCK deleted file mode 100644 index 5d79750e8b297..0000000000000 --- a/shim/third-party/zlib/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "z", - packages = { - "//os:linux-fedora": ["zlib-devel"], - "//os:linux-ubuntu": ["zlib1g"], - "//os:macos-homebrew": ["zlib"], - }, - pkgconfig_name = "zlib", -) diff --git a/shim/third-party/zstd/BUCK b/shim/third-party/zstd/BUCK deleted file mode 100644 index 4bc3bbb5776d8..0000000000000 --- a/shim/third-party/zstd/BUCK +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@//third-party:defs.bzl", "pkgconfig_system_library") - -oncall("open_source") - -pkgconfig_system_library( - name = "zstd", - packages = { - "//os:linux-fedora": ["libzstd-devel"], - "//os:linux-ubuntu": ["libzstd-dev"], - "//os:macos-homebrew": ["zstd"], - }, - pkgconfig_name = "libzstd", -) diff --git a/shim/tools/build_defs/audit_dependencies_test.bzl b/shim/tools/build_defs/audit_dependencies_test.bzl deleted file mode 100644 index a3174389f5562..0000000000000 --- a/shim/tools/build_defs/audit_dependencies_test.bzl +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -# Noop in OSS -def audit_dependencies_test(**_kwargs): - pass diff --git a/shim/tools/build_defs/buck2/is_buck2.bzl b/shim/tools/build_defs/buck2/is_buck2.bzl deleted file mode 100644 index 45140ef215fa8..0000000000000 --- a/shim/tools/build_defs/buck2/is_buck2.bzl +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -def is_buck2(): - return True diff --git a/shim/tools/build_defs/buckconfig.bzl b/shim/tools/build_defs/buckconfig.bzl deleted file mode 100644 index d9c29d252f9dd..0000000000000 --- a/shim/tools/build_defs/buckconfig.bzl +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@prelude//utils:buckconfig.bzl", _read = "read", _read_bool = "read_bool", _read_choice = "read_choice", _read_int = "read_int", _read_list = "read_list", _read_string = "read_string", _resolve_alias = "resolve_alias") - -read = _read -read_string = _read_string -read_choice = _read_choice -read_bool = _read_bool -read_int = _read_int -read_list = _read_list -resolve_alias = _resolve_alias diff --git a/shim/tools/build_defs/default_platform_defs.bzl b/shim/tools/build_defs/default_platform_defs.bzl deleted file mode 100644 index 3f860ae49df06..0000000000000 --- a/shim/tools/build_defs/default_platform_defs.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -DEVSERVER_PLATFORM_REGEX = "UNUSED" diff --git a/shim/tools/build_defs/fb_native_wrapper.bzl b/shim/tools/build_defs/fb_native_wrapper.bzl deleted file mode 100644 index f6795d7ff4313..0000000000000 --- a/shim/tools/build_defs/fb_native_wrapper.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -fb_native = native diff --git a/shim/tools/build_defs/glob_defs.bzl b/shim/tools/build_defs/glob_defs.bzl deleted file mode 100644 index c119afa5564a9..0000000000000 --- a/shim/tools/build_defs/glob_defs.bzl +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -glob = native.glob diff --git a/shim/xplat/executorch/kernels/optimized/lib_defs.bzl b/shim/xplat/executorch/kernels/optimized/lib_defs.bzl deleted file mode 100644 index af62407eb079c..0000000000000 --- a/shim/xplat/executorch/kernels/optimized/lib_defs.bzl +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//tools/build_defs:default_platform_defs.bzl", "DEVSERVER_PLATFORM_REGEX") -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") - -# Because vec exists as a collection of header files, compile and preprocessor -# flags applied to the vec target do not have any effect, since no compilation -# actually occurs for the target. -# -# Targets using the vec library must therefore call the get_vec_*_flags -# functions in order to declare the required compiler flags needed in order to -# access CPU vector intrinsics. - -def get_vec_android_preprocessor_flags(): - preprocessor_flags = [ - ( - "^android-arm64.*$", - [ - "-DET_BUILD_ARM_VEC256_WITH_SLEEF", - ], - ), - ] - return preprocessor_flags - -def get_vec_cxx_preprocessor_flags(): - preprocessor_flags = [ - ( - DEVSERVER_PLATFORM_REGEX, - [ - "-DCPU_CAPABILITY_AVX2", - ], - ), - ] - return preprocessor_flags - -def get_vec_fbcode_preprocessor_flags(): - preprocessor_flags = [ - "-DCPU_CAPABILITY_AVX2", - ] - return preprocessor_flags - -# Currently, having a dependency on fbsource//third-party/sleef:sleef may cause -# duplicate symbol errors when linking fbcode targets in opt mode that also -# depend on ATen. This is because ATen accesses sleef via the third-party folder -# in caffe2 (caffe2/third-party//sleef:sleef). -# TODO(ssjia): Enable -DCPU_CAPABILITY_AVX2 in fbcode, which requires sleef. -def define_libs(): - runtime.cxx_library( - name = "libvec", - srcs = [], - exported_headers = native.glob([ - "vec/**/*.h", - ]), - header_namespace = "executorch/kernels/optimized", - visibility = [ - "//executorch/...", - "@EXECUTORCH_CLIENTS", - ], - cxx_platform_deps = select({ - "DEFAULT": [ - ( - DEVSERVER_PLATFORM_REGEX, - [ - "fbsource//third-party/sleef:sleef", - ], - ), - ], - "ovr_config//cpu:arm64": [ - ( - DEVSERVER_PLATFORM_REGEX, - [ - "fbsource//third-party/sleef:sleef_arm", - ], - ), - ], - }), - fbandroid_platform_deps = [ - ( - "^android-arm64.*$", - [ - "fbsource//third-party/sleef:sleef_arm", - ], - ), - ], - ) - - runtime.cxx_library( - name = "libutils", - srcs = [], - exported_headers = native.glob([ - "utils/**/*.h", - ]), - header_namespace = "executorch/kernels/optimized", - visibility = [ - "//executorch/...", - "@EXECUTORCH_CLIENTS", - ], - exported_deps = [ - # Needed to access the __ET_INLINE macro - "//executorch/runtime/platform:compiler", - ], - ) - - runtime.cxx_library( - name = "libblas", - srcs = native.glob([ - "blas/**/*.cpp", - ]), - exported_headers = native.glob([ - "blas/**/*.h", - ]), - header_namespace = "executorch/kernels/optimized", - visibility = [ - "//executorch/...", - "@EXECUTORCH_CLIENTS", - ], - fbandroid_platform_preprocessor_flags = [ - ( - "^android-arm64.*$", - [ - "-DET_BUILD_WITH_BLAS", - ], - ), - ], - fbandroid_platform_deps = [ - ( - "^android-arm64.*$", - [ - "fbsource//third-party/openblas:openblas", - ], - ), - ], - fbobjc_exported_preprocessor_flags = [ - "-DET_BUILD_WITH_BLAS", - "-DET_BUILD_FOR_APPLE", - ], - fbobjc_frameworks = [ - "Accelerate", - ], - exported_deps = [ - "//executorch/kernels/optimized:libutils", - "//executorch/runtime/core/exec_aten:lib", - ], - ) diff --git a/shim/xplat/executorch/kernels/optimized/op_registration_util.bzl b/shim/xplat/executorch/kernels/optimized/op_registration_util.bzl deleted file mode 100644 index c9fe4ec912db4..0000000000000 --- a/shim/xplat/executorch/kernels/optimized/op_registration_util.bzl +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under both the MIT license found in the -# LICENSE-MIT file in the root directory of this source tree and the Apache -# License, Version 2.0 found in the LICENSE-APACHE file in the root directory -# of this source tree. - -load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -load("@fbsource//xplat/executorch/build:selects.bzl", "selects") -load( - "@fbsource//xplat/executorch/kernels/optimized:lib_defs.bzl", - "get_vec_android_preprocessor_flags", -) - -def op_target(name, deps = []): - """Registers an optimized implementation for an operator overload group. - - An operator overload group is a set of operator overloads with a common - operator name. That common operator name should be the base name of this - target. - - E.g., the "add" operator overload group, named "op_add" in this target, - might implement: - - add.Tensor - - add_.Tensor - - add.out - - add.Scalar - - If an op target would like to share a header/sources with a different op - target (e.g., helpers/utilities), it should declare a separate cxx_library - and add it as a dep. - - Args: - name: The name of the operator overload group; e.g., - "op_add". This directory must contain a source file named - ".cpp"; e.g., "op_add.cpp". - deps: Optional extra deps to add to the cxx_library(). Note: - - op targets may not depend on other op targets, to keep the - dependencies manageable. If two op targets would like to share - code, define a separate runtime.cxx_library that they both depend - on. - """ - - # Note that this doesn't actually define the target, but helps register - # it in a table that's used to define the target. - return { - "deps": deps, - "name": name, - } - -def _enforce_deps(deps, name): - """Fails if any of the deps are not allowed. - - Args: - deps: A list of build target strings. - name: The name of the target; e.g., "op_add" - """ - for dep in deps: - if dep.startswith(":op_"): - # op targets may not depend on other op targets, to keep the - # dependencies manageable. If two op targets would like to share - # code, define a separate runtime.cxx_library that they both depend - # on. - fail("op_target {} may not depend on other op_target {}".format( - name, - dep, - )) - -def define_op_library(name, deps): - """Defines a cxx_library target for the named operator overload group. - - Args: - name: The name of the target; e.g., "op_add" - deps: List of deps for the target. - """ - selects.apply(obj = deps, function = native.partial(_enforce_deps, name = name)) - - augmented_deps = deps + [ - "//executorch/kernels/optimized:libvec", - "//executorch/kernels/optimized:libutils", - ] - - runtime.cxx_library( - name = "{}".format(name), - srcs = [ - "{}.cpp".format(name), - ], - visibility = [ - "//executorch/kernels/portable/test/...", - "//executorch/kernels/quantized/test/...", - "//executorch/kernels/optimized/test/...", - "//executorch/kernels/test/...", - "@EXECUTORCH_CLIENTS", - ], - # kernels often have helpers with no prototypes just disabling the warning here as the headers - # are codegend and linked in later - compiler_flags = ["-Wno-missing-prototypes"], - deps = [ - "//executorch/runtime/kernel:kernel_includes", - ] + augmented_deps, - fbandroid_platform_preprocessor_flags = get_vec_android_preprocessor_flags(), - # sleef needs to be added as a direct dependency of the operator target when building for Android, - # or a linker error may occur. Not sure why this happens; it seems that fbandroid_platform_deps of - # dependencies are not transitive - fbandroid_platform_deps = [ - ( - "^android-arm64.*$", - [ - "fbsource//third-party/sleef:sleef_arm", - ], - ), - ], - # link_whole is necessary because the operators register themselves - # via static initializers that run at program startup. - # @lint-ignore BUCKLINT link_whole - link_whole = True, - ) - -def define_op_target(name, deps): - """Possibly defines cxx_library targets for the named operator group. - - Args: - name: The base name of the target; e.g., "op_add" - deps: List of deps for the targets. - """ - - # When building in ATen mode, ATen-compatible (non-custom) operators will - # use the implementations provided by ATen, so we should not build the - # versions defined here. - define_op_library( - name = name, - deps = deps, - ) - -def is_op_disabled(name): - # TODO (gjcomer) Enable ops with sleef dependency in OSS - disabled_ops = ["op_gelu", "op_log_softmax"] - return name in disabled_ops