Thread (20 messages) flat view 20 messages, 3 authors, 2021-01-28

Re: [PATCH net-next 2/4] net: dsa: automatically bring user ports down when master goes down

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-01-28 00:51:11

On Thu, Jan 28, 2021 at 01:46:30AM +0100, Andrew Lunn wrote:
quoted
+	case NETDEV_GOING_DOWN: {
+		struct dsa_port *dp, *cpu_dp;
+		struct dsa_switch_tree *dst;
+		int err = 0;
+
+		if (!netdev_uses_dsa(dev))
+			return NOTIFY_DONE;
+
+		cpu_dp = dev->dsa_ptr;
+		dst = cpu_dp->ds->dst;
+
+		list_for_each_entry(dp, &dst->ports, list) {
+			if (!dsa_is_user_port(dp->ds, dp->index)) {
!dsa_is_user_port() ??

That ! seems odd.
Oops, that's something that I refactored at the last minute after I
prototyped the idea from:
			if (!dsa_is_user_port(dp->ds, dp->index))
				continue;
because it looked uglier that way.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help