]> 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)
commit574b913e2d53d2ebddcfab21423ebec37e704735
tree9e5e59f1278b799a70782248ce9872a9f4676c8f
parent77af48156d202f27fad1e6d15b3b2c9f165a1d55
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