summaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorAlexander Duyck2013-01-10 09:57:35 +0100
committerDavid S. Miller2013-01-11 07:47:04 +0100
commit01c5f864e62b1c1ee72fb492c6c5e47a162a507b (patch)
tree9608d6d4ac7be1b868fa65dd139e8b12c074b9d2 /net/core/net-sysfs.c
parentnet: Rewrite netif_reset_xps_queue to allow for better code reuse (diff)
downloadkernel-qcow2-linux-01c5f864e62b1c1ee72fb492c6c5e47a162a507b.tar.gz
kernel-qcow2-linux-01c5f864e62b1c1ee72fb492c6c5e47a162a507b.tar.xz
kernel-qcow2-linux-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/core/net-sysfs.c')
0 files changed, 0 insertions, 0 deletions