ofp-util: Also force nw_tos to be wildcarded for ARP flows.
authorBen Pfaff <blp@nicira.com>
Mon, 9 May 2011 23:03:26 +0000 (16:03 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 27 May 2011 22:42:18 +0000 (15:42 -0700)
OVS doesn't fill nw_tos with anything meaningful for ARP flows so we should
also force nw_tos to be wildcarded for ARP.

lib/ofp-util.c
tests/ofp-print.at

index e723fd2e7a01c42163522ed1d6e1fb1ab7a61197..9507d94a1571dac5efbbafe336a34a987624fa74 100644 (file)
@@ -2097,7 +2097,7 @@ normalize_wildcards(const struct ofp_match *m)
             wc |= htonl(OFPFW_TP);
         }
     } else if (m->dl_type == htons(ETH_TYPE_ARP)) {
-        wc |= htonl(OFPFW_TP);
+        wc |= htonl(OFPFW_TP | OFPFW_NW_TOS);
     } else {
         wc |= htonl(OFPFW_NW | OFPFW_TP);
     }
index 417ef48a3bb24bdca14d26a713d97b7c724b9f2b..604267a07f7ac9efb3abf89ef1b1d6b0acc14dda 100644 (file)
@@ -287,11 +287,11 @@ AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
 " 2], [0], [dnl
-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,opcode=2,nw_tos=0 idle:5 buf:0x10e actions=output:3
+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,opcode=2 idle:5 buf:0x10e actions=output:3
 ], [dnl
 ofp_util|INFO|normalization changed ofp_match, details:
 ofp_util|INFO| pre: 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,opcode=2,nw_tos=0,tp_src=0,tp_dst=0
-ofp_util|INFO|post: 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,opcode=2,nw_tos=0
+ofp_util|INFO|post: 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,opcode=2
 ])
 AT_CLEANUP
 
@@ -309,7 +309,7 @@ OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50
 ], [dnl
 ofp_util|INFO|normalization changed ofp_match, details:
 ofp_util|INFO| pre: 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,opcode=2,nw_tos=0,tp_src=0,tp_dst=0
-ofp_util|INFO|post: 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,opcode=2,nw_tos=0
+ofp_util|INFO|post: 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,opcode=2
 ])
 AT_CLEANUP