net_mana: adding test of RX CQE error handling#2709
Open
erfrimod wants to merge 4 commits intomicrosoft:mainfrom
Open
net_mana: adding test of RX CQE error handling#2709erfrimod wants to merge 4 commits intomicrosoft:mainfrom
erfrimod wants to merge 4 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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_manaasync test validating RX CQE error handling behavior and resulting queue stats. - Introduced a
test_hooksfeature ingdmaand enabled it fornet_manadev-dependencies. - Extended GDMA BNIC definitions/emulator to support and inject
CQE_RX_ERR_DISABLED_QUEUEunder thetest_hooksfeature.
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). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a test to validate that net_mana handles RX CQE errors.
QueueStatsrx_errorsshould be incremented.QueueStatesrx_packetsshould 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_hooksfeature to GDMA to allow the new test to modify BNic emulator behavior to returnCQE_RX_ERR_DISABLED_QUEUE.