diff options
| author | Joshua Washington <joshwash@google.com> | 2026-09-30 19:04:22 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-05 16:30:04 -0700 |
| commit | 23b3b49d204b2c7f6e4a212eacf8ef2af2206919 (patch) | |
| tree | d47b6ac613a6a3da494d0ad9be8b54dd069a42c0 /tools/lib/python/kdoc/python_version.py | |
| parent | fd1e72e0966171d63e2604d5a42305f410d5825d (diff) | |
gve: simplify reset logic
Current GVE reset logic is quite complex, with a number of methods with
similar names and functionalities. This complexity has allowed a number
of bugs to enter the reset/recovery path, including the potential for
reset loops if an operation fails during teardown.
Simplify the reset path by doing the following:
1) Removing recursive resets. Recursive resets have two major issues.
First, there is the potential for stack overflows if resets are
invoked too many times in a row. Second, long recursive calls mean
that GVE never gives up the RTNL lock, or at the very least holds it
for too long. Resets triggered by methods as part of the reset path
are implicitly ignored because gve_reset() now checks if there is a
reset in progress before proceeding.
2) Removing resets during the teardown portion of reset. This is partly
covered by removing recursive resets, but the primary goal in this
case is to allow the driver to complete teardown in a more direct
manner. Before this patch, gve_close() when called as part of
gve_shutdown, could end up triggering a hardware reset, then attempt
to close again. In such a case, destroying hardware queues would
inevitably fail, causing a loop. gve_close() is no longer called
directly in gve_reset() breaking any possibility of this loop.
3) Decompose allocation/de-allocation and setup/teardown. Performing
allocation and setup for each control plane system (RSS, ptype map,
etc) leaves many more error conditions to handle, causing teardown in
the case of failures to be much more complex than they need to be.
This will also be useful to better align a major behavioral change
in mailbox mode, which will use separate response buffers instead to
get data from the device instead of a pre-allocated shared memory
region.
With the new reset functionality, shared resources between the device
and driver are not freed until after the hardware reset has completed
in the event that deconfigure_device_resources() fails, meaning that the
device could potentially still be holding on to shared memory.
Reviewed-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Jordan Rhee <jordanrhee@google.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260930190428.1130007-7-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
