PERFORCE change 126105 for review

Marko Zec zec at FreeBSD.org
Wed Sep 5 14:06:53 PDT 2007


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

Change 126105 by zec at zec_tpx32 on 2007/09/05 21:06:10

	In addition to marking the packet with M_REMOTE_VNET when
	crossing a boundary between two vnets, set / restore the
	vnet context to the vnet the netgraph node is residing in
	when dequeuing packets in ng_eiface_start2().

Affected files ...

.. //depot/projects/vimage/src/sys/netgraph/ng_eiface.c#8 edit

Differences ...

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

@@ -253,16 +253,18 @@
 			continue;
 		}
 
-#ifdef VIMAGE
-		/* Mark up the mbuf if crossing vnet boundary */
-		if (ifp->if_vnet != node->nd_vnet)
-			m->m_flags |= M_REMOTE_VNET;
-#endif
-
 		/*
 		 * 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 */


More information about the p4-projects mailing list