]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Reorder search to work from the top down instead of bottom up
authorAlexander Duyck <aduyck@mirantis.com>
Tue, 3 Nov 2015 01:10:07 +0000 (17:10 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 12 Dec 2015 09:37:34 +0000 (01:37 -0800)
commitf7dc290c1290a03d2246129f8adc6ee088b26212
tree9e5e59f1278b799a70782248ce9872a9f4676c8f
parent8967bf5c931c3bcb82dd8de4fd8d5c3e7c532bb6
ixgbe: Reorder search to work from the top down instead of bottom up

This patch is meant to reduce the complexity of the search function used
for finding a VLVF entry associated with a given VLAN ID.  The previous
code was searching from bottom to top.  I reordered it to search from top
to bottom.  In addition I pulled an AND statement out of the loop and
instead replaced it with an OR statement outside the loop.  This should
help to reduce the overall size and complexity of the function.

There was also some formatting I cleaned up in regards to whitespace and
such.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c