Skip to content

fix(net): reset io_uring multiqueue state - #557

Merged
Lencerf merged 1 commit into
google:mainfrom
Lencerf:fix/net-reset-ctrlq-framing
Nov 13, 2026
Merged

Lencerf merged 1 commit into
google:mainfrom
Lencerf:fix/net-reset-ctrlq-framing

Conversation

@Lencerf

@Lencerf Lencerf commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

<IoUring as Backend<D>>::reset() was a no-op and VirtioIoUring lacked a reset callback, so resetting a tap::Net device backed by io_uring kept extra multiqueue tap sockets open instead of returning to a single active queue pair (VirtIO 1.4 Sec 5.1.9.5.6.2: "After initialization of reset, the device MUST queue packets only on receiveq1").

Add a default VirtioIoUring::reset(&mut self) {} method, call it from IoUring::reset(), and truncate tap_sockets to 1 while clearing driver_feature in both VirtioIoUring::reset() and VirtioMio::reset().

The control queue framing fix that was also in this PR is now a separate change.

@coveralls

coveralls commented Nov 13, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 43393239769

Coverage increased (+0.1%) to 44.177%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: 1 uncovered change across 1 file (7 of 8 lines covered, 87.5%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
alioth/src/virtio/worker/io_uring.rs 3 2 66.67%
Total (2 files) 8 7 87.5%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
alioth/src/virtio/dev/vsock/uds_vsock.rs 2 81.22%

Coverage Stats

Coverage Status
Relevant Lines: 16564
Covered Lines: 7105
Line Coverage: 42.89%
Relevant Branches: 1776
Covered Branches: 997
Branch Coverage: 56.14%
Branches in Coverage %: Yes
Coverage Strength: 900.81 hits per line

💛 - Coveralls

<IoUring as Backend<D>>::reset() was a no-op and VirtioIoUring lacked a
reset callback, so resetting a tap::Net device backed by io_uring kept
extra multiqueue tap sockets open instead of returning to a single
active queue pair (VirtIO 1.4 Sec 5.1.9.5.6.2: "After initialization of
reset, the device MUST queue packets only on receiveq1").

Add a default VirtioIoUring::reset(&mut self) {} method, call it from
IoUring::reset(), and truncate tap_sockets to 1 while clearing
driver_feature in both VirtioIoUring::reset() and VirtioMio::reset().

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@Lencerf
Lencerf force-pushed the fix/net-reset-ctrlq-framing branch from a96bf74 to 6013a4e Compare November 13, 2026 08:26
@Lencerf Lencerf changed the title fix(net): reset io_uring multiqueue state and allow arbitrary ctrlq framing fix(net): reset io_uring multiqueue state Nov 13, 2026
@Lencerf
Lencerf enabled auto-merge November 13, 2026 08:31
@Lencerf
Lencerf added this pull request to the merge queue Nov 13, 2026
Merged via the queue into google:main with commit eff36f1 Nov 13, 2026
20 checks passed
@Lencerf
Lencerf deleted the fix/net-reset-ctrlq-framing branch November 13, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants