Thread (18 messages) 18 messages, 2 authors, 2021-06-29

Re: [PATCH v4 net-next 01/14] net: bridge: switchdev: send FDB notifications for host addresses

From: Nikolay Aleksandrov <hidden>
Date: 2021-06-29 11:51:26

On 29/06/2021 14:35, Vladimir Oltean wrote:
On Tue, Jun 29, 2021 at 01:40:20PM +0300, Nikolay Aleksandrov wrote:
quoted
quoted
@@ -117,18 +118,16 @@ br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
 		.is_local = test_bit(BR_FDB_LOCAL, &fdb->flags),
 		.offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
 	};
-
-	if (!fdb->dst)
-		return;
+	struct net_device *dev = fdb->dst ? fdb->dst->dev : br->dev;
you should use READ_ONCE() for fdb->dst here to make sure it's read only once,
to be fair the old code had the same issue :)
Thanks for the comment. I still have budget for one patch until I hit
the 15 limit, so I guess I'll do that separately before this one.
Just trying to make sure I get it right. You want me to annotate
fdb_create(), br_fdb_update(), fdb_add_entry() and
br_fdb_external_learn_add() with WRITE_ONCE() too, right?
Can I resend right away or did you notice other issues in the other
patches?
That would be best, yes. The rest of the changes look good to me.

Thanks,
 Nik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help