Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2007 21:06:51 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 126105 for review
Message-ID:  <200709052106.l85L6pBV008586@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126105

Change 126105 by zec@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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709052106.l85L6pBV008586>