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"><<a href="mailto:ethan@nicira.com" target="_blank">ethan@nicira.com</a>></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 <<a href="mailto:ethan@nicira.com">ethan@nicira.com</a>><br>
<div><div class="h5"><br>
<br>
On Wed, Oct 17, 2012 at 6:23 PM, Mehak Mahajan <<a href="mailto:mmahajan@nicira.com">mmahajan@nicira.com</a>> wrote:<br>
> With a previous commit 953cc1888321346e6c4175fbc0a3f66d34913ea3, the<br>
> ovs logs were re-formatted such that they can be input into the<br>
> ofproto/trace. For ARP packets, ofproto/trace expects arp_tpa/arp_spa<br>
> instead of nw_dst/nw_src.<br>
><br>
> Signed-off-by: Mehak Mahajan <<a href="mailto:mmahajan@nicira.com">mmahajan@nicira.com</a>><br>
> ---<br>
> lib/match.c | 3 +++<br>
> tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a> | 22 +++++++++++-----------<br>
> tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a> | 12 ++++++------<br>
> 3 files changed, 20 insertions(+), 17 deletions(-)<br>
><br>
> diff --git a/lib/match.c b/lib/match.c<br>
> index e53a11a..6a4fec7 100644<br>
> --- a/lib/match.c<br>
> +++ b/lib/match.c<br>
> @@ -780,6 +780,9 @@ match_format(const struct match *match, struct ds *s, unsigned int priority)<br>
> ntohl(wc->masks.ipv6_label));<br>
> }<br>
> }<br>
> + } else if (f->dl_type == htons(ETH_TYPE_ARP)) {<br>
> + format_ip_netmask(s, "arp_spa", f->nw_src, wc->masks.nw_src);<br>
> + format_ip_netmask(s, "arp_tpa", f->nw_dst, wc->masks.nw_dst);<br>
> } else {<br>
> format_ip_netmask(s, "nw_src", f->nw_src, wc->masks.nw_src);<br>
> format_ip_netmask(s, "nw_dst", f->nw_dst, wc->masks.nw_dst);<br>
> 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>
> index 0fe2eff..dff7bf4 100644<br>
> --- a/tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a><br>
> +++ b/tests/<a href="http://ofp-print.at" target="_blank">ofp-print.at</a><br>
> @@ -365,7 +365,7 @@ AT_CHECK([ovs-ofctl ofp-print "\<br>
> 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \<br>
> 00 00 00 00 00 00 00 3c \<br>
> "], [0], [dnl<br>
> -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>
> +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>
> ])<br>
> AT_CLEANUP<br>
><br>
> @@ -452,11 +452,11 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\<br>
> 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \<br>
> 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \<br>
> " 2], [0], [dnl<br>
> -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>
> +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>
> ], [dnl<br>
> ofp_util|INFO|normalization changed ofp_match, details:<br>
> -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>
> -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>
> +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>
> +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>
> ])<br>
> AT_CLEANUP<br>
><br>
> @@ -474,7 +474,7 @@ ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \<br>
> 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \<br>
> 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \<br>
> " 2], [0], [dnl<br>
> -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>
> +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>
> ], [dnl<br>
> ])<br>
> AT_CLEANUP<br>
> @@ -493,8 +493,8 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\<br>
> 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>
> ], [dnl<br>
> ofp_util|INFO|normalization changed ofp_match, details:<br>
> -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>
> -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>
> +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>
> +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>
> ])<br>
> AT_CLEANUP<br>
><br>
> @@ -512,7 +512,7 @@ ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \<br>
> 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \<br>
> 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \<br>
> " 2], [0], [dnl<br>
> -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>
> +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>
> ], [dnl<br>
> ])<br>
> AT_CLEANUP<br>
> @@ -769,9 +769,9 @@ c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \<br>
> 00 00 00 00 00 00 00 00 \<br>
> "], [0], [dnl<br>
> OFPST_FLOW reply (xid=0x4):<br>
> - 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>
> + 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>
> 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>
> - 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>
> + 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>
> 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>
> cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop<br>
> ])<br>
> @@ -1269,7 +1269,7 @@ AT_CHECK([ovs-ofctl ofp-print "\<br>
> 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \<br>
> c0 a8 00 02 00 00 00 00 \<br>
> "], [0], [dnl<br>
> -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>
> +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>
> ])<br>
> AT_CLEANUP<br>
><br>
> 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>
> index 8185827..08a4c46 100644<br>
> --- a/tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a><br>
> +++ b/tests/<a href="http://ovs-ofctl.at" target="_blank">ovs-ofctl.at</a><br>
> @@ -838,20 +838,20 @@ xxxxxxxx c0a88055 xxxx xxxx<br>
> 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0800 xx xx xxxx dnl<br>
> xxxxxxxx c0a88055 xxxx xxxx<br>
><br>
> -# arp,nw_src=192.168.128.85<br>
> +# arp,arp_spa=192.168.128.85<br>
> 003800ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
> c0a88055 xxxxxxxx xxxx xxxx<br>
><br>
> -# arp,nw_src=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> +# arp,arp_spa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> # 31: 55 -> 00<br>
> 003808ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
> c0a88055 xxxxxxxx xxxx xxxx<br>
><br>
> -# arp,nw_dst=192.168.128.85<br>
> +# arp,arp_tpa=192.168.128.85<br>
> 003020ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
> xxxxxxxx c0a88055 xxxx xxxx<br>
><br>
> -# arp,nw_dst=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> +# arp,arp_tpa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> # 35: 55 -> 00<br>
> 003220ef xxxx xxxxxxxxxxxx xxxxxxxxxxxx xxxx xx xx 0806 xx xx xxxx dnl<br>
> xxxxxxxx c0a88055 xxxx xxxx<br>
> @@ -1107,13 +1107,13 @@ dnl Try invalid TOS:<br>
> 0000 00 00 0800 00 00 00000000ffffffff c0a880005a5a5a5a 0000 0000 dnl<br>
> 00000000 00 000000 0000000000000000ffffffffffffffff<br>
><br>
> -# arp,nw_src=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> +# arp,arp_spa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> 0000 0058 00000000 000003f7 dnl<br>
> 000000000000ffffffffffff 000000000000ffffffffffff dnl<br>
> 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 dnl<br>
> 00000000 00 000000 0000000000000000ffffffffffffffff<br>
><br>
> -# arp,nw_dst=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> +# arp,arp_tpa=<a href="http://192.168.128.0/24" target="_blank">192.168.128.0/24</a><br>
> 0000 0058 00000000 000003f7 dnl<br>
> 000000000000ffffffffffff 000000000000ffffffffffff dnl<br>
> 0000 00 00 0806 00 00 00000000ffffffff c0a88000000000ff 0000 0000 dnl<br>
> --<br>
> 1.7.2.5<br>
><br>
</div></div>> _______________________________________________<br>
> dev mailing list<br>
> <a href="mailto:dev@openvswitch.org">dev@openvswitch.org</a><br>
> <a href="http://openvswitch.org/mailman/listinfo/dev" target="_blank">http://openvswitch.org/mailman/listinfo/dev</a><br>
</blockquote></div><br>