-
Notifications
You must be signed in to change notification settings - Fork 162
netvsp: tracing improvements for error triage #2625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 enhances observability and tracing in the NetVSP device by adding structured tracing spans around VF Manager control-path operations and improving error logging consistency.
Key changes:
- Adds tracing spans to VF Manager operations (VTL2 device startup/shutdown, VTL0 VF arrival/removal/revoke, endpoint disconnects, bind-state updates) to help identify which async operations are blocking or taking too long
- Standardizes error field naming from
errtoerrorand positions error fields first in trace logs for consistency - Adds
instance_idand/orchannel_idxcontext to device and channel error logs for better diagnostics - Refactors nested conditionals to match expressions for improved readability
- Fixes minor typos in comments
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| vm/devices/net/netvsp/src/lib.rs | Standardizes error logging (err→error), adds instance_id/channel_idx context to device errors, refactors state transition logic, removes redundant imports, fixes typos |
| vm/devices/net/net_mana/src/lib.rs | Fixes comment typos (Hardware→hardware, Encapsulation→encapsulation, affects grammar) |
| support/tracelimit/src/lib.rs | Fixes typo in documentation example (custome→custom) |
| openhcl/underhill_core/src/emuplat/netvsp.rs | Adds Display impl for Vtl0Bus, adds tracing spans to VF Manager operations, extracts update_vtl2_device_bind_state helper method, adds save_state tracing |
chris-oo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but see comment if that's useful or not.
| PrimaryChannelGuestVfState::DataPathSynthetic | ||
| } else { | ||
|
|
||
| match (to_guest, result) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to log the actual matrix of errors here or is it not useful?
Adding tracing spans to control-path operations in VF Manager to try and help answer two questions:
try_notify_guest_and_revoke_vtl0_vf(),shutdown_vtl2_device(), orupdate_vtl2_device_bind_state()and tracing spans will provide entry and exit opcodes.instance_idand/orchannel_idxto queue/channel errors: open/close/restore.err=>errorand making that field the first element.