PERFORCE change 163869 for review

Marko Zec zec at FreeBSD.org
Tue Jun 9 08:25:03 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=163869

Change 163869 by zec at zec_amdx4 on 2009/06/09 08:24:24

	Fix misintegrations, reduce WS diff against head, and
	back out M_REMOTE_VNET mbuf flag, to be replaced RSN by
	thread tagging for preventing netisr direct dispatch being
	called from outbound call path of the network stack.

Affected files ...

.. //depot/projects/vimage/src/sys/kern/uipc_domain.c#22 edit
.. //depot/projects/vimage/src/sys/netgraph/ng_base.c#60 edit
.. //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#27 edit
.. //depot/projects/vimage/src/sys/netgraph/ng_iface.c#26 edit
.. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#40 edit
.. //depot/projects/vimage/src/sys/netipsec/key.c#43 edit
.. //depot/projects/vimage/src/sys/sys/mbuf.h#19 edit

Differences ...

==== //depot/projects/vimage/src/sys/kern/uipc_domain.c#22 (text+ko) ====

@@ -172,7 +172,9 @@
 }
 
 /*
- * Initialize a domain instance.
+ * Add a new protocol domain to the list of supported domains
+ * Note: you cant unload it again because a socket may be using it.
+ * XXX can't fail at this time.
  */
 static int
 net_init_domain(const void *arg)

==== //depot/projects/vimage/src/sys/netgraph/ng_base.c#60 (text+ko) ====

@@ -3096,7 +3096,7 @@
 
 	V_nextID = 1;
 
-	return 0;
+	return (0);
 }
 
 #ifdef VIMAGE 

==== //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#27 (text+ko) ====

@@ -261,14 +261,6 @@
 		 * Send packet; if hook is not connected, mbuf will get
 		 * freed.
 		 */
-#ifdef VIMAGE
-		if (ifp->if_vnet != node->nd_vnet) {
-			m->m_flags |= M_REMOTE_VNET;
-			CURVNET_SET_QUIET(node->nd_vnet);
-			NG_SEND_DATA_ONLY(error, priv->ether, m);
-			CURVNET_RESTORE();
-		} else
-#endif
 		NG_SEND_DATA_ONLY(error, priv->ether, m);
 
 		/* Update stats */
@@ -556,12 +548,6 @@
 	/* Update interface stats */
 	ifp->if_ipackets++;
 
-#ifdef VIMAGE
-	/* Mark up the mbuf if crossing vnet boundary */
-	if (ifp->if_vnet != NG_HOOK_NODE(hook)->nd_vnet)
-		m->m_flags |= M_REMOTE_VNET;
-#endif
-
 	(*ifp->if_input)(ifp, m);
 
 	/* Done */

==== //depot/projects/vimage/src/sys/netgraph/ng_iface.c#26 (text+ko) ====

@@ -484,14 +484,6 @@
 
 	/* Send packet. If hook is not connected,
 	   mbuf will get freed. */
-#ifdef VIMAGE
-	if (ifp->if_vnet != priv->node->nd_vnet) {
-		m->m_flags |= M_REMOTE_VNET;
-		CURVNET_SET_QUIET(priv->node->nd_vnet);
-		NG_SEND_DATA_ONLY(error, *get_hook_from_iffam(priv, iffam), m);
-		CURVNET_RESTORE();
-	} else
-#endif
 	NG_SEND_DATA_ONLY(error, *get_hook_from_iffam(priv, iffam), m);
 
 	/* Update stats. */
@@ -766,12 +758,6 @@
 	ifp->if_ipackets++;
 	ifp->if_ibytes += m->m_pkthdr.len;
 
-#ifdef VIMAGE
-	/* Mark up the mbuf if crossing vnet boundary */
-	if (ifp->if_vnet != NG_HOOK_NODE(hook)->nd_vnet)
-		m->m_flags |= M_REMOTE_VNET;
-#endif
-
 	/* Note receiving interface */
 	m->m_pkthdr.rcvif = ifp;
 

==== //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#40 (text+ko) ====

@@ -675,6 +675,5 @@
 
 	callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
 	    tcp_hc_purge, arg);
-
 	CURVNET_RESTORE();
 }

==== //depot/projects/vimage/src/sys/netipsec/key.c#43 (text+ko) ====

@@ -7271,18 +7271,6 @@
 	}
 	REGTREE_UNLOCK();
 
-	REGTREE_LOCK();
-	for (i = 0; i <= SADB_SATYPE_MAX; i++) {
-		LIST_FOREACH(reg, &V_regtree[i], chain) {
-			if (__LIST_CHAINED(reg)) {
-				LIST_REMOVE(reg, chain);
-				free(reg, M_IPSEC_SAR);
-				break;
-			}
-		}
-	}
-	REGTREE_UNLOCK();
-
 	ACQ_LOCK();
 	for (acq = LIST_FIRST(&V_spacqtree); acq != NULL; acq = nextacq) {
 		nextacq = LIST_NEXT(acq, chain);

==== //depot/projects/vimage/src/sys/sys/mbuf.h#19 (text+ko) ====

@@ -200,7 +200,6 @@
 #define	M_PROTO7	0x00100000 /* protocol-specific */
 #define	M_PROTO8	0x00200000 /* protocol-specific */
 #define	M_FLOWID	0x00400000 /* flowid is valid */
-#define	M_REMOTE_VNET	0x00800000 /* mbuf crossed boundary between two vnets */
 /*
  * For RELENG_{6,7} steal these flags for limited multiple routing table
  * support. In RELENG_8 and beyond, use just one flag and a tag.


More information about the p4-projects mailing list