Deleted Added
full compact
ng_base.c (193731) ng_base.c (194012)
1/*
2 * ng_base.c
3 */
4
5/*-
6 * Copyright (c) 1996-1999 Whistle Communications, Inc.
7 * All rights reserved.
8 *

--- 24 unchanged lines hidden (view full) ---

33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
36 * OF SUCH DAMAGE.
37 *
38 * Authors: Julian Elischer <julian@freebsd.org>
39 * Archie Cobbs <archie@freebsd.org>
40 *
1/*
2 * ng_base.c
3 */
4
5/*-
6 * Copyright (c) 1996-1999 Whistle Communications, Inc.
7 * All rights reserved.
8 *

--- 24 unchanged lines hidden (view full) ---

33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
36 * OF SUCH DAMAGE.
37 *
38 * Authors: Julian Elischer <julian@freebsd.org>
39 * Archie Cobbs <archie@freebsd.org>
40 *
41 * $FreeBSD: head/sys/netgraph/ng_base.c 193731 2009-06-08 17:15:40Z zec $
41 * $FreeBSD: head/sys/netgraph/ng_base.c 194012 2009-06-11 16:50:49Z zec $
42 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $
43 */
44
45/*
46 * This file implements the base netgraph code.
47 */
48
49#include <sys/param.h>

--- 2158 unchanged lines hidden (view full) ---

2208 (node->nd_flags & NGF_FORCE_WRITER) ||
2209 (hook && (hook->hk_flags & HK_FORCE_WRITER))) {
2210 rw = NGQRW_W;
2211 } else {
2212 rw = NGQRW_R;
2213 }
2214
2215 /*
42 * $Whistle: ng_base.c,v 1.39 1999/01/28 23:54:53 julian Exp $
43 */
44
45/*
46 * This file implements the base netgraph code.
47 */
48
49#include <sys/param.h>

--- 2158 unchanged lines hidden (view full) ---

2208 (node->nd_flags & NGF_FORCE_WRITER) ||
2209 (hook && (hook->hk_flags & HK_FORCE_WRITER))) {
2210 rw = NGQRW_W;
2211 } else {
2212 rw = NGQRW_R;
2213 }
2214
2215 /*
2216 * If sender or receiver requests queued delivery or stack usage
2216 * If sender or receiver requests queued delivery, or call graph
2217 * loops back from outbound to inbound path, or stack usage
2217 * level is dangerous - enqueue message.
2218 */
2219 if ((flags & NG_QUEUE) || (hook && (hook->hk_flags & HK_QUEUE))) {
2220 queue = 1;
2218 * level is dangerous - enqueue message.
2219 */
2220 if ((flags & NG_QUEUE) || (hook && (hook->hk_flags & HK_QUEUE))) {
2221 queue = 1;
2222 } else if (hook && (hook->hk_flags & HK_TO_INBOUND) &&
2223 curthread->td_ng_outbound) {
2224 queue = 1;
2221 } else {
2222 queue = 0;
2223#ifdef GET_STACK_USAGE
2224 /*
2225 * Most of netgraph nodes have small stack consumption and
2226 * for them 25% of free stack space is more than enough.
2227 * Nodes/hooks with higher stack usage should be marked as
2228 * HI_STACK. For them 50% of stack will be guaranteed then.

--- 1591 unchanged lines hidden ---
2225 } else {
2226 queue = 0;
2227#ifdef GET_STACK_USAGE
2228 /*
2229 * Most of netgraph nodes have small stack consumption and
2230 * for them 25% of free stack space is more than enough.
2231 * Nodes/hooks with higher stack usage should be marked as
2232 * HI_STACK. For them 50% of stack will be guaranteed then.

--- 1591 unchanged lines hidden ---