-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gve-alloc-before-freeing-when-changing-config'
Shailend Chand says: ==================== gve: Alloc before freeing when changing config Functions allocating resources did so directly into priv thus far. The assumption doing that was that priv was not already holding references to live resources. When ring configuration is changed in any way from userspace, thus far we relied on calling the ndo_stop and ndo_open callbacks in succession. This meant that we teardown existing resources and rob the OS of networking before we have successfully allocated resources for the new config. Correcting this requires us to perform allocations without editing priv. That is what the "gve: Switch to config-aware..." patch does: it modifies all the allocation paths so that they take a new configuration as input and return references to newly allocated resources without modifying priv or interfering with live resources in any way. Having corrected the allocation paths so, the ndo open and close callbacks are refactored to make available distinct functions for allocating queue resources and starting or stopping them. This is then put to use in the set_channels and set_features hooks in the last two patches. These changes have been tested by verifying the integrity of a stream of integers while the driver is continuously reconfigured with ethtool. ==================== Link: https://lore.kernel.org/r/20240122182632.1102721-1-shailend@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
- Loading branch information
Showing
9 changed files
with
999 additions
and
496 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.