Skip to content

refactor(noq)!: Use FourTuple in open_path#661

Open
Frando wants to merge 1 commit into
mainfrom
Frando/open-path-four-tuple
Open

refactor(noq)!: Use FourTuple in open_path#661
Frando wants to merge 1 commit into
mainfrom
Frando/open-path-four-tuple

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented May 19, 2026

Description

This changes noq::Connection::open_path and noq::Connection::open_path_ensure to take a FourTuple instead of a SocketAddr. This lets callers specify the local IP for the new path, which previously could only be discovered after the path was opened.

The proto-side API is unchanged; both noq-proto::Connection::open_path and noq-proto::Connection::open_path_ensure already took a FourTuple.

Breaking Changes

  • changed: noq::Connection::open_path now takes a FourTuple argument. Use FourTuple::from_remote(socket_addr) for previous behavior.
  • changed noq::Connection::open_path_ensure now takes a FourTupleargument. Use FourTuple::from_remote(socket_addr) for previous behavior.

Change checklist

  • Self-review.
  • All breaking changes documented.

@Frando Frando force-pushed the Frando/open-path-four-tuple branch from d35bf99 to 860c688 Compare May 19, 2026 13:30
@Frando Frando marked this pull request as ready for review May 19, 2026 13:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Performance Comparison Report

d35bf99836edf9018d8d87bc189febbd2cc0727f - artifacts

No results available

---
860c688c11c38047ac0a8290d03e4ecd064f8952 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5393.0 Mbps 7781.9 Mbps -30.7% 91.6% / 96.9%
medium-concurrent 5549.3 Mbps 7482.4 Mbps -25.8% 97.4% / 149.0%
medium-single 3854.6 Mbps 4749.2 Mbps -18.8% 93.5% / 101.0%
small-concurrent 3883.7 Mbps 5362.0 Mbps -27.6% 95.9% / 104.0%
small-single 3567.2 Mbps 4814.2 Mbps -25.9% 89.5% / 97.5%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 2982.9 Mbps 4064.8 Mbps -26.6%
lan 782.4 Mbps 810.3 Mbps -3.4%
lossy 69.8 Mbps 56.5 Mbps +23.5%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 25.7% slower on average

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/661/docs/noq/

Last updated: 2026-05-19T13:33:46Z

@Frando Frando requested a review from flub May 19, 2026 13:33
@flub flub added this to the iroh v1.0.0-rc.1 milestone May 19, 2026
@flub flub added the multipath QUIC Multipath extension label May 19, 2026
@flub flub added this to iroh May 19, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 19, 2026
@flub flub moved this from 🚑 Needs Triage to 🏗 In progress in iroh May 19, 2026
Copy link
Copy Markdown
Collaborator

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm half-tempted to make the public functions take impl Into<FourTuple> and than impl that for SocketAddr. But I'm fine with current version too.

Comment thread noq/src/connection.rs
Ok(network_path)
}

impl Connection {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erm, you close the impl block and than open it again? That's pretty unusual... I've grown to be not a fan of multiple impl blocks. Can you move this to after the end of the block entirely? I'd also accept it as a pub(crate) method on FourTuple, which would probably force you to not abuse the PathError and instead have to map it at the usage point 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multipath QUIC Multipath extension

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants