summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2018-11-29 08:14:48 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-29 14:06:08 -0500
commitf28c020fb488e1a8b87469812017044bef88aa2b (patch)
treee6a41fc8606acda115f3ba838c6a488a5c9d3057 /net
parentd7f7e0018b96fd1a30a968faa9464eb57372c1ec (diff)
net: restore call to netdev_queue_numa_node_write when resetting XPS
Before commit 80d19669ecd3 ("net: Refactor XPS for CPUs and Rx queues"), netif_reset_xps_queues() did netdev_queue_numa_node_write() for all the queues being reset. Now, this is only done when the "active" variable in clean_xps_maps() is false, ie when on all the CPUs, there's no active XPS mapping left. Fixes: 80d19669ecd3 ("net: Refactor XPS for CPUs and Rx queues") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ddc551f24ba2..32a63f4c3a92 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2187,17 +2187,19 @@ static void clean_xps_maps(struct net_device *dev, const unsigned long *mask,
2187 active |= remove_xps_queue_cpu(dev, dev_maps, j, offset, 2187 active |= remove_xps_queue_cpu(dev, dev_maps, j, offset,
2188 count); 2188 count);
2189 if (!active) { 2189 if (!active) {
2190 if (is_rxqs_map) { 2190 if (is_rxqs_map)
2191 RCU_INIT_POINTER(dev->xps_rxqs_map, NULL); 2191 RCU_INIT_POINTER(dev->xps_rxqs_map, NULL);
2192 } else { 2192 else
2193 RCU_INIT_POINTER(dev->xps_cpus_map, NULL); 2193 RCU_INIT_POINTER(dev->xps_cpus_map, NULL);
2194 kfree_rcu(dev_maps, rcu);
2195 }
2194 2196
2195 for (i = offset + (count - 1); count--; i--) 2197 if (!is_rxqs_map) {
2196 netdev_queue_numa_node_write( 2198 for (i = offset + (count - 1); count--; i--) {
2197 netdev_get_tx_queue(dev, i), 2199 netdev_queue_numa_node_write(
2198 NUMA_NO_NODE); 2200 netdev_get_tx_queue(dev, i),
2201 NUMA_NO_NODE);
2199 } 2202 }
2200 kfree_rcu(dev_maps, rcu);
2201 } 2203 }
2202} 2204}
2203 2205