<div dir="ltr">Great to see this series.<div><br></div><div>Based on the offline discussion with Ryan, we think it is not ideal to enforce the</div><div>double-standard that xlate module cannot take reference to netdev while other</div>

<div>modules (e.g. bfd/cfm) must.  This makes the code more complicated.</div><div><br></div><div style>The root cause of this double-standard is the need to guarantee that netdev shash</div><div style>does not contains the netdev when it is certain to be removed.  Currently, the rcu_postponed</div>

<div style>xport deletion may cause the netdev still in the shash and prevent the creation of</div><div style>new netdev with same name</div><div><br></div><div style>One idea is to move the &quot;removal of netdev from shash&quot; logic into a separate function.</div>

<div style>And this function should be called whenever we are sure the netdev will be removed (hope</div><div style>there are not too many places and it is not invovled)</div><div style><br></div><div style>We will discuss this further, and update the thread with the direction to go.</div>

<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">+static void<br>


+xlate_xport_copy(struct xbridge *xbridge, struct xbundle *xbundle,<br>
+                 struct xport *xport)<br>
+{<br>
+    struct skb_priority_to_dscp *pdscp, *new_pdscp;<br>
+    struct xport *new_xport = xzalloc(sizeof *xport);<br>
+    new_xport-&gt;ofport = xport-&gt;ofport;<br>
+    new_xport-&gt;ofp_port = xport-&gt;ofp_port;<br>
+    new_xport-&gt;xbridge = xbridge;<br>
+    xlate_xport_init(new_xport);<br>
+<br>
+    xlate_xport_set(new_xport, xport-&gt;odp_port, xport-&gt;cfm, xport-&gt;bfd,<br>
+                    xport-&gt;stp_port_no, xport-&gt;config, xport-&gt;state,<br>
+                    xport-&gt;is_tunnel, xport-&gt;may_enable);<br>
+<br>
+    /* Note that RCU read threads do not take a reference to netdev since this<br>
+     * blocks creation of netdevs with the same name after deletion or type<br>
+     * modification of the netdev */<br>
+    new_xport-&gt;netdev = xport-&gt;netdev;<br>
+<br></div></div></blockquote></div><br></div></div>