From owner-p4-projects@FreeBSD.ORG Thu Jun 11 18:06:38 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0FCDC1065670; Thu, 11 Jun 2009 18:06:38 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C22EF106566B for ; Thu, 11 Jun 2009 18:06:37 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 96DE98FC13 for ; Thu, 11 Jun 2009 18:06:37 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BI6bNo012208 for ; Thu, 11 Jun 2009 18:06:37 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n5BI6b94012206 for perforce@freebsd.org; Thu, 11 Jun 2009 18:06:37 GMT (envelope-from zec@fer.hr) Date: Thu, 11 Jun 2009 18:06:37 GMT Message-Id: <200906111806.n5BI6b94012206@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 164133 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 18:06:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=164133 Change 164133 by zec@zec_tpx32 on 2009/06/11 18:05:52 Reduce diff against head / back out an older ng inbound to outbound direct dispatch prevention hack. Affected files ... .. //depot/projects/vimage/src/sys/net/netisr.c#19 edit .. //depot/projects/vimage/src/sys/netgraph/ng_bridge.c#9 edit .. //depot/projects/vimage/src/sys/netgraph/ng_ether.c#28 edit .. //depot/projects/vimage/src/sys/sys/proc.h#35 edit Differences ... ==== //depot/projects/vimage/src/sys/net/netisr.c#19 (text+ko) ==== @@ -872,7 +872,7 @@ /* * If direct dispatch is entirely disabled, fall back on queueing. */ - if (!netisr_direct || curthread->td_flags & TDF_NODIRNETISR) + if (!netisr_direct) return (netisr_queue_src(proto, source, m)); KASSERT(proto < NETISR_MAXPROT, ==== //depot/projects/vimage/src/sys/netgraph/ng_bridge.c#9 (text+ko) ==== @@ -98,7 +98,7 @@ /* Per-node private data */ struct ng_bridge_private { struct ng_bridge_bucket *tab; /* hash table bucket array */ - struct ng_bridge_link *links[NG_BRIDGE_MAX_LINKS + 1]; + struct ng_bridge_link *links[NG_BRIDGE_MAX_LINKS]; struct ng_bridge_config conf; /* node configuration */ node_p node; /* netgraph node */ u_int numHosts; /* num entries in table */ @@ -361,9 +361,7 @@ if (*eptr != '\0' || linkNum >= NG_BRIDGE_MAX_LINKS) return (EINVAL); } else if (strcmp(name, "anchor") == 0) { - linkNum = NG_BRIDGE_MAX_LINKS; - if (priv->persistent) - return (EISCONN); + linkNum = 0; priv->persistent = 1; } @@ -794,7 +792,7 @@ /* Get link number */ linkNum = (intptr_t)NG_HOOK_PRIVATE(hook); - KASSERT(linkNum >= 0 && linkNum <= NG_BRIDGE_MAX_LINKS, + KASSERT(linkNum >= 0 && linkNum < NG_BRIDGE_MAX_LINKS, ("%s: linkNum=%u", __func__, linkNum)); /* Remove all hosts associated with this link */ ==== //depot/projects/vimage/src/sys/netgraph/ng_ether.c#28 (text+ko) ==== @@ -242,9 +242,7 @@ /* If "lower" hook not connected, let packet continue */ if (priv->lower == NULL) return; - curthread->td_flags |= TDF_NODIRNETISR; NG_SEND_DATA_ONLY(error, priv->lower, *mp); /* sets *mp = NULL */ - curthread->td_flags &= ~TDF_NODIRNETISR; } /* ==== //depot/projects/vimage/src/sys/sys/proc.h#35 (text+ko) ==== @@ -320,7 +320,7 @@ #define TDF_BOUNDARY 0x00000400 /* Thread suspended at user boundary */ #define TDF_ASTPENDING 0x00000800 /* Thread has some asynchronous events. */ #define TDF_TIMOFAIL 0x00001000 /* Timeout from sleep after we were awake. */ -#define TDF_NODIRNETISR 0x00002000 /* Do not direct dispatch netisr handlers. */ +#define TDF_UNUSED2000 0x00002000 /* --available-- */ #define TDF_UPIBLOCKED 0x00004000 /* Thread blocked on user PI mutex. */ #define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ #define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */