Skip to content

Commit b4b8a71

Browse files
qsngregkh
authored andcommitted
net: restore call to netdev_queue_numa_node_write when resetting XPS
[ Upstream commit f28c020 ] Before commit 80d1966 ("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: 80d1966 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a275c66 commit b4b8a71

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎net/core/dev.c‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,17 +2173,19 @@ static void clean_xps_maps(struct net_device *dev, const unsigned long *mask,
21732173
active |= remove_xps_queue_cpu(dev, dev_maps, j, offset,
21742174
count);
21752175
if (!active) {
2176-
if (is_rxqs_map) {
2176+
if (is_rxqs_map)
21772177
RCU_INIT_POINTER(dev->xps_rxqs_map, NULL);
2178-
} else {
2178+
else
21792179
RCU_INIT_POINTER(dev->xps_cpus_map, NULL);
2180+
kfree_rcu(dev_maps, rcu);
2181+
}
21802182

2181-
for (i = offset + (count - 1); count--; i--)
2182-
netdev_queue_numa_node_write(
2183-
netdev_get_tx_queue(dev, i),
2184-
NUMA_NO_NODE);
2183+
if (!is_rxqs_map) {
2184+
for (i = offset + (count - 1); count--; i--) {
2185+
netdev_queue_numa_node_write(
2186+
netdev_get_tx_queue(dev, i),
2187+
NUMA_NO_NODE);
21852188
}
2186-
kfree_rcu(dev_maps, rcu);
21872189
}
21882190
}
21892191

0 commit comments

Comments
 (0)