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)
commitc2bc9ce91c31cc214667b9e1a150cd3000856c1c
tree9e5e59f1278b799a70782248ce9872a9f4676c8f
parentb6488b662b5011a3640033a266886603892dfed1
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