зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1851908 - Add a preference to specify neqo's congestion control algorithm r=necko-reviewers,kershaw
We want to experiment with NewReno so expose this via pref. Differential Revision: https://phabricator.services.mozilla.com/D187602
This commit is contained in:
Родитель
26cbc19d7d
Коммит
d465a8510e
|
@ -12417,6 +12417,15 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
# The congestion control algorithm with which to configure neqo.
|
||||
# 0 => NewReno
|
||||
# 1 => Cubic
|
||||
- name: network.http.http3.cc_algorithm
|
||||
type: RelaxedAtomicUint32
|
||||
value: 1
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# When true, a http request will be upgraded to https when HTTPS RR is
|
||||
# available.
|
||||
- name: network.dns.upgrade_with_https_rr
|
||||
|
|
|
@ -124,10 +124,20 @@ impl NeqoHttp3Conn {
|
|||
} else {
|
||||
vec![quic_version]
|
||||
};
|
||||
|
||||
let cc_algorithm = match static_prefs::pref!("network.http.http3.cc_algorithm") {
|
||||
0 => CongestionControlAlgorithm::NewReno,
|
||||
1 => CongestionControlAlgorithm::Cubic,
|
||||
_ => {
|
||||
// Unknown preferences; default to Cubic
|
||||
CongestionControlAlgorithm::Cubic
|
||||
}
|
||||
};
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut params = ConnectionParameters::default()
|
||||
.versions(quic_version, version_list)
|
||||
.cc_algorithm(CongestionControlAlgorithm::Cubic)
|
||||
.cc_algorithm(cc_algorithm)
|
||||
.max_data(max_data)
|
||||
.max_stream_data(StreamType::BiDi, false, max_stream_data)
|
||||
.grease(static_prefs::pref!("security.tls.grease_http3_enable"));
|
||||
|
@ -1338,9 +1348,9 @@ pub extern "C" fn neqo_http3conn_webtransport_set_sendorder(
|
|||
) -> nsresult {
|
||||
match conn
|
||||
.conn
|
||||
.webtransport_set_sendorder(StreamId::from(stream_id), sendorder)
|
||||
.webtransport_set_sendorder(StreamId::from(stream_id), sendorder)
|
||||
{
|
||||
Ok(()) => NS_OK,
|
||||
Err(_) => NS_ERROR_UNEXPECTED,
|
||||
Ok(()) => NS_OK,
|
||||
Err(_) => NS_ERROR_UNEXPECTED,
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче