Skip to content

Conversation

@erfrimod
Copy link
Contributor

Adding a test to validate that net_mana handles RX CQE errors. QueueStats rx_errors should be incremented. QueueStates rx_packets should not increase. net_mana already has a test to validate proper TX CQE error handline. Ex: test_lso_segment_coalescing_only_header()

Adding a test_hooks feature to GDMA to allow the new test to modify BNic emulator behavior to return CQE_RX_ERR_DISABLED_QUEUE.

@erfrimod erfrimod requested a review from a team as a code owner January 28, 2026 22:30
Copilot AI review requested due to automatic review settings January 28, 2026 22:30
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

Adds coverage to ensure net_mana treats RX completion errors as errors (increments rx_errors without incrementing rx_packets) by introducing a GDMA BNIC-emulator test hook to inject a specific RX CQE error type.

Changes:

  • Added a new net_mana async test validating RX CQE error handling behavior and resulting queue stats.
  • Introduced a test_hooks feature in gdma and enabled it for net_mana dev-dependencies.
  • Extended GDMA BNIC definitions/emulator to support and inject CQE_RX_ERR_DISABLED_QUEUE under the test_hooks feature.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
vm/devices/net/net_mana/src/test.rs Adds test_rx_error_handling to verify RX error CQE impacts on QueueStats.
vm/devices/net/net_mana/Cargo.toml Enables gdma test_hooks feature for tests.
vm/devices/net/gdma_defs/src/bnic.rs Adds the CQE_RX_ERR_DISABLED_QUEUE CQE type constant.
vm/devices/net/gdma/src/bnic.rs Injects an RX error CQE via a feature-gated test hook in the BNIC emulator.
vm/devices/net/gdma/Cargo.toml Defines the test_hooks crate feature (default off).

erfrimod and others added 3 commits January 28, 2026 15:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

1 participant