]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Disallow RSS configuration if there is only a single vCPU
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 7 Nov 2016 16:15:24 +0000 (16:15 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 7 Nov 2016 16:15:24 +0000 (16:15 +0000)
It's not going to be useful and having RSS enabled in a single vCPU
VM seems to confuse a Windows Domain Controller installed in that VM.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenvif/frontend.c

index b510cc136af605b70976feb706fb37dda0d51cb2..463d1636e3a7f3761ddae7f087e6c30003ec9a67 100644 (file)
@@ -1937,7 +1937,11 @@ FrontendSetHashAlgorithm(
         break;
 
     case XENVIF_PACKET_HASH_ALGORITHM_TOEPLITZ:
-        status = (Frontend->DisableToeplitz != 0) ?
+        // Don't allow toeplitz hashing to be configured for a single
+        // queue, or if it has been explicitly disabled
+        ASSERT(__FrontendGetNumQueues(Frontend) != 0);
+        status = (__FrontendGetNumQueues(Frontend) == 1 ||
+                  Frontend->DisableToeplitz != 0) ?
                  STATUS_NOT_SUPPORTED :
                  STATUS_SUCCESS;
         break;