]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:40:30 +0000 (16:40 -0700)
commitca0dad4699175a914c3faef43964b0cf16f761a7
tree9277f018507fd19bc7a80fa28ac5a9b4451cd8f6
parent6d60f23b9959707f87145f6c20cb011e3d2509f1
ixgbe: Reorder search to work from the top down instead of bottom up

Orabug: 23177316

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>
(cherry picked from commit c2bc9ce91c31cc214667b9e1a150cd3000856c1c)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c