From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5FA73BB678 for ; Thu, 23 Jul 2026 10:18:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784801912; cv=none; b=GF+TzmkoyTPS5oXRNQFd/5/1m4O+ojQZh63XjvqmsHhHQ822cQxP2YVCxBBIaX9j1ltEx/LGzneGnJvjvTz7KVL21m3aR8dplNhImZWHRM7VcraJ3ZPvoeJUOcdBfujkPLisLlL900oO2vo3XmviUSxFOJ/UeFa7IgPEz11CvrU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784801912; c=relaxed/simple; bh=zkE1CxynhhuX45SZ6JJT+YmMZiFe1viNbE9YBLAS9Uk=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=PUCIMPlgUUIi48fvI7zfjA2LUqz1A4WRhPMIm2RLCbjCoSLYfFNlew6Y9UF2B5TjMeSkWDOKb3gWLuYp0Ie7Zk60h3sollVGDI7oQrH+iJZ6q0WNyLe0dnPAMBV4Jkr0JLmXUZcDct0tPVtNbOxrn7UsxYvrvEKyXqlG653wXWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HMZAQlTX; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Nyv8cTFq; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HMZAQlTX"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Nyv8cTFq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784801909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c9dgMMoQ1YTrpRt1/B5y0R7DlFAMJKah05nee02sPkU=; b=HMZAQlTXNPMLm+CmeHr7RPIFVXD9t7jlR5LhHOyHItHn8hqXGoFidBbz9Ol2ZhgcsoIDF7 yWJvQus+1RcUAk6AIvxeLs/TNRiWPOkJK0LxgDrsqHzL0C7pKj8d31VJkUPosebOjFVs4S BFQU2b54ZFE8GiT4QcracXL3hsa3Usc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-Vi-hn8bkPeefPoFOKRu7Rg-1; Thu, 23 Jul 2026 06:18:28 -0400 X-MC-Unique: Vi-hn8bkPeefPoFOKRu7Rg-1 X-Mimecast-MFC-AGG-ID: Vi-hn8bkPeefPoFOKRu7Rg_1784801907 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-49544a639e9so2304565e9.1 for ; Thu, 23 Jul 2026 03:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1784801907; x=1785406707; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to:content-type; bh=c9dgMMoQ1YTrpRt1/B5y0R7DlFAMJKah05nee02sPkU=; b=Nyv8cTFq6wSkw9CFQGc+//PSIWnzoPn5H/e48wHEr3Pee2m2t8sfuEdKXoNR1f2HOG OYUzltGeNuGWsGLWewvuSYuRcH5RAkOvCn7Q4Ea/g/H8/Ge0SB1O+I31RfgT4KaYb3qb 7A6cFWMJTiPiFF1vQDKuJ6kI7rVfIAB/kvfrou+vhW5OjQy3O8U9rr4BDr2bKvJjSwKr E238Co3rmqPohu54YH4nnW2gzQR5lDY3ysz5wmPFTVQPjhYIYgRZbN8gPJaJe27WzTKC I3N/TiNtHxa4yVzvhpHCoobLTVxNFkv1v56C671Ki/IxWFQWnHspCBM0hh9zY/mX78gH ficA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784801907; x=1785406707; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=c9dgMMoQ1YTrpRt1/B5y0R7DlFAMJKah05nee02sPkU=; b=RUjXx9XcXf5pLzPRPyNDEc/CfjJlTeVokREcSkNcNV6YyV7J4jb/MFa6EzB5XJVG1U rtpxiuMtChQjmChy5CPjaH36H0wdsGuXUjkbT/3ZFFs8DuBdEe89PnfMrDxbO5Xf1JOn qPCFnKQHoAuMQKwe6VKQcU4Vw8q7onMkBgYtTWPkKoWox20zPUnz47v6WPFJOe8PrCtl 8JYBbRk3Q2wXfmsCTP1gwyC1ca3YobF5ExzeJorE8QbMWHnwc2Rlhxk/bAbFZQU6XcwF l2ATr+sC7L6YeTKjzgImWdkuXddxQsoZo1RCCmYm24dl72Vtra1qAR48RX+iHkcNO/TC BXOw== X-Forwarded-Encrypted: i=1; AHgh+RrvlFgY8xl7JtwtmtXVNWYbyxpbvNtFRMVoU/4vfeo0PEUAQmKczW+m2QGSSzcfwvuKRHFyknl5uympfdw=@vger.kernel.org X-Gm-Message-State: AOJu0Yzvoh1aqNnnU35dLzGUsLGDaUCDF03v4qpPGHN8+W5SpLXDENmG YysvtunHgoH8RVdmGLwndLuvCuXEfm3oZWNFKgwum5eHoTMCNIFFOPd3gRYdBrfeXVFsc2wSsyn WgAMgwgoRUK+h/ZJwT0+9VHWdKkEvrzYz9d1bMoM5HW3Cjf3Lo0e/xcMOA3yAZMpm5Q== X-Gm-Gg: AR+sD12x8Cmo7SQUTZ2uxhm6DeLvz8FJ47zR7SftxDAD5LHmV2Ug8esYLYoy+NB9V01 q4P3zRcUiTuPdMBFPoA/dc5v9Y9+h/rVtt2xSGHMwu8SLEq1yfQUapI1Ou3V2QF2Bcs42Zbg5hk AyaQF0nyH3ubpB0kC32GibPhYh2bb30dxdQuHSCII5BXfONUsC/O/8glos4+Tji45ipOjIEvcvA 6RppU48u5zViArFNPo74Pqv3vBxGCPCY36R77qg4VPi6U5Er358UDb5jT/V46bNB2Um3uWOSEnc 9XbAGuoXHpAiJbT9+disEtEswEYFj0N0twldMWDN1AuRpIEEVwaKiuPaneoM86Hc908Cth1HggJ co58/ArVYskTdUDPFarB0WcDPp92Jd/7fb/poLEgeoOjfGCgfC/RyomEX8gbdWeigh+HryNY1K/ lGag== X-Received: by 2002:a05:600c:4ecd:b0:493:c77c:108a with SMTP id 5b1f17b1804b1-49573d218camr25163705e9.36.1784801907420; Thu, 23 Jul 2026 03:18:27 -0700 (PDT) X-Received: by 2002:a05:600c:4ecd:b0:493:c77c:108a with SMTP id 5b1f17b1804b1-49573d218camr25163275e9.36.1784801906974; Thu, 23 Jul 2026 03:18:26 -0700 (PDT) Received: from ?IPV6:2a0d:3344:5521:6b10:58fd:68f:7756:389d? ([2a0d:3344:5521:6b10:58fd:68f:7756:389d]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4956a6354a3sm218761215e9.10.2026.07.23.03.18.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jul 2026 03:18:26 -0700 (PDT) Message-ID: Date: Thu, 23 Jul 2026 12:18:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v12 4/4] net: mana: recover port on attach failure in ethtool operations To: Dipayaan Roy , kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, leon@kernel.org, longli@microsoft.com, kotaranov@microsoft.com, horms@kernel.org, shradhagupta@linux.microsoft.com, ssengar@linux.microsoft.com, ernis@linux.microsoft.com, shirazsaleem@microsoft.com, linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, stephen@networkplumber.org, jacob.e.keller@intel.com, dipayanroy@microsoft.com, leitao@debian.org, kees@kernel.org, john.fastabend@gmail.com, hawk@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, ast@kernel.org, sdf@fomichev.me, yury.norov@gmail.com, pavan.chebbi@broadcom.com, schakrabarti@linux.microsoft.com, gargaditya@linux.microsoft.com References: <20260711041415.3008868-1-dipayanroy@linux.microsoft.com> <20260711041415.3008868-5-dipayanroy@linux.microsoft.com> From: Paolo Abeni Content-Language: en-US In-Reply-To: <20260711041415.3008868-5-dipayanroy@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 > Tested-by: Aditya Garg > Signed-off-by: Dipayaan Roy 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