<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"><<a href="mailto:blp@nicira.com" target="_blank">blp@nicira.com</a>></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">> Added support to allow mega flow specified and displayed. ovs-dpctl tool<br>
> is mainly used as debugging tool.<br>
><br>
> This patch also implements the low level user space routines to send<br>
> and receive mega flow netlink messages. Those netlink suppor<br>
> routines are required for forthcoming user space mega flow patches.<br>
><br>
> Added a unit test to test parsing and display of mega flows.<br>
><br>
> Ethan contributed the ovs-dpctl mega flow output function.<br>
><br>
> Co-authored-by: Ethan Jackson <<a href="mailto:ethan@nicira.com">ethan@nicira.com</a>><br>
> Signed-off-by: Ethan Jackson <<a href="mailto:ethan@nicira.com">ethan@nicira.com</a>><br>
> Signed-off-by: Andy Zhou <<a href="mailto:azhou@nicira.com">azhou@nicira.com</a>><br>
><br>
> ---<br>
> v1->v2<br>
> Integrated Ethan's patch on ovs-dpctl mega flow output.<br>
> Add Ethan as a co-author for this patch.<br>
><br>
> v2->v3<br>
> Rebase to head to make review easier.<br>
> ovs-dpctl: Add mask input for tunnel configurations.<br>
><br>
> v3->v4<br>
> fix a typo<br>
><br>
> v4->v5<br>
> Add ovs-dpctl unit test cases for parsing mega flow.<br>
> Address Ben's review feedback.<br>
><br>
> v5->v6<br>
> Changes for ethtype<br>
> Address Ben's 2nd review feedback.<br>
<br>
</div></div>I applied this to master. I couldn'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 "License");<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>
* 'flow_dump_done' function will be called afterward).<br>
*<br>
- * On success, if 'key' and 'key_len' are nonnull then '*key' and<br>
- * '*key_len' must be set to Netlink attributes with types OVS_KEY_ATTR_*<br>
<div class="im">- * representing the dumped flow's key; if 'mask' and 'mask_len' are<br>
- * nonnull then '*mask' and '*mask_len' must be set to Netlink attributes<br>
- * with types of OVS_KEY_ATTR_* representing the dumped flow's mask.<br>
- * If 'actions' and 'actions_len' are nonnull then they should be set to<br>
- * Netlink attributes with types OVS_ACTION_ATTR_* representing the dumped<br>
- * flow's actions. If 'stats' is nonnull then it should be set to the<br>
- * dumped flow's statistics.<br>
</div>+ * On success:<br>
+ *<br>
+ * - If 'key' and 'key_len' are nonnull, then '*key' and '*key_len'<br>
+ * must be set to Netlink attributes with types OVS_KEY_ATTR_*<br>
+ * representing the dumped flow's key.<br>
+ *<br>
+ * - If 'mask' and 'mask_len' are nonnull then '*mask' and '*mask_len'<br>
+ * must be set to Netlink attributes with types of OVS_KEY_ATTR_*<br>
+ * representing the dumped flow's mask.<br>
+ *<br>
+ * - If 'actions' and 'actions_len' are nonnull then they should be set<br>
+ * to Netlink attributes with types OVS_ACTION_ATTR_* representing<br>
+ * the dumped flow's actions.<br>
+ *<br>
+ * - If 'stats' is nonnull then it should be set to the dumped flow's<br>
+ * statistics.<br>
<div class="im"> *<br>
* All of the returned data is owned by 'dpif', not by the caller, and the<br>
* caller must not modify or free it. 'dpif' 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 "License");<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) & VLAN_CFI) >> VLAN_CFI_SHIFT;<br>
</div>+ return (vlan_tci & 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>