Skip to content

Commit

Permalink
fix(bin): enable pacing on client & server by default (#1753)
Browse files Browse the repository at this point in the history
* fix(bin): enable pacing on server by default

Before #1724 `neqo-server` would always run
with `ConnectionParameters::pacing` `true`. `neqo-client` would provide a
command line flag `--pacing` which defaulted to `false`.

#1724 consolidated the `QuicParameters`
`struct` from `neqo-client` and `neqo-server`. Since both `neqo-client` and
`neqo-server` default to `pacing` `false`.

This commit restores the pre-#1724 behavior, i.e. `neqo-server` defaulting to
`pacing=true` and `neqo-client` defaulting to `pacing=false`.

(Note that you will have to provide a value to `--pacing` from now on. I.e.
`--pacing=true` or `--pacing=false` instead of just `--pacing`.)

* fix(bin): enable pacing by default and add optional --no-pacing

Before #1724 `neqo-server` would always run
with `ConnectionParameters::pacing` `true`. `neqo-client` would provide a
command line flag `--pacing` which defaulted to `false`.

#1724 consolidated the `QuicParameters`
`struct` from `neqo-client` and `neqo-server`. Since both `neqo-client` and
`neqo-server` default to `pacing` `false`.

This commit replaces the `--pacing` flag with `--no-pacing`. Pacing is enabled
by default on both `neqo-server` and `neqo-client`.

* Update test/upload_test.sh

* Update comment
  • Loading branch information
mxinden authored Mar 17, 2024
1 parent 29fdbc0 commit 32ef2c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions neqo-bin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ pub struct QuicParameters {
/// The congestion controller to use.
pub congestion_control: CongestionControlAlgorithm,

#[arg(long = "pacing")]
/// Whether pacing is enabled.
pub pacing: bool,
#[arg(long = "no-pacing")]
/// Whether to disable pacing.
pub no_pacing: bool,

#[arg(name = "preferred-address-v4", long)]
/// An IPv4 address for the server preferred address.
Expand Down Expand Up @@ -162,7 +162,7 @@ impl QuicParameters {
.max_streams(StreamType::UniDi, self.max_streams_uni)
.idle_timeout(Duration::from_secs(self.idle_timeout))
.cc_algorithm(self.congestion_control)
.pacing(self.pacing);
.pacing(!self.no_pacing);

if let Some(&first) = self.quic_version.first() {
let all = if self.quic_version[1..].contains(&first) {
Expand Down
7 changes: 4 additions & 3 deletions test/upload_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ cc=cubic
client="cargo run --release --bin neqo-client -- http://$server_address:$server_port/ --test upload --upload-size $upload_size --cc $cc"
server="cargo run --release --bin neqo-server -- --db ../test-fixture/db $server_address:$server_port"
server_pid=0
pacing=true
if [ "$pacing" = true ]; then
client="$client --pacing"
no_pacing=false
if [ "$no_pacing" = true ]; then
client="$client --no-pacing"
server="$server --no-pacing"
fi

# Define two indexed arrays to store network conditions
Expand Down

0 comments on commit 32ef2c3

Please sign in to comment.