gfe-relnote: (n/a) Add quic platform api to create BBRv2 sender, currently the implementation just creates a BBRv1 sender. No behavior change, not protected.
Merge note: third_party/quic/platform/impl/quic_bbr2_sender_impl.h needs to be copied to Chromium.
PiperOrigin-RevId: 252890529
Change-Id: I72b44e189675b397bb67bfd84e4bbb23cab11fcf
diff --git a/quic/core/congestion_control/send_algorithm_interface.cc b/quic/core/congestion_control/send_algorithm_interface.cc
index 0b3c6c8..b641eb4 100644
--- a/quic/core/congestion_control/send_algorithm_interface.cc
+++ b/quic/core/congestion_control/send_algorithm_interface.cc
@@ -7,6 +7,7 @@
#include "net/third_party/quiche/src/quic/core/congestion_control/bbr_sender.h"
#include "net/third_party/quiche/src/quic/core/congestion_control/tcp_cubic_sender_bytes.h"
#include "net/third_party/quiche/src/quic/core/quic_packets.h"
+#include "net/third_party/quiche/src/quic/platform/api/quic_bbr2_sender.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_fallthrough.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
@@ -33,6 +34,10 @@
return new BbrSender(clock->ApproximateNow(), rtt_stats, unacked_packets,
initial_congestion_window, max_congestion_window,
random, stats);
+ case kBBRv2:
+ return new QuicBbr2Sender(clock->ApproximateNow(), rtt_stats,
+ unacked_packets, initial_congestion_window,
+ max_congestion_window, random, stats);
case kPCC:
if (GetQuicReloadableFlag(quic_enable_pcc3)) {
return CreatePccSender(clock, rtt_stats, unacked_packets, random, stats,
diff --git a/quic/core/quic_types.h b/quic/core/quic_types.h
index 66a90c1..7a83495 100644
--- a/quic/core/quic_types.h
+++ b/quic/core/quic_types.h
@@ -368,7 +368,14 @@
// QUIC. Note that this is separate from the congestion feedback type -
// some congestion control algorithms may use the same feedback type
// (Reno and Cubic are the classic example for that).
-enum CongestionControlType { kCubicBytes, kRenoBytes, kBBR, kPCC, kGoogCC };
+enum CongestionControlType {
+ kCubicBytes,
+ kRenoBytes,
+ kBBR,
+ kPCC,
+ kGoogCC,
+ kBBRv2,
+};
enum LossDetectionType : uint8_t {
kNack, // Used to mimic TCP's loss detection.
diff --git a/quic/platform/api/quic_bbr2_sender.h b/quic/platform/api/quic_bbr2_sender.h
new file mode 100644
index 0000000..48bc86a
--- /dev/null
+++ b/quic/platform/api/quic_bbr2_sender.h
@@ -0,0 +1,16 @@
+// Copyright (c) 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef QUICHE_QUIC_PLATFORM_API_QUIC_BBR2_SENDER_H_
+#define QUICHE_QUIC_PLATFORM_API_QUIC_BBR2_SENDER_H_
+
+#include "net/quic/platform/impl/quic_bbr2_sender_impl.h"
+
+namespace quic {
+
+using QuicBbr2Sender = QuicBbr2SenderImpl;
+
+} // namespace quic
+
+#endif // QUICHE_QUIC_PLATFORM_API_QUIC_BBR2_SENDER_H_