Skip to content

Commit

Permalink
wip: path creation and transfer works, remains closing
Browse files Browse the repository at this point in the history
  • Loading branch information
qdeconinck committed Feb 22, 2024
1 parent 6df29d5 commit 9977a07
Show file tree
Hide file tree
Showing 7 changed files with 1,125 additions and 616 deletions.
8 changes: 0 additions & 8 deletions apps/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ pub struct CommonArgs {
pub qpack_max_table_capacity: Option<u64>,
pub qpack_blocked_streams: Option<u64>,
pub initial_cwnd_packets: u64,
pub multipath: bool,
pub initial_max_paths: Option<u64>,
}

Expand Down Expand Up @@ -85,7 +84,6 @@ pub struct CommonArgs {
/// --qpack-max-table-capacity BYTES Max capacity of dynamic QPACK decoding.
/// --qpack-blocked-streams STREAMS Limit of blocked streams while decoding.
/// --initial-cwnd-packets Size of initial congestion window, in packets.
/// --multipath Enable multipath support.
/// --initial-max-paths Enable multipath support up to the number of
/// paths.
///
Expand Down Expand Up @@ -199,8 +197,6 @@ impl Args for CommonArgs {
.parse::<u64>()
.unwrap();

let multipath = args.get_bool("--multipath");

let initial_max_paths = if args.get_str("--initial-max-paths") != "" {
Some(args.get_str("--initial-max-paths").parse::<u64>().unwrap())
} else {
Expand Down Expand Up @@ -230,7 +226,6 @@ impl Args for CommonArgs {
qpack_max_table_capacity,
qpack_blocked_streams,
initial_cwnd_packets,
multipath,
initial_max_paths,
}
}
Expand Down Expand Up @@ -261,7 +256,6 @@ impl Default for CommonArgs {
qpack_max_table_capacity: None,
qpack_blocked_streams: None,
initial_cwnd_packets: 10,
multipath: false,
initial_max_paths: None,
}
}
Expand Down Expand Up @@ -300,7 +294,6 @@ Options:
--max-active-cids NUM The maximum number of active Connection IDs we can support [default: 2].
--enable-active-migration Enable active connection migration.
--perform-migration Perform connection migration on another source port.
--multipath Enable multipath support.
--initial-max-paths NUM Enable multipath support up to the number of paths.
-A --address ADDR ... Specify addresses to be used instead of the unspecified address. Non-routable addresses will lead to connectivity issues.
-R --rm-addr TIMEADDR ... Specify addresses to stop using after the provided time (format time,addr).
Expand Down Expand Up @@ -549,7 +542,6 @@ Options:
--disable-gso Disable GSO (linux only).
--disable-pacing Disable pacing (linux only).
--initial-cwnd-packets PACKETS The initial congestion window size in terms of packet count [default: 10].
--multipath Enable multipath support.
--initial-max-paths NUM Enable multipath support up to the number of paths.
-h --help Show this screen.
";
Expand Down
1 change: 0 additions & 1 deletion apps/src/bin/quiche-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ fn main() {
config.set_initial_congestion_window_packets(
usize::try_from(conn_args.initial_cwnd_packets).unwrap(),
);
config.set_multipath(conn_args.multipath);
if let Some(initial_max_paths) = conn_args.initial_max_paths {
config.set_initial_max_paths(initial_max_paths);
}
Expand Down
13 changes: 8 additions & 5 deletions apps/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ pub fn connect(
config.set_initial_max_streams_uni(conn_args.max_streams_uni);
config.set_disable_active_migration(!conn_args.enable_active_migration);
config.set_active_connection_id_limit(conn_args.max_active_cids);
config.set_multipath(conn_args.multipath);
if let Some(initial_max_paths) = conn_args.initial_max_paths {
config.set_initial_max_paths(initial_max_paths);
}
Expand Down Expand Up @@ -464,8 +463,12 @@ pub fn connect(
}

// See whether source Connection IDs have been retired.
while let Some(retired_scid) = conn.retired_scid_next() {
info!("Retiring source CID {:?}", retired_scid);
while let Some((path_id, retired_scid)) = conn.retired_scid_on_path_next()
{
info!(
"Retiring source CID {:?} from path_id {}",
retired_scid, path_id
);
}

// Provides as many CIDs as possible.
Expand All @@ -479,15 +482,15 @@ pub fn connect(
scid_sent = true;
}

if conn_args.multipath &&
if conn_args.initial_max_paths.is_some() &&
probed_paths < addrs.len() &&
conn.available_dcids() > 0 &&
conn.probe_path(addrs[probed_paths], peer_addr).is_ok()
{
probed_paths += 1;
}

if !conn_args.multipath &&
if conn_args.initial_max_paths.is_none() &&
args.perform_migration &&
!new_path_probed &&
scid_sent &&
Expand Down
Loading

0 comments on commit 9977a07

Please sign in to comment.