diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2013-01-10 08:57:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-10 22:47:04 -0800 |
commit | 01c5f864e62b1c1ee72fb492c6c5e47a162a507b (patch) | |
tree | 9608d6d4ac7be1b868fa65dd139e8b12c074b9d2 /net/Kconfig | |
parent | 10cdc3f3cd541bfeaaf1c6e1710b1500ca19aa7f (diff) | |
download | lwn-01c5f864e62b1c1ee72fb492c6c5e47a162a507b.tar.gz lwn-01c5f864e62b1c1ee72fb492c6c5e47a162a507b.zip |
net: Rewrite netif_set_xps_queues to address several issues
This change is meant to address several issues I found within the
netif_set_xps_queues function.
If the allocation of one of the maps to be assigned to new_dev_maps failed
we could end up with the device map in an inconsistent state since we had
already worked through a number of CPUs and removed or added the queue. To
address that I split the process into several steps. The first of which is
just the allocation of updated maps for CPUs that will need larger maps to
store the queue. By doing this we can fail gracefully without actually
altering the contents of the current device map.
The second issue I found was the fact that we were always allocating a new
device map even if we were not adding any queues. I have updated the code
so that we only allocate a new device map if we are adding queues,
otherwise if we are not adding any queues to CPUs we just skip to the
removal process.
The last change I made was to reuse the code from remove_xps_queue to remove
the queue from the CPU. By making this change we can be consistent in how
we go about adding and removing the queues from the CPUs.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/Kconfig')
0 files changed, 0 insertions, 0 deletions