• Wojciech Drewek's avatar
    ice: Switchdev FDB events support · 7c945a1a
    Wojciech Drewek authored
    Listen for SWITCHDEV_FDB_{ADD|DEL}_TO_DEVICE events while in switchdev
    mode. Accept these events on both uplink and VF PR ports. Add HW
    rules in newly created workqueue. FDB entries are stored in rhashtable
    for lookup when removing the entry and in the list for cleanup
    purpose. Direction of the HW rule depends on the type of the ports
    on which the FDB event was received:
    
    ICE_ESWITCH_BR_UPLINK_PORT:
    TX rule that forwards the packet to the LAN (egress).
    
    ICE_ESWITCH_BR_VF_REPR_PORT:
    RX rule that forwards the packet to the VF associated
    with the port representor.
    
    In both cases the rule matches on the dst mac address.
    All the FDB entries are stored in the bridge structure.
    When the port is removed all the FDB entries associated with
    this port are removed as well. This is achieved thanks to the reference
    to the port that FDB entry holds.
    
    In the fwd rule we use only one lookup type (MAC address)
    but lkups_cnt variable is already introduced because
    we will have more lookups in the subsequent patches.
    Signed-off-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
    Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    7c945a1a
ice_eswitch_br.c 18.9 KB