Thread (8 messages) 8 messages, 3 authors, 2024-01-26

Re: [PATCH net-next 3/5] net: switchdev: Relay all replay messages through a central function

From: Simon Horman <horms@kernel.org>
Date: 2024-01-24 10:14:08
Also in: bridge, netdev

On Tue, Jan 23, 2024 at 04:37:05PM +0100, Tobias Waldekranz wrote:

...
quoted hunk ↗ jump to hunk
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 5b045284849e..05f22f971312 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -307,6 +307,23 @@ int switchdev_port_obj_del(struct net_device *dev,
 }
 EXPORT_SYMBOL_GPL(switchdev_port_obj_del);
 
+/**
+ *	switchdev_replay - Replay switchdev message to driver
nit: switchdev_call_replay
+ *	@nb: notifier block to send the message to
+ *	@val: value passed unmodified to notifier function
nit: this should document @type rather than @value
+ *	@info: notifier information data
+ *
+ *	Typically issued by the bridge, as a response to a replay
+ *	request initiated by a port that is either attaching to, or
+ *	detaching from, that bridge.
+ */
+int switchdev_call_replay(struct notifier_block *nb, unsigned long type,
+			  struct switchdev_notifier_info *info)
+{
+	return nb->notifier_call(nb, type, info);
+}
+EXPORT_SYMBOL_GPL(switchdev_call_replay);
+
 static ATOMIC_NOTIFIER_HEAD(switchdev_notif_chain);
 static BLOCKING_NOTIFIER_HEAD(switchdev_blocking_notif_chain);
 
-- 
2.34.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