-/* $OpenBSD: if.c,v 1.688 2023/04/08 13:49:38 mvs Exp $ */
+/* $OpenBSD: if.c,v 1.689 2023/04/18 22:00:19 mvs Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
static struct if_idxmap if_idxmap;
+/*
+ * XXXSMP: For `ifnetlist' modification both kernel and net locks
+ * should be taken. For read-only access only one lock of them required.
+ */
struct ifnet_head ifnetlist = TAILQ_HEAD_INITIALIZER(ifnetlist);
static inline unsigned int
-/* $OpenBSD: if_var.h,v 1.123 2023/04/05 19:35:23 bluhm Exp $ */
+/* $OpenBSD: if_var.h,v 1.124 2023/04/18 22:00:19 mvs Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
struct ifnet { /* and the entries */
void *if_softc; /* [I] lower-level data for this if */
struct refcnt if_refcnt;
- TAILQ_ENTRY(ifnet) if_list; /* [K] all struct ifnets are chained */
+ TAILQ_ENTRY(ifnet) if_list; /* [NK] all struct ifnets are chained */
TAILQ_HEAD(, ifaddr) if_addrlist; /* [N] list of addresses per if */
TAILQ_HEAD(, ifmaddr) if_maddrlist; /* [N] list of multicast records */
TAILQ_HEAD(, ifg_list) if_groups; /* [N] list of groups per if */