Thread (17 messages) 17 messages, 2 authors, 2021-12-09

[RFC PATCH net-next 1/7] net: dsa: only bring down user ports assigned to a given DSA master

flat view
STALE1764d

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2021-12-08 22:32:50
Subsystem: networking [dsa], networking [general], the rest · Maintainers: Andrew Lunn, Vladimir Oltean, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Revision rfc of 2 in this series.

Revisions (2)
  1. rfc current
  2. v2 [diff vs current]
This is an adaptation of commit c0a8a9c27493 ("net: dsa: automatically
bring user ports down when master goes down") for multiple DSA masters.
When a DSA master goes down, only the user ports under its control
should go down too, the others can still send/receive traffic.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/slave.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 2b153b366118..f76c96e27868 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -2364,6 +2364,9 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
 			if (!dsa_port_is_user(dp))
 				continue;
 
+			if (dp->cpu_dp != cpu_dp)
+				continue;
+
 			list_add(&dp->slave->close_list, &close_list);
 		}
 
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help