<div dir="ltr"><div>When table is destroyed, there is really no need to keep track of the mask&#39;s reference counting -- The masks will have to be destroyed any ways. <br><br></div><div>During run time, the mask_list deletion needs to be protected by the ovs_lock, But we should not require ovs_lock to be held during table destroy. right? So it seems we will have two ways of doing ovs_flow_free() any ways,  <br>
<br></div><div>I will continue to think about how to merge these two cases. Please let me know if you have any suggestions. <br><br></div><div>--andy <br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jun 19, 2013 at 4:09 PM, Jesse Gross <span dir="ltr">&lt;<a href="mailto:jesse@nicira.com" target="_blank">jesse@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">
What is the reason need for iterating through the mask list itself<br>
when destroying the table instead of doing it as the flows are<br>
deleted? Doing it that way would both avoid the need to have multiple<br>
list deletion functions and the differences between the RCU and<br>
non-RCU versions of ovs_flow_free().<br>
<br>
One issue that comes to mind is the RCU barrier when the module is<br>
unloaded but there are other ways to fix that.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Jun 19, 2013 at 2:09 PM, Andy Zhou &lt;<a href="mailto:azhou@nicira.com">azhou@nicira.com</a>&gt; wrote:<br>
&gt; Jesse,<br>
&gt;<br>
&gt; The following patch is an incremental patch on top of yours.<br>
&gt;  -- Fix a few small bugs introduced by the cleanup patch.<br>
&gt;  -- Make mask list per table.<br>
&gt;<br>
&gt; I believe this implementation will address the rcu lock issues we discussed<br>
&gt; off line.<br>
&gt;<br>
&gt; Would you please review?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; --andy<br>
&gt;<br>
&gt; On Tue, Jun 18, 2013 at 4:35 PM, Jesse Gross &lt;<a href="mailto:jesse@nicira.com">jesse@nicira.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Jun 18, 2013 at 4:15 PM, Andy Zhou &lt;<a href="mailto:azhou@nicira.com">azhou@nicira.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Add wildcarded flow support in kernel datapath.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Wildcarded flow can improve OVS flow set up performance by avoid sending<br>
&gt;&gt; &gt; matching new flows to the user space program. The exact performance<br>
&gt;&gt; &gt; boost<br>
&gt;&gt; &gt; will largely dependent on wildcarded flow hit rate.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; In case all new flows hits wildcard flows, the flow set up rate is<br>
&gt;&gt; &gt; within 5% of that of linux bridge module.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Pravin has made significant contributions to this patch. Including API<br>
&gt;&gt; &gt; clean ups and bug fixes.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Co-authored-by: Pravin B Shelar &lt;<a href="mailto:pshelar@nicira.com">pshelar@nicira.com</a>&gt;<br>
&gt;&gt; &gt; Signed-off-by: Pravin B Shelar &lt;<a href="mailto:pshelar@nicira.com">pshelar@nicira.com</a>&gt;<br>
&gt;&gt; &gt; Signed-off-by: Andy Zhou &lt;<a href="mailto:azhou@nicira.com">azhou@nicira.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; I made some incremental changes, can you take a look to see if they<br>
&gt;&gt; seem reasonable to you?<br>
&gt;&gt;<br>
&gt;&gt; Here are the main blocks:<br>
&gt;&gt;  - Additional interface documentation.<br>
&gt;&gt;  - Fix memory leak when installing a new flow if there is an<br>
&gt;&gt; allocation failure for the mask.<br>
&gt;&gt;  - Require Ethernet addresses to be present in the key, as before.<br>
&gt;&gt;  - Make SNAP handling a little more integrated with the rest of the<br>
&gt;&gt; parsing and validation code.<br>
&gt;&gt;  - Make ovs_flow_free() and ovs_deferred_flow_free() have exactly the<br>
&gt;&gt; same behavior, just with the addition of RCU, to avoid possible<br>
&gt;&gt; confusion.<br>
&gt;&gt;  - Return errors directly rather than through an intermediate variable<br>
&gt;&gt; in ovs_flow_extract() and children.<br>
&gt;&gt;  - Enforce an exact match for the outer EtherType for vlan packets,<br>
&gt;&gt; similar to what we do for other protocols.<br>
&gt;&gt;  - Miscellaneous style fixes.<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>