• Vladimir Oltean's avatar
    net: dsa: warn if port lists aren't empty in dsa_port_teardown · 0832cd9f
    Vladimir Oltean authored
    There has been recent work towards matching each switchdev object
    addition with a corresponding deletion.
    
    Therefore, having elements in the fdbs, mdbs, vlans lists at the time of
    a shared (DSA, CPU) port's teardown is indicative of a bug somewhere
    else, and not something that is to be expected.
    
    We shouldn't try to silently paper over that. Instead, print a warning
    and a stack trace.
    
    This change is a prerequisite for moving the initialization/teardown of
    these lists. Make it clear that clearing the lists isn't needed.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0832cd9f
dsa2.c 40.3 KB