Skip to content

netvsp: adding test for subchannel request max#2799

Merged
erfrimod merged 2 commits intomicrosoft:mainfrom
erfrimod:erfrimod/subchannel-index-oob
Feb 26, 2026
Merged

netvsp: adding test for subchannel request max#2799
erfrimod merged 2 commits intomicrosoft:mainfrom
erfrimod:erfrimod/subchannel-index-oob

Conversation

@erfrimod
Copy link
Contributor

@erfrimod erfrimod commented Feb 11, 2026

There are crash dumps from netvsp restore_queues()
driver: Box::new(drivers[queue_index as usize].clone()),

Should be fixed by #2430

  • Adding unit test to validate.

@erfrimod erfrimod force-pushed the erfrimod/subchannel-index-oob branch from 5af0803 to fc779cd Compare February 17, 2026 19:29
@erfrimod erfrimod changed the title netvsp: adding index oob tests for subchannel requests netvsp: adding test for subchannel request max Feb 17, 2026
@erfrimod erfrimod marked this pull request as ready for review February 17, 2026 19:36
@erfrimod erfrimod requested a review from a team as a code owner February 17, 2026 19:36
Copilot AI review requested due to automatic review settings February 17, 2026 19:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a unit test to validate the fix in PR #2430, which prevents crashes when the number of requested subchannels equals or exceeds the maximum queue limit. The PR also adds a defensive check during restore to log if saved state contains more channels than the adapter supports.

Changes:

  • Adds unit test subchannel_request_equal_to_max_queues_rejected to verify subchannel requests at the boundary are properly rejected
  • Adds defensive logging in restore path if saved state has more channels than adapter supports

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
vm/devices/net/netvsp/src/test.rs New test verifying that requesting num_sub_channels == max_queues is rejected with FAILURE status
vm/devices/net/netvsp/src/lib.rs Defensive check logging an error if restored channels exceed max_queues

@github-actions
Copy link

@github-actions
Copy link

@erfrimod erfrimod merged commit ebfa8b1 into microsoft:main Feb 26, 2026
80 of 82 checks passed
@erfrimod erfrimod deleted the erfrimod/subchannel-index-oob branch February 26, 2026 21:00
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.

4 participants