• Ido Schimmel's avatar
    mlxsw: spectrum: Do not process learned records with a dummy FID · 577fa14d
    Ido Schimmel authored
    The switch periodically sends notifications about learned FDB entries.
    Among other things, the notification includes the FID (Filtering
    Identifier) and the port on which the MAC was learned.
    
    In case the driver does not have the FID defined on the relevant port,
    the following error will be periodically generated:
    
    mlxsw_spectrum2 0000:06:00.0 swp32: Failed to find a matching {Port, VID} following FDB notification
    
    This is not supposed to happen under normal conditions, but can happen
    if an ingress tc filter with a redirect action is installed on a bridged
    port. The redirect action will cause the packet's FID to be changed to
    the dummy FID and a learning notification will be emitted with this FID
    - which is not defined on the bridged port.
    
    Fix this by having the driver ignore learning notifications generated
    with the dummy FID and delete them from the device.
    
    Another option is to chain an ignore action after the redirect action
    which will cause the device to disable learning, but this means that we
    need to consume another action whenever a redirect action is used. In
    addition, the scenario described above is merely a corner case.
    
    Fixes: cedbb8b2 ("mlxsw: spectrum_flower: Set dummy FID before forward action")
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Reported-by: default avatarAlex Kushnarov <alexanderk@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Tested-by: default avatarAlex Kushnarov <alexanderk@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    577fa14d
spectrum.h 33.4 KB