Skip to content

Commit

Permalink
Merge pull request facebook#11 from adamcalabrigo/fboss_upstream_3_6_…
Browse files Browse the repository at this point in the history
…2023

Merge FBOSS OSS upstream changes 3/6/2023
  • Loading branch information
eerpini authored Mar 6, 2023
2 parents b4a0eb9 + 418f0b3 commit 7dd4c0b
Show file tree
Hide file tree
Showing 591 changed files with 36,079 additions and 9,533 deletions.
33 changes: 29 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ if ($ENV{SAI_BRCM_IMPL})
set (SAI_BRCM_IMPL ON)
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")
set (BUILD_SAI_FAKE_LINK_TEST ON)
endif()

if (BUILD_SAI_FAKE_LINK_TEST)
message(STATUS "Configured to build SAI Fake Link Test binaries")
endif()

if (SAI_BRCM_IMPL)
# TODO (skhare) IS_OSS_BRCM_SAI is only a short-term change to unblock.
# Refactor/fix the code and then remove this flag.
Expand Down Expand Up @@ -220,6 +230,13 @@ add_fbthrift_cpp_library(
json
reflection
)
add_fbthrift_cpp_library(
fboss_common_cpp2
fboss/lib/if/fboss_common.thrift
OPTIONS
json
reflection
)
add_fbthrift_cpp_library(
switch_config_cpp2
fboss/agent/switch_config.thrift
Expand All @@ -228,6 +245,7 @@ add_fbthrift_cpp_library(
reflection
DEPENDS
common_cpp2
fboss_common_cpp2
mpls_cpp2
)
add_fbthrift_cpp_library(
Expand Down Expand Up @@ -577,9 +595,9 @@ if (NOT SAI_ONLY)
fboss/agent/DHCPv4Handler.cpp
fboss/agent/DHCPv6Handler.cpp
fboss/agent/DsfSubscriber.cpp
fboss/agent/FabricReachabilityManager.cpp
fboss/agent/EncapIndexAllocator.cpp
fboss/agent/FibHelpers.cpp
fboss/agent/FsdbSyncer.cpp
fboss/agent/InterfaceStats.cpp
fboss/agent/L2Entry.cpp
fboss/agent/hw/BufferStatsLogger.cpp
Expand Down Expand Up @@ -729,7 +747,6 @@ if (NOT SAI_ONLY)
fboss/agent/oss/DsfSubscriber.cpp
fboss/agent/oss/AggregatePortStats.cpp
fboss/agent/oss/FbossInit.cpp
fboss/agent/oss/FsdbStateDeltaConverter.cpp
fboss/agent/oss/FsdbSyncer.cpp
fboss/agent/oss/Main.cpp
fboss/agent/oss/PacketLogger.cpp
Expand Down Expand Up @@ -804,6 +821,7 @@ if (NOT SAI_ONLY)
fboss/agent/state/UdfGroupMap.cpp
fboss/agent/state/UdfPacketMatcher.cpp
fboss/agent/state/UdfPacketMatcherMap.cpp
fboss/agent/state/FlowletSwitchingConfig.cpp
fboss/agent/state/ForwardingInformationBase.cpp
fboss/agent/state/ForwardingInformationBaseContainer.cpp
fboss/agent/state/ForwardingInformationBaseDelta.cpp
Expand Down Expand Up @@ -955,6 +973,7 @@ if (NOT SAI_ONLY)
galaxy_platform_mapping
kamet_platform_mapping
makalu_platform_mapping
yangra_platform_mapping
qsfp_cpp2
qsfp_service_client
wedge_led_utils
Expand Down Expand Up @@ -1058,8 +1077,8 @@ foreach(cmakeFile ${cmakeFiles})
message(status " Skipping OpenNSA BCM binaries")
# Skip building LinkTest, enable this for non SAI_ONLY build
# once the compilation issues with LinkTest are fixed
elseif(${cmakeFile} MATCHES "LinkTest")
message(status " Skipping LinkTest binaries")
elseif(NOT SAI_ONLY AND ${cmakeFile} MATCHES "BcmLinkTest")
message(status " Skipping BCM LinkTest binaries")
else()
message(status " INCLUDE ${cmakeFile}")
INCLUDE(${cmakeFile})
Expand All @@ -1079,3 +1098,9 @@ install(
install(
TARGETS
sai_replayer-fake-${SAI_VER_SUFFIX})

if (BUILD_SAI_FAKE_LINK_TEST)
install(
TARGETS
sai_link_test-fake-${SAI_VER_SUFFIX})
endif()
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fbthrift-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 0d58d2e8515f4fd12a9ec222c44007de015a495f
Subproject commit cbc3de581fdf36ba474b0c135b9e785e504f1c1e
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/folly-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 6ab600f394e71c6c0179f509472e0a77b8baaaa4
Subproject commit ce2b95715de229fcb51bd97410469a3ad4d2bfb2
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/wangle-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit ae80140abe477d22b3f28211f33efaeec552e152
Subproject commit 44690e7894842a7127245837b69627d4b964aabd
13 changes: 9 additions & 4 deletions build/fbcode_builder/getdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from getdeps.runcmd import run_cmd
from getdeps.subcmd import add_subcommands, cmd, SubCmd


try:
import getdeps.facebook # noqa: F401
except ImportError:
Expand Down Expand Up @@ -632,12 +631,15 @@ def run_project_cmd(self, args, loader, manifest):
# set the built_marker. This allows subsequent runs of getdeps.py
# for the project to run with different cmake_targets to trigger
# cmake
has_built_marker = False
if not (m == manifest and args.cmake_target != "install"):
with open(built_marker, "w") as f:
f.write(project_hash)
has_built_marker = True

# Only populate the cache from continuous build runs
if args.schedule_type == "continuous":
# Only populate the cache from continuous build runs, and
# only if we have a built_marker.
if args.schedule_type == "continuous" and has_built_marker:
cached_project.upload()
elif args.verbose:
print("found good %s" % built_marker)
Expand Down Expand Up @@ -688,7 +690,10 @@ def compute_source_change_status(
):
reconfigure = False
sources_changed = False
if not cached_project.download():
if cached_project.download():
if not os.path.exists(built_marker):
fetcher.update()
else:
check_fetcher = True
if os.path.exists(built_marker):
check_fetcher = False
Expand Down
1 change: 0 additions & 1 deletion build/fbcode_builder/getdeps/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
)
from .py_wheel_builder import PythonWheelBuilder


REQUIRED = "REQUIRED"
OPTIONAL = "OPTIONAL"

Expand Down
1 change: 1 addition & 0 deletions build/fbcode_builder/getdeps/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# LICENSE file in the root directory of this source tree.

import os

import platform
import re
import shlex
Expand Down
39 changes: 0 additions & 39 deletions build/fbcode_builder/manifests/traffixr

This file was deleted.

4 changes: 2 additions & 2 deletions cmake/Agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ add_library(core
fboss/agent/DHCPv4Handler.cpp
fboss/agent/DHCPv6Handler.cpp
fboss/agent/DsfSubscriber.cpp
fboss/agent/FabricReachabilityManager.cpp
fboss/agent/EncapIndexAllocator.cpp
fboss/agent/FibHelpers.cpp
fboss/agent/FsdbSyncer.cpp
fboss/agent/HwSwitch.cpp
fboss/agent/IPHeaderV4.cpp
fboss/agent/IPv4Handler.cpp
Expand Down Expand Up @@ -157,7 +157,6 @@ add_library(core
fboss/agent/oss/RouteUpdateLogger.cpp
fboss/agent/oss/SwSwitch.cpp
fboss/agent/oss/DsfSubscriber.cpp
fboss/agent/oss/FsdbStateDeltaConverter.cpp
fboss/agent/oss/FsdbSyncer.cpp
)

Expand Down Expand Up @@ -224,6 +223,7 @@ target_link_libraries(handler
wedge400c_platform_mapping
kamet_platform_mapping
makalu_platform_mapping
yangra_platform_mapping
)

target_link_libraries(fboss_types
Expand Down
14 changes: 14 additions & 0 deletions cmake/AgentBcmLinkTests.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CMake to build libraries and binaries for agent link testing

add_executable(bcm_link_test
fboss/agent/test/link_tests/BcmLinkTests.cpp
)

target_link_libraries(bcm_link_test
link_tests
platform
bcm
bcm_ecmp_utils
bcm_packet_trap_helper
bcm_qos_utils
)
1 change: 1 addition & 0 deletions cmake/AgentBenchmarks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ add_library(agent_benchmarks

target_link_libraries(agent_benchmarks
agent_ensemble
Folly::folly
)


Expand Down
Loading

0 comments on commit 7dd4c0b

Please sign in to comment.