From d976163429c49c0d84d327a989e1a3585745e605 Mon Sep 17 00:00:00 2001 From: Cullen Walsh Date: Thu, 19 Dec 2024 16:25:15 -0800 Subject: [PATCH] BUCK-ify quic/congestion_control [9/n] Summary: This stack of diffs BUCK-ifies various quic folders. This stack is so tall because quic has a ton of dependencies, and breaking it up into many diffs gives the best chance of at least partial success. Reviewed By: mzlee Differential Revision: D67459079 fbshipit-source-id: e32adb93d7beb2087d666076218222366d67e38f --- quic/congestion_control/BUCK | 366 ----------------------- quic/congestion_control/test/BUCK | 229 -------------- quic/congestion_control/third_party/BUCK | 10 - 3 files changed, 605 deletions(-) delete mode 100644 quic/congestion_control/BUCK delete mode 100644 quic/congestion_control/test/BUCK delete mode 100644 quic/congestion_control/third_party/BUCK diff --git a/quic/congestion_control/BUCK b/quic/congestion_control/BUCK deleted file mode 100644 index 187a67e7c..000000000 --- a/quic/congestion_control/BUCK +++ /dev/null @@ -1,366 +0,0 @@ -load("@fbcode//quic:defs.bzl", "mvfst_cpp_library") - -oncall("traffic_protocols") - -mvfst_cpp_library( - name = "bandwidth", - srcs = [ - "Bandwidth.cpp", - ], - headers = [ - "Bandwidth.h", - ], - deps = [ - "//folly:conv", - ], -) - -mvfst_cpp_library( - name = "congestion_controller", - headers = [ - "CongestionController.h", - ], - exported_deps = [ - ":bandwidth", - "//quic:constants", - "//quic/state:cloned_packet_identifier", - "//quic/state:outstanding_packet", - ], -) - -mvfst_cpp_library( - name = "congestion_control_functions", - srcs = [ - "CongestionControlFunctions.cpp", - ], - headers = [ - "CongestionControlFunctions.h", - ], - deps = [ - "//quic:constants", - "//quic/common:time_util", - ], - exported_deps = [ - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "congestion_controller_factory", - srcs = [ - "CongestionControllerFactory.cpp", - ], - headers = [ - "CongestionControllerFactory.h", - ], - deps = [ - ":bbr", - ":bbr2", - ":bbr_bandwidth_sampler", - ":bbr_rtt_sampler", - ":copa", - ":copa2", - ":cubic", - ":newreno", - ":static_cwnd_congestion_controller", - ], - exported_deps = [ - "//quic:constants", - ], -) - -mvfst_cpp_library( - name = "static_cwnd_congestion_controller", - srcs = [ - "StaticCwndCongestionController.cpp", - ], - headers = [ - "StaticCwndCongestionController.h", - ], - deps = [ - ":congestion_control_functions", - ], - exported_deps = [ - ":congestion_controller", - "//quic/state:ack_event", - "//quic/state:transport_settings", - ], -) - -mvfst_cpp_library( - name = "server_congestion_controller_factory", - srcs = [ - "ServerCongestionControllerFactory.cpp", - ], - headers = [ - "ServerCongestionControllerFactory.h", - ], - deps = [ - ":bbr", - ":bbr2", - ":bbr_bandwidth_sampler", - ":bbr_rtt_sampler", - ":bbr_testing", - ":copa", - ":copa2", - ":cubic", - ":newreno", - ":static_cwnd_congestion_controller", - ], - exported_deps = [ - ":congestion_controller_factory", - ], -) - -mvfst_cpp_library( - name = "cubic", - srcs = [ - "QuicCubic.cpp", - ], - headers = [ - "QuicCubic.h", - ], - deps = [ - ":ecn_l4s_tracker", - "//folly:chrono", - "//quic/logging:qlogger_constants", - "//quic/state:state_functions", - ], - exported_deps = [ - ":congestion_control_functions", - ":congestion_controller", - "//quic:exception", - "//quic/state:ack_event", - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "newreno", - srcs = [ - "NewReno.cpp", - ], - headers = [ - "NewReno.h", - ], - deps = [ - ":congestion_control_functions", - "//quic/logging:qlogger_constants", - ], - exported_deps = [ - ":congestion_controller", - "//quic:exception", - "//quic/state:ack_event", - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "copa", - srcs = [ - "Copa.cpp", - ], - headers = [ - "Copa.h", - ], - deps = [ - ":congestion_control_functions", - "//quic/common:time_util", - "//quic/logging:qlogger_constants", - ], - exported_deps = [ - ":congestion_controller", - "//quic:exception", - "//quic/common:optional", - "//quic/congestion_control/third_party:chromium_windowed_filter", - "//quic/state:ack_event", - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "copa2", - srcs = [ - "Copa2.cpp", - ], - headers = [ - "Copa2.h", - ], - deps = [ - ":congestion_control_functions", - "//quic/logging:qlogger_constants", - ], - exported_deps = [ - ":congestion_controller", - "//quic/congestion_control/third_party:chromium_windowed_filter", - "//quic/state:ack_event", - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "bbr", - srcs = [ - "Bbr.cpp", - ], - headers = [ - "Bbr.h", - ], - deps = [ - ":congestion_control_functions", - "//folly:random", - "//quic:constants", - "//quic/common:time_util", - "//quic/logging:qlogger_constants", - "//quic/state:ack_frequency_functions", - ], - exported_deps = [ - ":bandwidth", - ":congestion_controller", - "//quic/congestion_control/third_party:chromium_windowed_filter", - "//quic/state:quic_state_machine", - "//quic/state:transport_settings", - ], -) - -mvfst_cpp_library( - name = "bbr2", - srcs = [ - "Bbr2.cpp", - ], - headers = [ - "Bbr2.h", - ], - deps = [ - ":congestion_control_functions", - ], - exported_deps = [ - ":bandwidth", - ":congestion_controller", - "//quic/congestion_control/third_party:chromium_windowed_filter", - "//quic/state:quic_state_machine", - "//quic/state:transport_settings", - ], -) - -mvfst_cpp_library( - name = "bbr_rtt_sampler", - srcs = [ - "BbrRttSampler.cpp", - ], - headers = [ - "BbrRttSampler.h", - ], - exported_deps = [ - ":bbr", - "//quic:constants", - ], -) - -mvfst_cpp_library( - name = "bbr_bandwidth_sampler", - srcs = [ - "BbrBandwidthSampler.cpp", - ], - headers = [ - "BbrBandwidthSampler.h", - ], - deps = [ - "//quic/logging:qlogger_constants", - ], - exported_deps = [ - ":bbr", - "//quic/congestion_control/third_party:chromium_windowed_filter", - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "bbr_testing", - srcs = [ - "BbrTesting.cpp", - ], - headers = [ - "BbrTesting.h", - ], - exported_deps = [ - ":bbr", - ], -) - -mvfst_cpp_library( - name = "pacer", - srcs = [ - "TokenlessPacer.cpp", - ], - headers = [ - "Pacer.h", - "TokenlessPacer.h", - ], - deps = [ - ":congestion_control_functions", - ], - exported_deps = [ - "//quic/state:quic_state_machine", - ], -) - -mvfst_cpp_library( - name = "packet_processor", - headers = [ - "PacketProcessor.h", - ], - exported_deps = [ - ":congestion_controller", - "//folly/io:socket_option_map", - "//quic/state:cloned_packet_identifier", - "//quic/state:outstanding_packet", - ], -) - -mvfst_cpp_library( - name = "simulated_tbf", - srcs = [ - "SimulatedTBF.cpp", - ], - headers = [ - "SimulatedTBF.h", - ], - deps = [ - "//quic:exception", - ], - exported_deps = [ - "//folly:token_bucket", - "//quic:constants", - ], - exported_external_deps = [ - "glog", - ], -) - -mvfst_cpp_library( - name = "throttling_signal_provider", - headers = [ - "ThrottlingSignalProvider.h", - ], - exported_deps = [ - "//quic/common:optional", - ], -) - -mvfst_cpp_library( - name = "ecn_l4s_tracker", - srcs = [ - "EcnL4sTracker.cpp", - ], - headers = [ - "EcnL4sTracker.h", - ], - deps = [ - "//quic:exception", - ], - exported_deps = [ - ":packet_processor", - "//quic/state:quic_state_machine", - ], -) diff --git a/quic/congestion_control/test/BUCK b/quic/congestion_control/test/BUCK deleted file mode 100644 index a87deb506..000000000 --- a/quic/congestion_control/test/BUCK +++ /dev/null @@ -1,229 +0,0 @@ -load("@fbcode//quic:defs.bzl", "mvfst_cpp_library") -load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest") - -oncall("traffic_protocols") - -mvfst_cpp_library( - name = "mocks", - headers = [ - "Mocks.h", - ], - exported_deps = [ - "//folly/portability:gmock", - "//quic/congestion_control:bbr", - ], -) - -mvfst_cpp_library( - name = "TestingCubic", - headers = [ - "TestingCubic.h", - ], - exported_deps = [ - "//quic/congestion_control:cubic", - ], -) - -cpp_unittest( - name = "CongestionControlFunctionsTest", - srcs = [ - "CongestionControlFunctionsTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic:constants", - "//quic/congestion_control:congestion_control_functions", - "//quic/state:quic_state_machine", - ], -) - -cpp_unittest( - name = "CubicStateTest", - srcs = [ - "CubicStateTest.cpp", - ], - deps = [ - ":TestingCubic", - "//folly/portability:gtest", - "//quic/common/test:test_utils", - ], -) - -cpp_unittest( - name = "CubicTest", - srcs = [ - "CubicHystartTest.cpp", - "CubicRecoveryTest.cpp", - "CubicSteadyTest.cpp", - "CubicTest.cpp", - ], - deps = [ - ":TestingCubic", - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:cubic", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "NewRenoTest", - srcs = [ - "NewRenoTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:newreno", - "//quic/fizz/server/handshake:fizz_server_handshake", - ], -) - -cpp_unittest( - name = "CopaTest", - srcs = [ - "CopaTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:copa", - "//quic/fizz/server/handshake:fizz_server_handshake", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "BbrTest", - srcs = [ - "BbrTest.cpp", - ], - deps = [ - ":mocks", - "//folly/portability:gmock", - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:bbr", - "//quic/congestion_control:bbr_bandwidth_sampler", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "BbrRttSamplerTest", - srcs = [ - "BbrRttSamplerTest.cpp", - ], - deps = [ - "//folly/portability:gmock", - "//folly/portability:gtest", - "//quic/congestion_control:bbr_rtt_sampler", - ], -) - -cpp_unittest( - name = "BbrBandwidthSamplerTest", - srcs = [ - "BbrBandwidthSamplerTest.cpp", - ], - deps = [ - "//folly/portability:gmock", - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:bbr_bandwidth_sampler", - ], -) - -cpp_unittest( - name = "BandwidthTest", - srcs = [ - "BandwidthTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic/congestion_control:bandwidth", - ], -) - -cpp_unittest( - name = "PacerTest", - srcs = [ - "PacerTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic/congestion_control:pacer", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "StaticCwndCongestionControllerTest", - srcs = [ - "StaticCwndCongestionControllerTest.cpp", - ], - deps = [ - ":mocks", - "//folly/portability:gmock", - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:bbr", - "//quic/congestion_control:static_cwnd_congestion_controller", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "SimulatedTBFTest", - srcs = [ - "SimulatedTBFTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic:exception", - "//quic/congestion_control:simulated_tbf", - ], -) - -cpp_unittest( - name = "ThrottlingSignalProviderTest", - srcs = [ - "ThrottlingSignalProviderTest.cpp", - ], - deps = [ - "//quic/api:transport", - "//quic/common/test:test_utils", - "//quic/congestion_control:bbr", - "//quic/congestion_control:bbr_bandwidth_sampler", - "//quic/congestion_control:simulated_tbf", - "//quic/congestion_control:throttling_signal_provider", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "Bbr2Test", - srcs = [ - "Bbr2Test.cpp", - ], - deps = [ - ":mocks", - "//folly/portability:gmock", - "//folly/portability:gtest", - "//quic/common/test:test_utils", - "//quic/congestion_control:bbr2", - "//quic/state/test:mocks", - ], -) - -cpp_unittest( - name = "EcnL4sTrackerTest", - srcs = [ - "EcnL4sTrackerTest.cpp", - ], - deps = [ - "//folly/portability:gtest", - "//quic/api/test:mocks", - "//quic/congestion_control:ecn_l4s_tracker", - ], -) diff --git a/quic/congestion_control/third_party/BUCK b/quic/congestion_control/third_party/BUCK deleted file mode 100644 index e4d701e3d..000000000 --- a/quic/congestion_control/third_party/BUCK +++ /dev/null @@ -1,10 +0,0 @@ -load("@fbcode//quic:defs.bzl", "mvfst_cpp_library") - -oncall("traffic_protocols") - -mvfst_cpp_library( - name = "chromium_windowed_filter", - headers = [ - "windowed_filter.h", - ], -)