From: Paul Durrant Date: Mon, 7 Nov 2016 16:20:16 +0000 (+0000) Subject: Avoid calculating a hash if it is not necessary X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f5a1e85da7a6e7b17a1a3394a46d45b7a41d9d23;p=people%2Fpauldu%2Fxenvif.git Avoid calculating a hash if it is not necessary 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 --- diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c index 175ea03..90b4008 100644 --- a/src/xenvif/transmitter.c +++ b/src/xenvif/transmitter.c @@ -5081,6 +5081,9 @@ __TransmitterHashPacket( Value = 0; + if (FrontendGetNumQueues(Frontend) == 1) + goto done; + if (IpHeader->Version == 4) { PIPV4_HEADER Version4 = &IpHeader->Version4;