-
Notifications
You must be signed in to change notification settings - Fork 183
mana_driver: vf reconfiguration revokes vtl0 vf faster #3164
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,12 +63,26 @@ impl ResourceArena { | |
| } | ||
|
|
||
| pub(crate) async fn destroy<T: DeviceBacking>(mut self, gdma: &mut GdmaDriver<T>) { | ||
| let skip_hwc = gdma.get_vf_reconfiguration_pending(); | ||
| if skip_hwc { | ||
| tracing::info!( | ||
| count = self.resources.len(), | ||
|
erfrimod marked this conversation as resolved.
|
||
| "skipping HWC resource teardown during VF reconfiguration" | ||
| ); | ||
| } | ||
|
erfrimod marked this conversation as resolved.
|
||
| for resource in self.resources.drain(..).rev() { | ||
| let r = match resource { | ||
| Resource::MemoryBlock(mem) => { | ||
| drop(ManuallyDrop::into_inner(mem)); | ||
| Ok(()) | ||
| } | ||
| // During VF reconfiguration, skip sending teardown commands for HWC resources. | ||
| // HWC requests will fail and the device reclaims resources on its own reset. | ||
| Resource::DmaRegion { .. } | Resource::Eq { .. } | Resource::BnicQueue { .. } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My preference (slight) would be not check for all of these resources again and just do
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leaving in place, cause we still need to free MemoryBlock so we're stuck iterating over all resources. |
||
| if skip_hwc => | ||
| { | ||
| continue; | ||
| } | ||
| Resource::DmaRegion { | ||
| dev_id, | ||
| gdma_region, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.