Fixed current tests to use Match with the correct field order according to OF spec.
To avoid failures that are caused by inconsistent order of writes of match fields.
diff --git a/test_data/of13/flow_removed.data b/test_data/of13/flow_removed.data
index 0a24993..69a9b7e 100644
--- a/test_data/of13/flow_removed.data
+++ b/test_data/of13/flow_removed.data
@@ -14,11 +14,11 @@
00 00 00 00 00 00 00 02 # byte_count
00 01 # match.type
00 16 # match.length
-80 00 2A 02 # match.oxm_list[0].type_len
-00 01 # match.oxm_list[0].value
-80 00 01 08 # match.oxm_list[1].type_len
-00 00 00 04 # match.oxm_list[1].value
-00 00 00 05 # match.oxm_list[1].mask
+80 00 01 08 # match.oxm_list[0].type_len
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+80 00 2A 02 # match.oxm_list[1].type_len
+00 01 # match.oxm_list[1].value
00 00 # match.pad
-- python
ofp.message.flow_removed(
@@ -34,5 +34,6 @@
packet_count=1,
byte_count=2,
match=ofp.match(oxm_list=[
+ ofp.oxm.in_port_masked(value=4, value_mask=5),
ofp.oxm.arp_op(value=1),
- ofp.oxm.in_port_masked(value=4, value_mask=5)]))
+ ]))
diff --git a/test_data/of13/packet_in.data b/test_data/of13/packet_in.data
index 951f212..6edc12e 100644
--- a/test_data/of13/packet_in.data
+++ b/test_data/of13/packet_in.data
@@ -9,11 +9,11 @@
fe dc ba 98 76 54 32 10 # cookie
00 01 # match.type
00 16 # match.length
-80 00 2A 02 # match.oxm_list[0].type_len
-00 01 # match.oxm_list[0].value
-80 00 01 08 # match.oxm_list[1].type_len
-00 00 00 04 # match.oxm_list[1].value
-00 00 00 05 # match.oxm_list[1].mask
+80 00 01 08 # match.oxm_list[0].type_len
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+80 00 2A 02 # match.oxm_list[1].type_len
+00 01 # match.oxm_list[1].value
00 00 # match.pad
00 00 # pad
61 62 63 # data
@@ -26,8 +26,8 @@
table_id=20,
cookie=0xFEDCBA9876543210,
match=ofp.match(oxm_list=[
- ofp.oxm.arp_op(value=1),
ofp.oxm.in_port_masked(value=4, value_mask=5)]),
+ ofp.oxm.arp_op(value=1),
data="abc")
-- java
OFOxms oxms = factory.oxms();
@@ -42,8 +42,8 @@
.setMatch(
factory.buildMatchV3().setOxmList(
OFOxmList.of(
- oxms.arpOp(ArpOpcode.ARP_OPCODE_REQUEST),
- oxms.inPortMasked(OFPort.of(4), OFPort.of(5))
+ oxms.inPortMasked(OFPort.of(4), OFPort.of(5)),
+ oxms.arpOp(ArpOpcode.ARP_OPCODE_REQUEST)
)
).build()
)