Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mozilla/neqo into send-recv…
Browse files Browse the repository at this point in the history
…-no-alloc
  • Loading branch information
mxinden committed Sep 25, 2024
2 parents 2b0103a + 55e3a93 commit c254319
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
CARGO_PROFILE_RELEASE_DEBUG: true
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
TOOLCHAIN: nightly
TOOLCHAIN: stable
RUSTFLAGS: -C link-arg=-fuse-ld=lld -C link-arg=-Wl,--no-rosegment, -C force-frame-pointers=yes
PERF_OPT: record -F997 --call-graph fp -g

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
# Don't increase beyond what Firefox is currently using:
# https://searchfox.org/mozilla-central/search?q=MINIMUM_RUST_VERSION&path=python/mozboot/mozboot/util.py
os: [ubuntu-latest, macos-latest, windows-latest]
# Keep in sync with Cargo.toml
rust-toolchain: [1.76.0, stable, nightly]
type: [debug]
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ permissions:

jobs:
clippy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: ./.github/actions/rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
type: [debug, release]
runs-on: ${{ matrix.os }}
defaults:
Expand Down
12 changes: 6 additions & 6 deletions neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2073,7 +2073,10 @@ impl Connection {
// Count how many bytes in this range are non-zero.
let pn_len = mem::size_of::<PacketNumber>()
- usize::try_from(unacked_range.leading_zeros() / 8).unwrap();
// pn_len can't be zero (unacked_range is > 0)
assert!(
pn_len > 0,
"pn_len can't be zero as unacked_range should be > 0, pn {pn}, largest_acknowledged {largest_acknowledged:?}, tx {tx}"
);
// TODO(mt) also use `4*path CWND/path MTU` to set a minimum length.
builder.pn(pn, pn_len);
pn
Expand Down Expand Up @@ -3484,11 +3487,8 @@ impl Connection {
let path = self.paths.primary().ok_or(Error::NotAvailable)?;
let mtu = path.borrow().plpmtu();

// TODO: Is this the cleanest way?
let mut tmp_out = vec![];

// TODO: This was previously initialized with the mtu. Relevant?
let encoder = Encoder::new(&mut tmp_out);
let mut out = vec![];
let encoder = Encoder::new(&mut out);

let (_, mut builder) = Self::build_packet_header(
&path.borrow(),
Expand Down

0 comments on commit c254319

Please sign in to comment.