• Wojciech Drewek's avatar
    ice: improve switchdev's slow-path · c1e5da5d
    Wojciech Drewek authored
    In current switchdev implementation, every VF PR is assigned to
    individual ring on switchdev ctrl VSI. For slow-path traffic, there
    is a mapping VF->ring done in software based on src_vsi value (by
    calling ice_eswitch_get_target_netdev function).
    
    With this change, HW solution is introduced which is more
    efficient. For each VF, src MAC (VF's MAC) filter will be created,
    which forwards packets to the corresponding switchdev ctrl VSI queue
    based on src MAC address.
    
    This filter has to be removed and then replayed in case of
    resetting one VF. Keep information about this rule in repr->mac_rule,
    thanks to that we know which rule has to be removed and replayed
    for a given VF.
    
    In case of CORE/GLOBAL all rules are removed
    automatically. We have to take care of readding them. This is done
    by ice_replay_vsi_adv_rule.
    
    When driver leaves switchdev mode, remove all advanced rules
    from switchdev ctrl VSI. This is done by ice_rem_adv_rule_for_vsi.
    
    Flag repr->rule_added is needed because in some cases reset
    might be triggered before VF sends request to add MAC.
    Co-developed-by: default avatarGrzegorz Nitka <grzegorz.nitka@intel.com>
    Signed-off-by: default avatarGrzegorz Nitka <grzegorz.nitka@intel.com>
    Signed-off-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
    Tested-by: default avatarSandeep Penigalapati <sandeep.penigalapati@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    c1e5da5d
ice_eswitch.c 16.7 KB