<div dir="ltr">I asked Ethan and he suggested that Ben might have a better idea.<div><br></div><div>Ben, is this approach fine? I&#39;m not entirely clear on what the relationship is between netdev types and datapath port types.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 18 February 2014 14:45, 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">

<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Acked</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">-</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">by</span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">: Alex Wang &lt;<a href="mailto:alexw@nicira.com" target="_blank">alexw@nicira.com</a></span><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">&gt;</span><div>



<font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Ethan,</font></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Could you have a look of this patch?  Do you think </font><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">get_vport_type() is the right place?</span></div>



<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Thanks,</span></div><div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px">Alex Wang,</span></div>



<div><div>
<div><span style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Feb 18, 2014 at 2:26 PM, Joe Stringer <span dir="ltr">&lt;<a href="mailto:joestringer@nicira.com" target="_blank">joestringer@nicira.com</a>&gt;</span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">When creating tap ports in dpif-linux, the &quot;tap&quot; type is treated the<br>
same as &quot;system&quot;, and the type is discarded. When dumping datapath<br>
port types, this would cause &quot;tap&quot; type to be reported as a &quot;system&quot;<br>
type.<br>
<br>
Each time we see a port of the wrong type in bridge_reconfigure(), we<br>
remove it and add a port with the correct configuration. This would<br>
always occur for tap ports, causing deletion and re-creation of all tap<br>
ports each time the bridge was reconfigured.<br>
<br>
This patch makes dpif-linux use netdev to look up port types if the<br>
datapath reports that they are of type OVS_VPORT_TYPE_NETDEV.<br>
<br>
Bug #1196289.<br>
<br>
Reported-by: James Schmidt &lt;<a href="mailto:jschmidt@vmware.com" target="_blank">jschmidt@vmware.com</a>&gt;<br>
Signed-off-by: Joe Stringer &lt;<a href="mailto:joestringer@nicira.com" target="_blank">joestringer@nicira.com</a>&gt;<br>
---<br>
v2: Fix the issue in dpif-linux instead of ofproto-dpif.<br>
---<br>
 lib/dpif-linux.c |    7 +++++--<br>
 1 file changed, 5 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c<br>
index f7f5292..18de118 100644<br>
--- a/lib/dpif-linux.c<br>
+++ b/lib/dpif-linux.c<br>
@@ -439,8 +439,11 @@ get_vport_type(const struct dpif_linux_vport *vport)<br>
     static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20);<br>
<br>
     switch (vport-&gt;type) {<br>
-    case OVS_VPORT_TYPE_NETDEV:<br>
-        return &quot;system&quot;;<br>
+    case OVS_VPORT_TYPE_NETDEV: {<br>
+        const char *type = netdev_get_type_from_name(vport-&gt;name);<br>
+<br>
+        return type ? type : &quot;system&quot;;<br>
+    }<br>
<br>
     case OVS_VPORT_TYPE_INTERNAL:<br>
         return &quot;internal&quot;;<br>
</div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888">--<br>
1.7.9.5<br>
<br>
_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openvswitch.org" target="_blank">dev@openvswitch.org</a><br>
<a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div><br></div>