baz
bbnew
bbold
+bbr
bbsv
bccaf
bdr
}
getOptionalValue<int>(vars, "internalPipeBufferSize", frontend->d_internalPipeBufferSize);
getOptionalValue<int>(vars, "idleTimeout", frontend->d_idleTimeout);
-
+ {
+ std::string valueStr;
+ if (getOptionalValue<std::string>(vars, "congestionControlAlgo", valueStr) > 0) {
+ if (DOQFrontend::s_available_cc_algorithms.count(valueStr)) {
+ frontend->d_ccAlgo = valueStr;
+ }
+ else {
+ warnlog("Ignoring unknown value '%s' for 'congestionControlAlgo' on 'addDOQLocal'", valueStr);
+ }
+ }
+ }
parseTLSConfig(frontend->d_tlsConfig, "addDOQLocal", vars);
bool ignoreTLSConfigurationErrors = false;
* ``idleTimeout=5``: int - Set the idle timeout, in seconds.
* ``internalPipeBufferSize=0``: int - Set the size in bytes of the internal buffer of the pipes used internally to pass queries and responses between threads. Requires support for ``F_SETPIPE_SZ`` which is present in Linux since 2.6.35. The actual size might be rounded up to a multiple of a page size. 0 means that the OS default size is used. The default value is 0, except on Linux where it is 1048576 since 1.6.0.
* ``maxInFlight=0``: int - Maximum number of in-flight queries. The default is 0, which disables out-of-order processing.
+ * ``congestionControlAlgo="reno"``: str - The congestion control algorithm to be chosen between ``reno``, ``cubic`` and ``bbr``
.. function:: addTLSLocal(address, certFile(s), keyFile(s) [, options])
static std::string s_quicRetryTokenKey = newKey(false);
+std::map<const string, int> DOQFrontend::s_available_cc_algorithms = {
+ {"reno", QUICHE_CC_RENO},
+ {"cubic", QUICHE_CC_CUBIC},
+ {"bbr", QUICHE_CC_BBR},
+};
+
using QuicheConnection = std::unique_ptr<quiche_conn, decltype(&quiche_conn_free)>;
using QuicheConfig = std::unique_ptr<quiche_config, decltype(&quiche_config_free)>;
// https://docs.rs/quiche/latest/quiche/struct.Config.html#method.set_initial_max_data
quiche_config_set_initial_max_data(config.get(), 8192 * d_maxInFlight);
- quiche_config_set_cc_algorithm(config.get(), QUICHE_CC_RENO);
+ auto algo = DOQFrontend::s_available_cc_algorithms.find(d_ccAlgo);
+ if (algo != DOQFrontend::s_available_cc_algorithms.end()) {
+ quiche_config_set_cc_algorithm(config.get(), static_cast<enum quiche_cc_algorithm>(algo->second));
+ }
{
PacketBuffer resetToken;
#endif
uint64_t d_idleTimeout{5};
uint64_t d_maxInFlight{65535};
+ std::string d_ccAlgo{"reno"};
+ static std::map<const string, int> s_available_cc_algorithms;
};
struct DOQUnit