File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,29 @@ there are two sets of interfaces: ``dev_xxx`` and ``netif_xxx`` (e.g.,
343
343
acquiring the instance lock themselves, while the ``netif_xxx `` functions
344
344
assume that the driver has already acquired the instance lock.
345
345
346
+ Notifiers and netdev instance lock
347
+ ==================================
348
+
349
+ For device drivers that implement shaping or queue management APIs,
350
+ some of the notifiers (``enum netdev_cmd ``) are running under the netdev
351
+ instance lock.
352
+
353
+ For devices with locked ops, currently only the following notifiers are
354
+ running under the lock:
355
+ * ``NETDEV_REGISTER ``
356
+ * ``NETDEV_UP ``
357
+
358
+ The following notifiers are running without the lock:
359
+ * ``NETDEV_UNREGISTER ``
360
+
361
+ There are no clear expectations for the remaining notifiers. Notifiers not on
362
+ the list may run with or without the instance lock, potentially even invoking
363
+ the same notifier type with and without the lock from different code paths.
364
+ The goal is to eventually ensure that all (or most, with a few documented
365
+ exceptions) notifiers run under the instance lock. Please extend this
366
+ documentation whenever you make explicit assumption about lock being held
367
+ from a notifier.
368
+
346
369
NETDEV_INTERNAL symbol namespace
347
370
================================
348
371
You can’t perform that action at this time.
0 commit comments