diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2015-09-24 14:46:23 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2015-09-24 14:46:23 +0000 |
commit | 7c17ca4c77ce10f42571fc1d707e9324df134547 (patch) | |
tree | 6bf01046c0b4f9d621ead254ff173db7e2c66e8d /sys | |
parent | 3d9884c7bbaf4f4df73cb191aa2fd105d7fd6366 (diff) |
add a comment explaining how we serialize when switching trunkproto;
requested by mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_trunk.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index c454cee5f66..44550c77556 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.115 2015/09/24 14:01:20 mikeb Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.116 2015/09/24 14:46:22 mikeb Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -659,6 +659,13 @@ trunk_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = EPROTONOSUPPORT; break; } + /* + * Serialize modifications to the trunk and trunk + * ports via the ifih SRP: detaching trunk_input + * from the trunk port will require all currently + * running trunk_input's on this port to finish + * granting us an exclusive access to it. + */ SLIST_FOREACH(tp, &tr->tr_ports, tp_entries) if_ih_remove(tp->tp_if, trunk_input, tp); if (tr->tr_proto != TRUNK_PROTO_NONE) |