Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Add a locking notes for if_pppoe
details: https://anonhg.NetBSD.org/src/rev/0a5ce664e3f1
branches: trunk
changeset: 356783:0a5ce664e3f1
user: knakahara <knakahara%NetBSD.org@localhost>
date: Thu Oct 12 09:50:55 2017 +0000
description:
Add a locking notes for if_pppoe
diffstat:
sys/net/if_pppoe.h | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r 9b4725ec9592 -r 0a5ce664e3f1 sys/net/if_pppoe.h
--- a/sys/net/if_pppoe.h Thu Oct 12 09:49:43 2017 +0000
+++ b/sys/net/if_pppoe.h Thu Oct 12 09:50:55 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.h,v 1.14 2017/05/31 11:44:44 knakahara Exp $ */
+/* $NetBSD: if_pppoe.h,v 1.15 2017/10/12 09:50:55 knakahara Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -70,10 +70,15 @@
void pppoedisc_input(struct ifnet *, struct mbuf *);
#endif /* _KERNEL */
/*
- * TODO: Locking notes
- * Currently, the if_pppoe.c and if_spppsubr.c locking is too complexity.
- * So, we will restructure locks, and then we describe the restructureed
- * locking note.
+ * Locking notes:
+ * + pppoe_softc_list is protected by pppoe_softc_list_lock (an rwlock)
+ * pppoe_softc_list is a list of all pppoe_softc, and it is used to
+ * find pppoe interface by session id or host unique tag.
+ * + pppoe_softc is protected by pppoe_softc->sc_lock (an rwlock)
+ * pppoe_softc holds session id and parameters to establish the id
+ *
+ * Locking order:
+ * - pppoe_softc_list_lock => pppoe_softc->sc_lock
*/
#endif /* !_NET_IF_PPPOE_H_ */
Home |
Main Index |
Thread Index |
Old Index