]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: avoid looping to check whether we're in VLAN mode
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 5 Oct 2016 16:30:40 +0000 (09:30 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:40:47 +0000 (19:40 -0500)
commit09cdcef849e376ca8307dd4fb596048c2ae9aa8e
tree011adbb490e4ffe18151f0c3191cb55cdc033c6e
parent202b63b6b52563a980a0014cf424ee36945591cc
i40e: avoid looping to check whether we're in VLAN mode

Orabug: 24568124

We determine that a VSI is in vlan_mode whenever it has any filters
with a VLAN other than -1 (I40E_VLAN_ALL). The previous method of doing
so was to perform a loop whenever we needed the check. However, we can
notice that only place where filters are added (i40e_add_filter) can
change the condition from false to true, and the only place we can
return to false is in i40e_vsi_sync_filters_subtask. Thus, we can remove
the loop and use a boolean directly.

Doing this avoids looping over filters repeatedly especially while we're
already inside a loop over all the filters. This should reduce the
latency of filter operations throughout the driver.

Change-ID: Iafde08df588da2a2ea666997d05e11fad8edc338
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit cbebb85f306f6023ebaa26ca66380571b4b680bf)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c