Blob Blame History Raw
From: Amritha Nambiar <amritha.nambiar@intel.com> 
Subject: net: Fix a bug in removing queues from XPS map
Patch-mainline: v4.17-rc7
Git-commit: 6358d49ac23995fdfe157cc8747ab0f274d3954b
References: git-fixes

While removing queues from the XPS map, the individual CPU ID
alone was used to index the CPUs map, this should be changed to also
factor in the traffic class mapping for the CPU-to-queue lookup.

Fixes: 184c449f91fe ("net: Add support for XPS with QoS via traffic classes")
Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Denis Kirjanov <dkirjanov@suse.com>
---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 15880ba084a9..f259eb1b21b8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2078,7 +2078,7 @@ static bool remove_xps_queue_cpu(struct net_device *dev,
 		int i, j;
 
 		for (i = count, j = offset; i--; j++) {
-			if (!remove_xps_queue(dev_maps, cpu, j))
+			if (!remove_xps_queue(dev_maps, tci, j))
 				break;
 		}
 
-- 
2.12.3