• Vladimir Oltean's avatar
    net: dsa: flush the dynamic FDB of the software bridge when fast ageing a port · 9264e4ad
    Vladimir Oltean authored
    Currently, when DSA performs fast ageing on a port, 'bridge fdb' shows
    us that the 'self' entries (corresponding to the hardware bridge, as
    printed by dsa_slave_fdb_dump) are deleted, but the 'master' entries
    (corresponding to the software bridge) aren't.
    
    Indeed, searching through the bridge driver, neither the
    brport_attr_learning handler nor the IFLA_BRPORT_LEARNING handler call
    br_fdb_delete_by_port. However, br_stp_disable_port does, which is one
    of the paths which DSA uses to trigger a fast ageing process anyway.
    
    There is, however, one other very promising caller of
    br_fdb_delete_by_port, and that is the bridge driver's handler of the
    SWITCHDEV_FDB_FLUSH_TO_BRIDGE atomic notifier. Currently the s390/qeth
    HiperSockets card driver is the only user of this.
    
    I can't say I understand that driver's architecture or interaction with
    the bridge, but it appears to not be a switchdev driver in the traditional
    sense of the word. Nonetheless, the mechanism it provides is a useful
    way for DSA to express the fact that it performs fast ageing too, in a
    way that does not change the existing behavior for other drivers.
    
    Cc: Alexandra Winter <wintera@linux.ibm.com>
    Cc: Julian Wiedmann <jwi@linux.ibm.com>
    Cc: Roopa Prabhu <roopa@nvidia.com>
    Cc: Nikolay Aleksandrov <nikolay@nvidia.com>
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9264e4ad
port.c 31.4 KB