On Thu, Jul 23, 2026 at 12:18:22PM +0200, Paolo Abeni wrote: > On 7/11/26 6:10 AM, Dipayaan Roy wrote: > > When mana_attach() fails during ethtool ring size or channel count > > changes, the port is left in a broken state with no recovery > > mechanism, requiring manual intervention to bring the port back up. > > > > On VM SKUs without a netvsc fallback interface, this results in > > complete loss of network connectivity to the VM. > > > > Fix by scheduling queue_reset_work when mana_attach() fails. The > > preceding patch ensures mana_detach() always completes its full > > teardown (netif_device_detach + cleanup), so the reset handler's > > mana_detach() takes the "already detached" early return, preserving > > port_st_save for a successful mana_attach() recovery. > > > > When mana_attach() fails, choose retry values that maximize recovery > > chances: if the operation was an increase, fall back to the previous > > working values; if it was a decrease but still above default, fall > > back to defaults; otherwise use the minimum supported values. > > > > Reviewed-by: Haiyang Zhang <[email protected]> > > Tested-by: Aditya Garg <[email protected]> > > Signed-off-by: Dipayaan Roy <[email protected]> > sashiko gemini sees quite a bit of problem with the above approach: > > https://sashiko.dev/#/patchset/20260711041415.3008868-1-dipayanroy%40linux.microsoft.com > > Also, changing user-setting in case of fallback is quite a bad thing to > be avoided. > > Skimming over the code, it looks like than pre-allocate all the > resources and to a replace instead of detach/attach() looks feasible. I > suggest investigating such path. I also think that this last patch (and > possibly 2/4) could/should be in separate series. > > Finally and most relevant thing; AI review comments should be explicitly > acknowledged by either debating them or addressing them. In both cases a > reply on the ML is expected. > > /P
Hi Paolo, Thank you for the review. Accepting the feedback on 4/4 and working on the pre-allocate-and-replace approach you suggested. We are discussing with the HW/NIC team and investigating pre-allocating the queue resources from HW while a set already exists, as with this patch we are trying to handle and recover from failures caused due to HW/NIC resource exhaustion for queues. I will drop 4/4 from this series in v13 and stick to only the ethtool private flag changes. Will send out a separate series for the problem currently discussed in 4/4 once all the above points are concluded. For 2/4 I will send it as a fixes patch to net as it will be common for all functions calling mana_detach. Regards Dipayaan Roy

