Module Name: src
Committed By: jdolecek
Date: Tue May 5 09:33:39 UTC 2020
Modified Files:
src/doc: TODO.smpnet
Log Message:
write down some observations about the locking wild west around if_mcast_op()
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/doc/TODO.smpnet
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/doc/TODO.smpnet
diff -u src/doc/TODO.smpnet:1.34 src/doc/TODO.smpnet:1.35
--- src/doc/TODO.smpnet:1.34 Mon Jan 20 18:40:06 2020
+++ src/doc/TODO.smpnet Tue May 5 09:33:39 2020
@@ -1,4 +1,4 @@
-$NetBSD: TODO.smpnet,v 1.34 2020/01/20 18:40:06 thorpej Exp $
+$NetBSD: TODO.smpnet,v 1.35 2020/05/05 09:33:39 jdolecek Exp $
MP-safe components
==================
@@ -121,6 +121,17 @@ provide a deferred bpf_mtap mechanism th
context. It's a workaround and once the functions run in softint, we should use
the original bpf_mtap again.
+if_mcast_op() - SIOCADDMULTI/SIOCDELMULTI
+-----------------------------------------
+Helper function is called to add or remove multicast addresses for
+interface. When called via ioctl it takes IFNET_LOCK(), when called
+via sosetopt() it doesn't.
+
+Various network drivers can't assert IFNET_LOCKED() in their if_ioctl
+because of this. Generally drivers still take care to splnet() even
+with NET_MPSAFE before calling ether_ioctl(), but they do not take
+KERNEL_LOCK(), so this is actually unsafe.
+
Lingering obsolete variables
-----------------------------