PERFORCE change 164133 for review
Marko Zec
zec at FreeBSD.org
Thu Jun 11 18:06:38 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164133
Change 164133 by zec at 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. */
More information about the p4-projects
mailing list