Hey Ethan,<br><br>Thanks for the review. <br>I will push these changes soon.<br><br>thanx!<br>mehak<br><br><div class="gmail_quote">On Sat, Oct 20, 2012 at 10:50 AM, Ethan Jackson <span dir="ltr">&lt;<a href="mailto:ethan@nicira.com" target="_blank">ethan@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">Thanks for doing this,<br>
<br>
Acked-by: Ethan Jackson &lt;<a href="mailto:ethan@nicira.com">ethan@nicira.com</a>&gt;<br>
<div><div class="h5"><br>
<br>
On Wed, Oct 17, 2012 at 6:23 PM, Mehak Mahajan &lt;<a href="mailto:mmahajan@nicira.com">mmahajan@nicira.com</a>&gt; wrote:<br>
&gt; With a previous commit 953cc1888321346e6c4175fbc0a3f66d34913ea3, the<br>
&gt; ovs logs were re-formatted such that they can be input into the<br>
&gt; ofproto/trace.  For ARP packets, ofproto/trace expects arp_tpa/arp_spa<br>
&gt; instead of nw_dst/nw_src.<br>
&gt;<br>
&gt; Signed-off-by: Mehak Mahajan &lt;<a href="mailto:mmahajan@nicira.com">mmahajan@nicira.com</a>&gt;<br>
&gt; ---<br>
&gt;  lib/match.c        |    3 +++<br>
&gt;  tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a> |   22 +++++++++++-----------<br>
&gt;  tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a> |   12 ++++++------<br>
&gt;  3 files changed, 20 insertions(+), 17 deletions(-)<br>
&gt;<br>
&gt; diff --git a/lib/match.c b/lib/match.c<br>
&gt; index e53a11a..6a4fec7 100644<br>
&gt; --- a/lib/match.c<br>
&gt; +++ b/lib/match.c<br>
&gt; @@ -780,6 +780,9 @@ match_format(const struct match *match, struct ds *s, unsigned int priority)<br>
&gt;                                ntohl(wc-&gt;masks.ipv6_label));<br>
&gt;              }<br>
&gt;          }<br>
&gt; +    } else if (f-&gt;dl_type == htons(ETH_TYPE_ARP)) {<br>
&gt; +        format_ip_netmask(s, &quot;arp_spa&quot;, f-&gt;nw_src, wc-&gt;masks.nw_src);<br>
&gt; +        format_ip_netmask(s, &quot;arp_tpa&quot;, f-&gt;nw_dst, wc-&gt;masks.nw_dst);<br>
&gt;      } else {<br>
&gt;          format_ip_netmask(s, &quot;nw_src&quot;, f-&gt;nw_src, wc-&gt;masks.nw_src);<br>
&gt;          format_ip_netmask(s, &quot;nw_dst&quot;, f-&gt;nw_dst, wc-&gt;masks.nw_dst);<br>
&gt; diff --git a/tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a> b/tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a><br>
&gt; index 0fe2eff..dff7bf4 100644<br>
&gt; --- a/tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a><br>
&gt; +++ b/tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a><br>
&gt; @@ -365,7 +365,7 @@ AT_CHECK([ovs-ofctl ofp-print &quot;\<br>
&gt;  30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \<br>
&gt;  00 00 00 00 00 00 00 3c \<br>
&gt;  &quot;], [0], [dnl<br>
&gt; -OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60<br>

&gt; +OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60<br>

&gt;  ])<br>
&gt;  AT_CLEANUP<br>
&gt;<br>
&gt; @@ -452,11 +452,11 @@ AT_CHECK([ovs-ofctl &#39;-vPATTERN:console:%c|%p|%m&#39; ofp-print &quot;\<br>
&gt;  00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \<br>
&gt;  00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \<br>
&gt;  &quot; 2], [0], [dnl<br>
&gt; -OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2 idle:5 buf:0x10e out_port:0 actions=output:3<br>

&gt; +OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 idle:5 buf:0x10e out_port:0 actions=output:3<br>

&gt;  ], [dnl<br>
&gt;  ofp_util|INFO|normalization changed ofp_match, details:<br>
&gt; -ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0<br>
&gt; -ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2<br>
&gt; +ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0<br>
&gt; +ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2<br>
&gt;  ])<br>
&gt;  AT_CLEANUP<br>
&gt;<br>
&gt; @@ -474,7 +474,7 @@ ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \<br>
&gt;  00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \<br>
&gt;  00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \<br>
&gt;  &quot; 2], [0], [dnl<br>
&gt; -OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2 actions=output:3<br>

&gt; +OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3<br>

&gt;  ], [dnl<br>
&gt;  ])<br>
&gt;  AT_CLEANUP<br>
&gt; @@ -493,8 +493,8 @@ AT_CHECK([ovs-ofctl &#39;-vPATTERN:console:%c|%p|%m&#39; ofp-print &quot;\<br>
&gt;  OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 pri:65535 buf:0x10e out_port:0 actions=output:3<br>

&gt;  ], [dnl<br>
&gt;  ofp_util|INFO|normalization changed ofp_match, details:<br>
&gt; -ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0<br>
&gt; -ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2<br>
&gt; +ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0<br>
&gt; +ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2<br>
&gt;  ])<br>
&gt;  AT_CLEANUP<br>
&gt;<br>
&gt; @@ -512,7 +512,7 @@ ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \<br>
&gt;  00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \<br>
&gt;  00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \<br>
&gt;  &quot; 2], [0], [dnl<br>
&gt; -OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2 actions=output:3<br>

&gt; +OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3<br>

&gt;  ], [dnl<br>
&gt;  ])<br>
&gt;  AT_CLEANUP<br>
&gt; @@ -769,9 +769,9 @@ c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \<br>
&gt;  00 00 00 00 00 00 00 00 \<br>
&gt;  &quot;], [0], [dnl<br>
&gt;  OFPST_FLOW reply (xid=0x4):<br>
&gt; - cookie=0x0, duration=4.2s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1<br>

&gt; + cookie=0x0, duration=4.2s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1<br>

&gt;   cookie=0x0, duration=8.9s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, priority=65535,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3<br>

&gt; - cookie=0x0, duration=4.28s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=1,nw_tos=0,tp_src=0,tp_dst=0 actions=output:3<br>

&gt; + cookie=0x0, duration=4.28s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=1,nw_tos=0,tp_src=0,tp_dst=0 actions=output:3<br>

&gt;   cookie=0x0, duration=9.096s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1<br>

&gt;   cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop<br>
&gt;  ])<br>
&gt; @@ -1269,7 +1269,7 @@ AT_CHECK([ovs-ofctl ofp-print &quot;\<br>
&gt;  1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \<br>
&gt;  c0 a8 00 02 00 00 00 00 \<br>
&gt;  &quot;], [0], [dnl<br>
&gt; -NXT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2 reason=idle duration6.024s idle5 pkts1 bytes60<br>

&gt; +NXT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2 reason=idle duration6.024s idle5 pkts1 bytes60<br>

&gt;  ])<br>
&gt;  AT_CLEANUP<br>
&gt;<br>
&gt; diff --git a/tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a> b/tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a><br>
&gt; index 8185827..08a4c46 100644<br>
&gt; --- a/tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a><br>
&gt; +++ b/tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a><br>
&gt; @@ -838,20 +838,20 @@ xxxxxxxx c0a88055 xxxx xxxx<br>
&gt;  003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl<br>
&gt;  xxxxxxxx c0a88055 xxxx xxxx<br>
&gt;<br>
&gt; -# arp,nw_src=192.168.128.85<br>
&gt; +# arp,arp_spa=192.168.128.85<br>
&gt;  003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
&gt;  c0a88055 xxxxxxxx xxxx xxxx<br>
&gt;<br>
&gt; -# arp,nw_src=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt; +# arp,arp_spa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt;  # 31: 55 -&gt; 00<br>
&gt;  003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
&gt;  c0a88055 xxxxxxxx xxxx xxxx<br>
&gt;<br>
&gt; -# arp,nw_dst=192.168.128.85<br>
&gt; +# arp,arp_tpa=192.168.128.85<br>
&gt;  003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
&gt;  xxxxxxxx c0a88055 xxxx xxxx<br>
&gt;<br>
&gt; -# arp,nw_dst=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt; +# arp,arp_tpa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt;  # 35: 55 -&gt; 00<br>
&gt;  003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
&gt;  xxxxxxxx c0a88055 xxxx xxxx<br>
&gt; @@ -1107,13 +1107,13 @@ dnl Try invalid TOS:<br>
&gt;  0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl<br>
&gt;  00000000 00 000000 0000000000000000ffffffffffffffff<br>
&gt;<br>
&gt; -# arp,nw_src=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt; +# arp,arp_spa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt;  0000 0058 00000000 000003f7 dnl<br>
&gt;  000000000000ffffffffffff 000000000000ffffffffffff dnl<br>
&gt;  0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl<br>
&gt;  00000000 00 000000 0000000000000000ffffffffffffffff<br>
&gt;<br>
&gt; -# arp,nw_dst=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt; +# arp,arp_tpa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
&gt;  0000 0058 00000000 000003f7 dnl<br>
&gt;  000000000000ffffffffffff 000000000000ffffffffffff dnl<br>
&gt;  0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl<br>
&gt; --<br>
&gt; 1.7.2.5<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; dev mailing list<br>
&gt; <a href="mailto:dev@openvswitch.org">dev@openvswitch.org</a><br>
&gt; <a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</blockquote></div><br>