Re: [PATCH net v2] gve: mark the flow rule cache out of sync when a rule update fails
From: Paolo Abeni
Date: Tue Nov 24 2026 - 05:25:08 EST
On 11/19/26 05:45, Zhao Li wrote:
gve_adminq_configure_flow_rule() marks the flow rule cache out of syncThis is not 'net' material, applying to 'net-next'...
only when the device accepts the command, although a failed add,
delete or reset can leave the device state unknown.
gve_reset() sends the flow rule reset command from
gve_teardown_control_plane_resources() and then frees and reallocates
the cache buffers. If that command fails, the cache keeps its nonzero
rule count and stays marked in sync, but its entries are now zeroed.
gve_get_flow_rule_entry() then finds location 0 inside the cached range,
since every zeroed entry has location 0, and reports an all-zero
TCP/IPv4 rule that steers to queue 0, whatever the device holds at that
location. Queries for other locations fall outside the cached range and
read the rules from the device again.
Mark the cache out of sync whenever a flow rule command is attempted,
so that the next query reads the rules from the device.
Found by an AI code review agent; not triggered. Compile-tested with W=1.
Fixes: 57718b60df9b ("gve: Add flow steering adminq commands")
Suggested-by: Harshitha Ramamurthy <hramamurthy@xxxxxxxxxx>
/P