Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.7.0 #170

Merged
merged 18 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,26 @@ jobs:
- name: Update rust
run: rustup update
- name: Build TQUIC library and tools
run: cargo build --all -F ffi --verbose
run: cargo build --all -F ffi --verbose && cargo test

build_freebsd:
name: Build for FreeBSD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build in FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
freebsd-version
pkg install -y curl gmake cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
run: |
. "$HOME/.cargo/env"
cargo build --all -F ffi --verbose && cargo test

build_ios:
name: Build for iOS
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tquic-goodput.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ jobs:
python3 run.py -r $QUIC_IMAGES -s ${{ matrix.impl }} -c ${{ matrix.impl }} -t ${{ matrix.case }} -a ${{ matrix.cc }} -d -n "drop-rate --delay=15ms --bandwidth=10Mbps --queue=25 --rate_to_server=5 --rate_to_client=5" -j ${{ matrix.case }}-5-${{ matrix.cc }}-${{ matrix.impl }}.json

- name: Store measurement results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.case }}-${{ matrix.impl }}
name: ${{ matrix.impl }}-${{ matrix.case }}-${{ matrix.cc }}
path: quic-interop-runner/goodput*.json

result:
runs-on: ubuntu-latest
needs: measure
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Store all measurement results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: goodput-all-result
path: goodput*
12 changes: 11 additions & 1 deletion .github/workflows/tquic-interop-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,14 @@ jobs:
- name: Run the interop tests
run: |
cd quic-interop-runner
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,retry,resumption,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,handshakeloss,handshakecorruption,retry,resumption,zerortt,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 -l ${{ matrix.client }}-${{ matrix.server }}-logs

- name: Store run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.client }}-${{ matrix.server }}
path: |
quic-interop-runner/*logs/*
!quic-interop-runner/*logs/**/crosstraffic/
!quic-interop-runner/*logs/**/goodput/
14 changes: 13 additions & 1 deletion .github/workflows/tquic-interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
Expand All @@ -15,6 +16,7 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
server: [tquic]
client: [tquic]
Expand Down Expand Up @@ -47,4 +49,14 @@ jobs:
- name: Run the interop tests
run: |
cd quic-interop-runner
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,retry,resumption,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1
python3 run.py -s ${{ matrix.server }} -c ${{ matrix.client }} -t handshake,handshakeloss,handshakecorruption,retry,resumption,zerortt,http3,ipv6,transfer,multiplexing,longrtt,blackhole,transferloss,transfercorruption,goodput,crosstraffic -d -r tquic=tquic_interop:v1 -l ${{ matrix.client }}-${{ matrix.server }}-logs

- name: Store run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.client }}-${{ matrix.server }}
path: |
quic-interop-runner/*logs/*
!quic-interop-runner/*logs/**/crosstraffic/
!quic-interop-runner/*logs/**/goodput/
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [v0.6.0] - 2024-01-07
## [v0.7.0] - 2024-02-02

### Added
- Add support for building on FreeBSD
- Add more path level metrics
- Add more quic and recovery events in qlog
- Add tquic_qvis.sh to convert qlog files to be compatible with qvis
- Update MultipathScheduler interface for some advanced schedulers
- Add tquic_tools_test.sh for additional end-to-end testing
- tquic_client: support early data
- tquic_tools: use millisecond precision for log timestamp
- tquic_tools: add `log-file` option to write logs to specified file
- tquic_tools: add `active-cid-limit` option to allow more paths

### Changed
- tquic_tools: change the `qlog-log` option to the `qlog-dir` option
- tquic_tools: change the `dump-path` option to the `dump-dir` option
- tquic_tools: update default pto linear factor
- tquic_client: change the `local_addresses` option to allow the os to choose available ports
- tquic_client: use `local_addresses` option to specify the addresses to bind in both singlepath and multipath mode.

### Fixed
- Fix record separator of qlog in json-seq format


## [v0.6.0] - 2024-01-17

### Added
- Support the latest version of qlog (v0.4)
Expand Down Expand Up @@ -117,6 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Provide example clients and servers.


[v0.7.0]: https://github.com/tencent/tquic/compare/v0.6.0...v0.7.0
[v0.6.0]: https://github.com/tencent/tquic/compare/v0.5.0...v0.6.0
[v0.5.0]: https://github.com/tencent/tquic/compare/v0.4.0...v0.5.0
[v0.4.0]: https://github.com/tencent/tquic/compare/v0.3.0...v0.4.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tquic"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
rust-version = "1.70.0"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions include/tquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ typedef struct quic_transport_methods_t {
typedef void *quic_transport_context_t;

/**
* Data and meta information of a outgoing packet.
* Data and meta information of an outgoing packet.
*/
typedef struct quic_packet_out_spec_t {
const struct iovec *iov;
Expand All @@ -216,7 +216,7 @@ typedef struct quic_packet_send_methods_t {
typedef void *quic_packet_send_context_t;

/**
* Meta information of a incoming packet.
* Meta information of an incoming packet.
*/
typedef struct quic_packet_info_t {
const struct sockaddr *src;
Expand Down
21 changes: 11 additions & 10 deletions interop/run_endpoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ set -x
/setup.sh

case "$TESTCASE" in
handshake|http3|resumption|ipv6|goodput|crosstraffic|transfer|transferloss|transfercorruption|multiplexing|longrtt|chacha20|blackhole|retry|handshakeloss|handshakecorruption|multiconnect)
handshake|http3|multiconnect|resumption|retry|transfer|zerortt)
;;
zerortt|chacha20)
chacha20)
if [ "$ROLE" == "client" ]; then
exit 127
fi
;;
keyupdate|ecn|amplificationlimit|v2)
keyupdate|ecn|v2)
exit 127
;;
*)
Expand All @@ -42,6 +42,7 @@ TQUIC_SERVER="tquic_server"
ROOT_DIR="/www"
DOWNLOAD_DIR="/downloads"
LOG_DIR="/logs"
QLOG_DIR="/logs/qlog"

CC_ALGOR="CUBIC"
case ${CONGESTION^^} in
Expand All @@ -58,15 +59,15 @@ COPA)
;;
esac

COMMON_ARGS="--keylog-file $SSLKEYLOGFILE --log-level TRACE --idle-timeout 30000 --handshake-timeout 30000 --congestion-control-algor $CC_ALGOR"
COMMON_ARGS="--keylog-file $SSLKEYLOGFILE --qlog-dir $QLOG_DIR --log-level TRACE --log-file $LOG_DIR/$ROLE.log --idle-timeout 30000 --handshake-timeout 30000 --congestion-control-algor $CC_ALGOR"

if [ "$ROLE" == "client" ]; then
# Wait for the simulator to start up.
/wait-for-it.sh sim:57832 -s -t 30

REQS=($REQUESTS)

CLIENT_ARGS="$COMMON_ARGS --dump-path ${DOWNLOAD_DIR} --max-concurrent-requests ${#REQS[@]}"
CLIENT_ARGS="$COMMON_ARGS --dump-dir ${DOWNLOAD_DIR} --max-concurrent-requests ${#REQS[@]}"
CLIENT_ALPN="--alpn hq-interop"
case $TESTCASE in
resumption)
Expand All @@ -91,15 +92,15 @@ if [ "$ROLE" == "client" ]; then
CLIENT_ARGS="$CLIENT_ARGS --initial-rtt 100"
for REQ in $REQUESTS
do
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS $REQ >> $LOG_DIR/$ROLE.log 2>&1
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS $REQ
done
;;
zerortt)
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS ${REQS[0]} > $LOG_DIR/$ROLE.log 2>&1
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS ${REQS[@]:1} >> $LOG_DIR/$ROLE.log 2>&1
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS ${REQS[0]}
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS ${REQS[@]:1}
;;
*)
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS $REQUESTS > $LOG_DIR/$ROLE.log 2>&1
$TQUIC_DIR/$TQUIC_CLIENT $CLIENT_ARGS $REQUESTS
;;
esac
elif [ "$ROLE" == "server" ]; then
Expand All @@ -117,5 +118,5 @@ elif [ "$ROLE" == "server" ]; then
*)
;;
esac
$TQUIC_DIR/$TQUIC_SERVER $SERVER_ARGS > $LOG_DIR/$ROLE.log 2>&1
$TQUIC_DIR/$TQUIC_SERVER $SERVER_ARGS
fi
2 changes: 1 addition & 1 deletion src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub fn decode_varint_len(first: u8) -> usize {
}
}

/// Return the encoding length of a int using variable-length integer encoding.
/// Return the encoding length of an int using variable-length integer encoding.
///
/// See RFC 9000 Section 16 Table 4 Summary of Integer Encodings.
pub fn encode_varint_len(n: u64) -> usize {
Expand Down
4 changes: 2 additions & 2 deletions src/congestion_control/cubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ mod tests {
has_data: false,
sent_size: pkt_size as usize,
rate_sample_state: Default::default(),
reinjected: false,
..SentPacket::default()
});
}

Expand Down Expand Up @@ -644,7 +644,7 @@ mod tests {
has_data: false,
sent_size: pkt_size as usize,
rate_sample_state: Default::default(),
reinjected: false,
..SentPacket::default()
});
}

Expand Down
9 changes: 4 additions & 5 deletions src/congestion_control/delivery_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ mod tests {
has_data: false,
sent_size: 240,
rate_sample_state: Default::default(),
reinjected: false,
..SentPacket::default()
};

rate_estimator.on_packet_sent(&mut pkt_n1, bytes_in_flight, bytes_lost);
Expand All @@ -308,7 +308,7 @@ mod tests {
has_data: false,
sent_size: 240,
rate_sample_state: Default::default(),
reinjected: false,
..SentPacket::default()
};

bytes_in_flight += pkt_n1.sent_size as u64;
Expand Down Expand Up @@ -361,7 +361,6 @@ mod tests {
let now = Instant::now();
let mut pkts_part1: Vec<SentPacket> = Vec::new();
let mut pkts_part2: Vec<SentPacket> = Vec::new();
// let mut pkts_part3: Vec<SentPacket> = Vec::new();
let bytes_lost = 0;
let mut bytes_in_flight = 0;
let pkt_size: u64 = 240;
Expand All @@ -380,7 +379,7 @@ mod tests {
has_data: false,
sent_size: pkt_size as usize,
rate_sample_state: Default::default(),
reinjected: false,
..SentPacket::default()
});
}

Expand All @@ -397,7 +396,7 @@ mod tests {
has_data: false,
sent_size: pkt_size as usize,
rate_sample_state: Default::default(),
reinjected: false,
..SentPacket::default()
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/congestion_control/pacing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const MIN_BURST_PACKET_NUM: u64 = 10;

/// The upper bound of burst packet number.
///
/// Used to restrict capacity. A extremely large capacity is meaningless.
/// Used to restrict capacity. An extremely large capacity is meaningless.
const MAX_BURST_PACKET_NUM: u64 = 128;

/// Using a value for N that is small, but at least 1 (for example, 1.25) ensures
Expand Down
8 changes: 4 additions & 4 deletions src/connection/cid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl ConnectionIdDeque {

/// Insert the given ConnectionIdItem.
///
/// The caller must not add a invalid duplicated cid
/// The caller must not add an invalid duplicated cid
fn insert(&mut self, cid: ConnectionIdItem) -> Result<()> {
if self.queue.len() == self.capacity {
return Err(Error::ConnectionIdLimitError);
Expand Down Expand Up @@ -585,7 +585,7 @@ mod tests {
assert_eq!(cids.unused_scids(), 0);
assert_eq!(cids.next_scid_to_advertise(), None);

// Add a invalid scid without reset token
// Add an invalid scid without reset token
let scid1 = ConnectionId::random();
assert_eq!(
cids.add_scid(scid1, None, true, None, false),
Expand Down Expand Up @@ -786,7 +786,7 @@ mod tests {
);

// Fake receiving of NEW_CONNECTION_ID that carrys a new issued CID with
// a invalid Retire Prior To field
// an invalid Retire Prior To field
assert_eq!(
cids.add_dcid(ConnectionId::random(), 1, 1, 2),
Err(Error::ProtocolViolation)
Expand All @@ -813,7 +813,7 @@ mod tests {
// Fake receiving of RETIRE_CONNECTION_ID that carrys invalid sequence number
assert_eq!(cids.retire_scid(2, &scid1), Err(Error::ProtocolViolation));

// Fake receiving of RETIRE_CONNECTION_ID that use a unexpected path
// Fake receiving of RETIRE_CONNECTION_ID that use an unexpected path
assert_eq!(cids.retire_scid(0, &scid0), Err(Error::ProtocolViolation));

Ok(())
Expand Down
Loading