• Ido Schimmel's avatar
    mlxsw: spectrum_switchdev: Add support for locked FDB notifications · 5a660e43
    Ido Schimmel authored
    In Spectrum, learning happens in parallel to the security checks.
    Therefore, regardless of the result of the security checks, a learning
    notification will be generated by the device and polled later on by the
    driver.
    
    Currently, the driver reacts to learning notifications by programming
    corresponding FDB entries to the device. When a port is locked (i.e.,
    has security checks enabled), this can no longer happen, as otherwise
    any host will blindly gain authorization.
    
    Instead, notify the learned entry as a locked entry to the bridge driver
    that will in turn notify it to user space, in case MAB is enabled. User
    space can then decide to authorize the host by clearing the "locked"
    flag, which will cause the entry to be programmed to the device.
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    5a660e43
spectrum_switchdev.c 109 KB