• J
    i40e: avoid looping to check whether we're in VLAN mode · cbebb85f
    Jacob Keller 提交于
    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: NJacob Keller <jacob.e.keller@intel.com>
    Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
    cbebb85f
i40e.h 28.7 KB