<div dir="ltr">Hey Joe,<div><br></div><div>Could you review this patch, when you are available?</div><div><br></div><div>Thanks,</div><div>Alex Wang,</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 21, 2014 at 5:27 PM, Alex Wang <span dir="ltr">&lt;<a href="mailto:alexw@nicira.com" target="_blank">alexw@nicira.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Commit b256dc525c8 (ofproto-dpif-xlate: Cache xlate_actions() effects.)<br>
caches the variables needed for refreshing mac-learning table in<br>
xlate_normal().  Wherein, the cache entry always records reference to<br>
the original &#39;ofproto&#39;.<br>
<br>
When patch port is used to connect two &#39;ofproto&#39;s, packet goes through the<br>
patch port will have two mac-learning cache entries created for each<br>
&#39;ofproto&#39;.  So, each entry should reference to the corresponding &#39;ofproto&#39;.<br>
However, due to the bug mentioned above, all cache entries will refer to the<br>
same &#39;ofproto&#39;.  Subsequently, the mac-learning tables can be corrupted, which<br>
causes connection loss.<br>
<br>
This commit fixes the bug by making each cache entry refer to the correct<br>
&#39;ofproto&#39;.<br>
<br>
Signed-off-by: Alex Wang &lt;<a href="mailto:alexw@nicira.com">alexw@nicira.com</a>&gt;<br>
---<br>
 ofproto/ofproto-dpif-xlate.c |    2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c<br>
index a87db54..63b4741 100644<br>
--- a/ofproto/ofproto-dpif-xlate.c<br>
+++ b/ofproto/ofproto-dpif-xlate.c<br>
@@ -1570,7 +1570,7 @@ xlate_normal(struct xlate_ctx *ctx)<br>
<br>
         /* Save enough info to update mac learning table later. */<br>
         entry = xlate_cache_add_entry(ctx-&gt;xin-&gt;xcache, XC_NORMAL);<br>
-        entry-&gt;u.normal.ofproto = ctx-&gt;xin-&gt;ofproto;<br>
+        entry-&gt;u.normal.ofproto = ctx-&gt;xbridge-&gt;ofproto;<br>
         entry-&gt;u.normal.flow = xmemdup(flow, sizeof *flow);<br>
         entry-&gt;u.normal.vlan = vlan;<br>
     }<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
</font></span></blockquote></div><br></div>