Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net update gif(4) locking notes.
details: https://anonhg.NetBSD.org/src/rev/59c94fb19b28
branches: trunk
changeset: 357779:59c94fb19b28
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Nov 27 05:03:11 2017 +0000
description:
update gif(4) locking notes.
diffstat:
sys/net/if_gif.h | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (30 lines):
diff -r 420ff1ab6e22 -r 59c94fb19b28 sys/net/if_gif.h
--- a/sys/net/if_gif.h Mon Nov 27 05:02:22 2017 +0000
+++ b/sys/net/if_gif.h Mon Nov 27 05:03:11 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.h,v 1.28 2017/11/27 05:02:22 knakahara Exp $ */
+/* $NetBSD: if_gif.h,v 1.29 2017/11/27 05:03:11 knakahara Exp $ */
/* $KAME: if_gif.h,v 1.23 2001/07/27 09:21:42 itojun Exp $ */
/*
@@ -140,14 +140,15 @@
* + gif_softc_list is protected by gif_softcs.lock (an adaptive mutex)
* gif_softc_list is list of all gif_softcs. It is used by ioctl
* context only.
- * + Members of struct gif_softc except for gif_ro_percpu are protected by
- * - encap_lock for writer
- * - stopping processing when writer begin to run
- * for reader(Tx and Rx processing)
+ * + gif_softc->gif_var is protected by
+ * - gif_softc->gif_lock (an adaptive mutex) for writer
+ * - gif_var->gv_psref for reader
+ * gif_softc->gif_var is used for variant values while the gif tunnel
+ * exists.
* + Each CPU's gif_ro.gr_ro of gif_ro_percpu are protected by
* percpu'ed gif_ro.gr_lock.
*
* Locking order:
- * - encap_lock => gif_softcs.lock
+ * - encap_lock => gif_softc->gif_lock => gif_softcs.lock
*/
#endif /* !_NET_IF_GIF_H_ */
Home |
Main Index |
Thread Index |
Old Index