]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Fix __FrontendUpdateHash
authorTu Dinh <ngoc-tu.dinh@vates.tech>
Mon, 25 Nov 2024 13:04:49 +0000 (13:04 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 2 Dec 2024 11:50:45 +0000 (11:50 +0000)
Fix an issue where __FrontendUpdateHash tries to
set controller hash algorithm to Toeplitz even if
its hash parameter was set to
XEN_NETIF_CTRL_HASH_ALGORITHM_NONE.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@vates.tech>
src/xenvif/frontend.c

index dab0ebbec0e4ee94697df7a85ac8a6217ebadb5e..79b04fb2b607fa5418e21582e37cdd8e1f8cf918 100644 (file)
@@ -1911,10 +1911,13 @@ __FrontendUpdateHash(
     }
 
     status = ControllerSetHashAlgorithm(Controller,
-                                        XEN_NETIF_CTRL_HASH_ALGORITHM_TOEPLITZ);
+                                        Hash->Algorithm);
     if (!NT_SUCCESS(status))
         goto fail1;
 
+    if (Hash->Algorithm == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE)
+        goto done;
+
     status = ControllerSetHashMappingSize(Controller, Size);
     if (!NT_SUCCESS(status))
         goto fail2;