]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: warn if port lists aren't empty in dsa_port_teardown
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 8 Mar 2022 09:15:10 +0000 (11:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2022 11:12:09 +0000 (11:12 +0000)
commit696b7cd7a9a6c45c210a9bd4cb497aaff06bcf48
tree0eae4bf23e6c42e102004865a07f3982b8b2ae07
parent9a038502559f0b855ce5d7eb6113c2552335ac71
net: dsa: warn if port lists aren't empty in dsa_port_teardown

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: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c