]> xenbits.xensource.com Git - pvdrivers/win/xenvif.git/commitdiff
Avoid calculating a hash if it is not necessary
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 7 Nov 2016 16:20:16 +0000 (16:20 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 7 Nov 2016 16:20:16 +0000 (16:20 +0000)
If there is only a single queue then we do not need to calculate a hash.
There is only one choice in how to steer the packet!

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

index 175ea03d61186e41bc03f984e8a3db20d053a6e9..90b4008e0fcb4b84f29f8a95125e0cd1a9b7fea3 100644 (file)
@@ -5081,6 +5081,9 @@ __TransmitterHashPacket(
 
     Value = 0;
 
+    if (FrontendGetNumQueues(Frontend) == 1)
+        goto done;
+
     if (IpHeader->Version == 4) {
         PIPV4_HEADER    Version4 = &IpHeader->Version4;