[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XENVIF PATCH] Skip hash update if frontend is not enabled



I don't think that any updated hash details will be resent if they are changed when Frontend->State != FRONTEND_ENABLED. FrontendEnable will call __FrontendUpdateHash before it sets Frontend->State to FRONTEND_ENABLED.

Controller->Connected is used to guard writing hash data to the backend, but returns STATUS_NOT_SUPPORTED in this case, and this means Frontend->Hash is not updated and the status is reported back to NDIS.

Owen

On Thu, Aug 28, 2025 at 11:01 PM Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx> wrote:
NDIS may set OID_GEN_RECEIVE_SCALE_PARAMETERS during an
IRP_MN_REMOVE_DEVICE, after the frontend has been torn down. This will
cause the ensuing control request to hang.

Skip __FrontendUpdateHash if the frontend is not enabled. The skip is
done here since we still need to update Frontend->Hash in case the
frontend is enabled again later.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 src/xenvif/frontend.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xenvif/frontend.c b/src/xenvif/frontend.c
index 90ec2b1..c497f24 100644
--- a/src/xenvif/frontend.c
+++ b/src/xenvif/frontend.c
@@ -1889,6 +1889,9 @@ __FrontendUpdateHash(
     ULONG                   Flags;
     NTSTATUS                status;

+    if (Frontend->State != FRONTEND_ENABLED)
+        goto done;
+
     Controller = __FrontendGetController(Frontend);

     switch (Hash->Algorithm) {
--
2.51.0.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.