From f5a1e85da7a6e7b17a1a3394a46d45b7a41d9d23 Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Mon, 7 Nov 2016 16:20:16 +0000 Subject: [PATCH] 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 --- src/xenvif/transmitter.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5