<div dir="ltr">Thanks for the updates and pushing it in. <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 10:34 AM, Ben Pfaff <span dir="ltr">&lt;<a href="mailto:blp@nicira.com" target="_blank">blp@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 class="im">On Tue, Jun 18, 2013 at 04:15:10PM -0700, Andy Zhou wrote:<br>
</div><div><div class="h5">&gt; Added support to allow mega flow specified and displayed. ovs-dpctl tool<br>
&gt; is mainly used as debugging tool.<br>
&gt;<br>
&gt; This patch also implements the low level user space routines to send<br>
&gt; and receive mega flow netlink messages. Those netlink suppor<br>
&gt; routines are required for forthcoming user space mega flow patches.<br>
&gt;<br>
&gt; Added a unit test to test parsing and display of mega flows.<br>
&gt;<br>
&gt; Ethan contributed the ovs-dpctl mega flow output function.<br>
&gt;<br>
&gt; Co-authored-by: Ethan Jackson &lt;<a href="mailto:ethan@nicira.com">ethan@nicira.com</a>&gt;<br>
&gt; Signed-off-by: Ethan Jackson &lt;<a href="mailto:ethan@nicira.com">ethan@nicira.com</a>&gt;<br>
&gt; Signed-off-by: Andy Zhou &lt;<a href="mailto:azhou@nicira.com">azhou@nicira.com</a>&gt;<br>
&gt;<br>
&gt; ---<br>
&gt; v1-&gt;v2<br>
&gt;      Integrated Ethan&#39;s patch on ovs-dpctl mega flow output.<br>
&gt;      Add Ethan as a co-author for this patch.<br>
&gt;<br>
&gt; v2-&gt;v3<br>
&gt;      Rebase to head to make review easier.<br>
&gt;      ovs-dpctl: Add mask input for tunnel configurations.<br>
&gt;<br>
&gt; v3-&gt;v4<br>
&gt;      fix a typo<br>
&gt;<br>
&gt; v4-&gt;v5<br>
&gt;      Add ovs-dpctl unit test cases for parsing mega flow.<br>
&gt;      Address Ben&#39;s review feedback.<br>
&gt;<br>
&gt; v5-&gt;v6<br>
&gt;      Changes for ethtype<br>
&gt;      Address Ben&#39;s 2nd review feedback.<br>
<br>
</div></div>I applied this to master.  I couldn&#39;t resist making a few minor<br>
changes before I did:<br>
<br>
diff --git a/lib/dpif-provider.h b/lib/dpif-provider.h<br>
index 84b5702..666c224 100644<br>
--- a/lib/dpif-provider.h<br>
+++ b/lib/dpif-provider.h<br>
@@ -1,5 +1,5 @@<br>
 /*<br>
- * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.<br>
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.<br>
  *<br>
  * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);<br>
  * you may not use this file except in compliance with the License.<br>
@@ -279,15 +279,22 @@ struct dpif_class {<br>
      * called again once it returns nonzero within a given iteration (but the<br>
      * &#39;flow_dump_done&#39; function will be called afterward).<br>
      *<br>
-     * On success, if &#39;key&#39; and &#39;key_len&#39; are nonnull then &#39;*key&#39; and<br>
-     * &#39;*key_len&#39; must be set to Netlink attributes with types OVS_KEY_ATTR_*<br>
<div class="im">-     * representing the dumped flow&#39;s key; if &#39;mask&#39; and &#39;mask_len&#39; are<br>
-     * nonnull then &#39;*mask&#39; and &#39;*mask_len&#39; must be set to Netlink attributes<br>
-     * with types of OVS_KEY_ATTR_* representing the dumped flow&#39;s mask.<br>
-     * If &#39;actions&#39; and &#39;actions_len&#39; are nonnull then they should be set to<br>
-     * Netlink attributes with types OVS_ACTION_ATTR_* representing the dumped<br>
-     * flow&#39;s actions.  If &#39;stats&#39; is nonnull then it should be set to the<br>
-     * dumped flow&#39;s statistics.<br>
</div>+     * On success:<br>
+     *<br>
+     *     - If &#39;key&#39; and &#39;key_len&#39; are nonnull, then &#39;*key&#39; and &#39;*key_len&#39;<br>
+     *       must be set to Netlink attributes with types OVS_KEY_ATTR_*<br>
+     *       representing the dumped flow&#39;s key.<br>
+     *<br>
+     *     - If &#39;mask&#39; and &#39;mask_len&#39; are nonnull then &#39;*mask&#39; and &#39;*mask_len&#39;<br>
+     *       must be set to Netlink attributes with types of OVS_KEY_ATTR_*<br>
+     *       representing the dumped flow&#39;s mask.<br>
+     *<br>
+     *     - If &#39;actions&#39; and &#39;actions_len&#39; are nonnull then they should be set<br>
+     *       to Netlink attributes with types OVS_ACTION_ATTR_* representing<br>
+     *       the dumped flow&#39;s actions.<br>
+     *<br>
+     *     - If &#39;stats&#39; is nonnull then it should be set to the dumped flow&#39;s<br>
+     *       statistics.<br>
<div class="im">      *<br>
      * All of the returned data is owned by &#39;dpif&#39;, not by the caller, and the<br>
      * caller must not modify or free it.  &#39;dpif&#39; must guarantee that it<br>
</div>diff --git a/lib/packets.h b/lib/packets.h<br>
index 543a481..cc9ab3d 100644<br>
--- a/lib/packets.h<br>
+++ b/lib/packets.h<br>
@@ -1,5 +1,5 @@<br>
 /*<br>
- * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.<br>
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.<br>
  *<br>
  * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);<br>
  * you may not use this file except in compliance with the License.<br>
@@ -278,11 +278,11 @@ vlan_tci_to_pcp(ovs_be16 vlan_tci)<br>
<div class="im"> }<br>
<br>
 /* Given the vlan_tci field from an 802.1Q header, in network byte order,<br>
</div><div class="im">- * returns the Canonical Format Indicator (CFI) in host byte order. */<br>
</div>+ * returns the Canonical Format Indicator (CFI). */<br>
 static inline int<br>
 vlan_tci_to_cfi(ovs_be16 vlan_tci)<br>
<div class="im"> {<br>
-    return (ntohs(vlan_tci) &amp; VLAN_CFI) &gt;&gt; VLAN_CFI_SHIFT;<br>
</div>+    return (vlan_tci &amp; htons(VLAN_CFI)) != 0;<br>
 }<br>
<br>
 #define VLAN_HEADER_LEN 4<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
Ben<br>
</font></span></blockquote></div><br></div>