• Jacob Keller's avatar
    i40e: allow i40e_update_filter_state to skip broadcast filters · d88d40b0
    Jacob Keller authored
    Fix a bug where we modified the mac_filter_hash while outside a lock,
    when handling addition of broadcast filters.
    
    Normally, we add filters to firmware by batching the additions into
    lists and issuing 1 update for every few filters. Broadcast filters are
    handled differently, by instead setting the broadcast promiscuous mode
    flags. In order to make sure the 1<->1 mapping of filters in our
    addition array lined up with filters in the hlist tmp_add_list, we had
    to remove the filter and move it back to the main hash. However, we
    didn't do this under lock, which could cause consistency problems for
    the list.
    
    Fix this by updating i40e_update_filter_state logic so that it knows to
    avoid broadcast filters. This ensures that we don't have to remove the
    filter separately, and can put it back using the normal flow.
    
    Change-ID: Id288fade80b3e3a9a54b68cc249188cb95147518
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    d88d40b0
i40e_main.c 326 KB